Jump to content











Photo
- - - - -

xp setup: ntldr not found, but boots fine on newer motherboard


Best Answer Wonko the Sane , 10 February 2013 - 12:23 PM

Try writing these values in the partition table:

0C-80-1023-254-63-1023-254-63-63-7566552

:unsure:

 

BTW, till now we are exactly in the situation described by the originally referenced post, if for *any* reason the ASUS bios does not "like" the partition table or the geometry reported by the device, it will automagically determine a suitable geometry, disregarding the values in the PBR BPB.

 

In Legorol's case the "determined" Head number was 64, in your case it is 128.

This must be connected to the size of the device, Legorol was using a 1Gb stick, you are using a 4 Gb stick.

It makes sense:

1024*64*63*512=2,113,929,216

1024*128*63*512=4,227,858,432

 

As a matter of fact these geometries are easily replicable in Qemu (+Qemu manager), whose (Bochs originated) BIOS is a "strict" one.

 

:cheers:

Wonko

Go to the full post


  • Please log in to reply
131 replies to this topic

#101 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 10 February 2013 - 12:38 PM

@steve Good to know, but I did this untill now I used 'cold' boots.

 

Anyway, with HDD0 as second boot device the flashdrive is ignored with the CHS start sector 0/0/1, but is booted from both when using 0/1/1 or 0/1/2

When it is the only boot device it boots anyway.

 

Seems like the bios is checking the drive, to see if it looks bootable (apparently a chs start sector that does not imply the MBR seems like one of the criteria), otherwise it will boot a different drive.

 

When the HDD0 is removed from the boot list, it has no choice and decides to boot from the device against its 'better' judgement.

In this case it does no longer care if the CHS start is 0/0/1 or not!

 

... weird

 

@Wonko

Indeed this is probably happening. I am sorry I did not yet understand that part untill now.  :suda:  I'll mole that over. What I do not understand however, is the following: this would anly make sence if the bios allows 1024 cylinders. I thought it was limmited to 812 according to this MBRTEST?

 

if for *any* reason the ASUS bios does not "like" the partition table or the geometry reported by the device

Why would it not like the 255/63 balanced drive then? :confused1:

 

*edit*

Hang on a sec! Wonko, I don't think this is happening at all! I just realized, I am using a 4GB stick containing the xp setup for some boot tests. But id did write the TESTMBR to a 7 GB drive! It still returned 128. I think it I using 128 as default. Can this not be true?


Edited by Fiction, 10 February 2013 - 12:45 PM.


#102 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2013 - 12:45 PM

Why would it not like the 255/63 balanced drive then?  :confused1:

 

Because it is "exceeding" the size of the device.

It seems (like the mentioned Qemu) the BIOS tries to "optimize" the number of heads, using the minimal amount needed to CHS map the whole device.

 

Now, why would have jaclaz Wonko have originally added to his batches MBRBATCH/MKIMG the possibility to choose a CHS geometry? :dubbio:

(remember this happened before the "quirk" about the MS PBR code check for geometry emerged and a  way to patch it was found for it) ;)

 

If it happens on the 7 Gb one then all the previous nice explanations are not true. :w00t:

Are you sure?

Really sure?

Can you try again from scratch (zeroed sticks)?

 

 

:cheers:

Wonko



#103 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 10 February 2013 - 01:03 PM

Damn now I look foolish. I got the USB sizes mixed up. It is a 3.8 GB UFD :S This is why they print the sizes on them nowdays (this one is a bit older).

 

I'll try a 32 one. If the number of heads changes, you are probably correct.

 

*edit*

 

I am sorry wonko! You were of course completely correct!

 

The 32 GB drive returned:

80
0000 FE03 003F 03FF
LHDD0 00
SHDD0 00

 

However I still do not understand why the bios would use 812 cylinders for the 4GB flashdrive...?


Edited by Fiction, 10 February 2013 - 01:10 PM.


#104 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2013 - 02:59 PM

However I still do not understand why the bios would use 812 cylinders for the 4GB flashdrive...?

Maybe it doesn't and more simply there is a glitch in the matrix.

 

The number of Cylinders is however completely irrelevant.

The max numbers of Cylinders possible with CHS addressing is 1024.

The PBR is (normally) well before Cylinder 812 and the parts of the geometry checked by the "botched" MS PBR code are just Heads and Sectors.

Now, be nice, try making on the stick a partition:

0C-80-815-0-1-938-127-63-6572160-999936

 

What happens?

 

:cheers:

Wonko



#105 steve6375

steve6375

    Platinum Member

  • Developer
  • 7311 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 10 February 2013 - 03:50 PM

However I still do not understand why the bios would use 812 cylinders for the 4GB flashdrive...?

 

The AH=8 int 13h call returns the Disk Geometry of the disk specified by DL (=80h=the boot disk). The BIOS normally derives this info from a call to the disk to ask it's total sector capacity and then the BIOS divides this into CHS to return the geometry of that disk (so you never get 1023 unless the disk is 8GB or more in size). Many BIOSes look at the End CHS values in the partition table to determine what HdsperCyl and SecsperTrack it has (it assumes that partitions always end on a whole cylinder!) - others just assume 255x63 (some odd ones assume 240 HdsperCyl!) - this BIOS it seems, just works on the size of the disk and used the lowest poss. heads per cyl value - very strange! I have not seen that before!



#106 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2013 - 04:03 PM

 very strange! I have not seen that before!

As said, do some tests in Qemu (+Qemu Manager) and you will see that behaviour.

Try partitioning/formatting with fdisk/format from DOS images (RAW, 00'ed) in Qemu and you will see how the same approach is used to establish geometry based on the size of the image mapped as hard disk.

 

:cheers:

Wonko



#107 steve6375

steve6375

    Platinum Member

  • Developer
  • 7311 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 10 February 2013 - 04:12 PM

But that is not the point. This is a partitioned USB disk not a Zero'd disk. HS values can be derived from the partition table by the BIOS.

A USB disk with the TEST MBR under QEMU shows 255x63 geometry. 



#108 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 10 February 2013 - 04:21 PM

@wonko

I wanted to try your batch file for this but your batch file tells me '(NOT YET AVAILABLE)'? Or am I misreading?

 

Wat program is best suited for making a 'details' image like this? I am not skilled enough to make a complete MBR from scratch :P

 

I clean this way:

using windows 7 diskpart clean function to clean the sectors BEHIND sector 0

using the RMPrepUSB clean function to clean the MBR itself.

 

How to proceed from this? I could format the thing using MPrepUSB or the win7 diskpart and then change the existing values using mHex...

What do you suggest I boot from this suggested parition? NTLDR? or are we still talking about the MBR1P63S?

 

I can do that while waiting on clarification :P. I'll just copy the MBR1P63S MBR over and change the MBR to fit these specs:

Partition Type=0c

'active'=80

bCyl=815

bhead=0

bsec=1

ecyl=938

ehead=127

esect=63

start sec=6572160

num sect=999936

 

Assuming you use the same syntax as in you sheets. Which you probably do, since it all lines up :P

 

Booted from it, the asus mobo displays:

80

0000 7f03 003f 032b

lhdd0 00

shdd0 00

 

aka 812/128/63 ...

 

No interesting stuff yet. You probably meant something else to boot from this partition? I could try installing grub4dos on it...

After that, I guess I'd better wait until you tell me what to boot from this :P

 

grub4dos boots fine from this partition

 

I notices I was just typing something wrong when trying to use /bios, so I got it working. The command /bios int=0x13 edx=0x80 eax=0x0800 returns:

 

ecx=0000caff

edx=00007f03

 

this '7f03' seems really familiar :P

 

Ok, but this was just trying to get the partition correct and see if it would boot. It will. Now please tell me what I should boot from it :P


Edited by Fiction, 10 February 2013 - 05:17 PM.


#109 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2013 - 05:20 PM

But that is not the point. This is a partitioned USB disk not a Zero'd disk. HS values can be derived from the partition table by the BIOS.

A USB disk with the TEST MBR under QEMU shows 255x63 geometry. 

Oh, yes, it is the point.

I am NOT talking of a USB disk (which is mounted through the provision of the "main" windows and that will have 255/63) I am talking of an image mounted as hard diks in Qemu (+Qemu Manager).

Try partitioning and formatting the disk from DOS in the QEMU VM.

Then apply to the image (from Windows) just the NT bootsector (UNpatched) and a NTLDR+BOOT.INI.

 

 

 

I wanted to try your batch file for this but your batch file tells me '(NOT YET AVAILABLE)'? Or am I misreading?

WHICH batch? (I did produce more than one ;)).

 

 

:cheers:
Wonko



#110 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 10 February 2013 - 07:06 PM

This one http://reboot.pro/to...atch-001-alpha/

Is this the wrong one?

 

You still did not tell me what to boot =/ Of what use is a correctly partitioned drive, if it doesn't boot.



#111 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2013 - 08:56 PM

This one http://reboot.pro/to...atch-001-alpha/
Is this the wrong one?
I don't know, there are at least three versions of MBRBATCH and three of MKIMG on that thread.
 
Have you got all the needed tools? :dubbio:
 
Have you read the thread and found - among the others - this post? :whistling:
 
http://reboot.pro/to...ge-2#entry91491
You still did not tell me what to boot =/ Of what use is a correctly partitioned drive, if it doesn't boot.
I am afraid I don't understand :unsure:

:cheers:
Wonko

#112 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 10 February 2013 - 10:23 PM

Maybe it doesn't and more simply there is a glitch in the matrix.

 

The number of Cylinders is however completely irrelevant.

The max numbers of Cylinders possible with CHS addressing is 1024.

The PBR is (normally) well before Cylinder 812 and the parts of the geometry checked by the "botched" MS PBR code are just Heads and Sectors.

Now, be nice, try making on the stick a partition:

0C-80-815-0-1-938-127-63-6572160-999936

 

What happens?

 

:cheers:

Wonko

I made the partition, but 'nothing happens', since it is just a partition table. I do not know what bootloader you thought should go with it. Was this about NTLDR, grub4dos, MBR1P63S, freedos maybe? Right now I have a partition table entry as suggested, but it is not bootable as there is no bootable code in the MBR, only a partition table =/ By the way, I do not understand the interest in this parition entry. The drive size remains the same (4GB), so it will be accessed by 128 head, like you explained. Why is this particularity entry of interest?

Or... perhaps it was to show that more sectors then the 812 form earlier can be used and still be boot able? If so, Why are you suggesting a 0C partition for this test an not a 0B?

 

*edit*

Coming to thing of it... I tested if the bios would switch to LBA if it could not find the VBR earlier... I used 0C as well! Perhaps I should retry this using 0B. I'll do this tomorrow.


Edited by Fiction, 10 February 2013 - 10:31 PM.


#113 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 February 2013 - 10:41 PM

The issue is with the NT/2K PBR code (the one invoking NTLDR), which PBR code do you want to test if not this one? :dubbio: (with and without the 4 byte "Clemens Patch")

 

I spent a lot of keypresses to explain why I consider the "right" MBR code to be used ALWAYS the 2K/XP one (and if the case patch it with the three bytes patch, "HP patch") :frusty:

 

Then you need in ROOT of the filesystem a copy of NTLDR and a BOOT.INI with at least two entries.

 

Yep :), you stated how that BIOS can see only 812 Cylinders, a good way to check if this is true is having the PBR (the first thing accessed from the MBR) reside beyond this limit and see what happens (815 is given only because I like to press the 5 key ;)).

 

The 0B would have been NEXT experiment (once we have results for the 0C).

 

:cheers:

Wonko

 

 



#114 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 11 February 2013 - 12:23 AM

which PBR code do you want to test if not this one?

 

I am sorry to frustrate you, but that was not evident to me. Yes, we are meanly talking about the NTLDR. But we used close to every bootloader supported by RMPrepUSB while 'testing bios behaviour' during this threat. Next time you suggest a test, could you be specific about the idea behind it. It might be trivial to you (you probably thought '815 start head says it all'), but I'm new in this field and I do not always draw the same conclusions as you do.

 

While I am at it, I'd still like to clear the air about something. Please allow me to explain my seemingly uninterested behaviour in the posts on the first few pages of this threat. Since I'd like to clear the air about this, since I am not sure actually HOW annoyed you are because of this...

 

You suggested a lot of very useful and interesting sites, but they used words I did not yet understand and assumed knowledge that was not present with me at that time to be 'common'. Some threads got to their conclusions before I had a clue at the basic ideas.

 

Since I did not really understand more than half of what I was reading, I also had trouble remembering what I had just read. (it is harder to remember something you do not understand)
On top of this, I have dyslexia and reading a long piece of text, in a small font, without much whitespace is a REAL chore to me. A chore however I am more than willing to do :P (aka it's more than worth the trouble to me)

 

Please do not interpret this post as an insult or something, I am just trying to explain my behaviour, it is actually

intended as a sort of thorough apology for not being able to keep up at the same pace.

In order to optimize communication, would you be so kind to slow down and explain thoroughly?

For example, when you say 'please create a 0C-80-815-0-1-938-127-63-6572160-999936 partition'. Please tell me the 'columns of these correspond to those in the sheets. It was only the last time you posted it, I noticed that.

 

Perhaps it is useful to list the things I did not yet understand before reading this threat, so you guys know what

level I am currently on.

Before reading all of this I did not yet know:
What the difference is between a MBR and a VBR
What is meant by BPB
What a sector is
That something called CHS exists
That something called LBA exists
What their differences are
That (boot) sectors are hexeditable
That the partition table is located inside of the MBR

That the BPB is located in the VBR

That VBR and PBR are the same thing

That in a CHS adress: cylinder and head both start at 0, while 'sector' starts at 1.

 

and the details on all of these things. And probably more that won't jump to mind right now.
I think I do understand these things right now, which feels lake a major improvement to me :P. Consider this a list of the most important accomplishments while you guide me through the rabbit hole.
Of course, it is hard to understand things when someone is talking about VBR or BPB when you do not know where they are located.

 

I think I have myself to blame for the miscommunication:

I should have told you I did not know what these things meant, in stead of pretending to understand some of it, while I did not. But these are my first few threats on this forum and you guys all seem so knowledgeable. I felt intimidated :S

 

PS

I'll see if the suggested partition boots to NTLDR tomorrow.


Edited by Fiction, 11 February 2013 - 12:26 AM.

  • steve6375 likes this

#115 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 11 February 2013 - 12:55 AM

Well, rest assured, the matter is complex. :ph34r:

 

The whole issue is with "teaching style", I tend to leave something not fully explained to:

  1. see if the padawan is attentive
  2. see if he/she is can connect the dots in autonomy
  3. be allowed to shout/vent a bit (still to further "push" the padawan to learn and reason along his/her own mental paths)

 

In most cases this works better and faster than anything else (and BTW seemingly it is working in your case also :thumbup:, if you didn't realize it, you have been taking part to a crash course on booting matters at what can be considered "advanced level" ;)).

 

:cheers:

Wonko



#116 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 11 February 2013 - 01:09 AM

  1. be allowed to shout/vent a bit (still to further "push" the padawan to learn and reason along his/her own mental paths)

Ah, so this:

 

I spent a lot of keypresses to explain why I consider the "right" MBR code to be used ALWAYS the 2K/XP one (and if the case patch it with the three bytes patch, "HP patch") :frusty:

was part of that?

 

I guess I get intimidated to quickly... in general.

 

Coming to think of it... that might explain a few reactions from my environment as well! :loleverybody:



#117 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 11 February 2013 - 05:19 PM

I am experiencing more difficulty then expected while testing this partition. I created the bootcode in the MBR using RMPrepUSB then I changed the partition table, destroying the PBR in the process. This is what made it hard: I did not know how to fix the PBR. I tried simpy bakcing up and restoring the PBR but this would not boot. After a while I decided to use a bootsect.exe to to the trick. This would at least boot on a pc with a 'normal' bios. After that I tested it on the weird asus bios

 

So what about the weird asus bios? Well it would not boot with a 'default' BPB, but it would boot if I changed the head in there to 128 in stead of 255. I hear you thinking: that is the behaviour of the PBR, right? Well I'm not sure about that, I did not get a NTLDR warning, nor a warning from the MBR ('Invalid partition table. Error loading operating system. Missing operating system.'). No, I got a bios warning: 'disk boot failure, insert system disk and press enter'. Seemingly the bios wont even look at the MBR of the drive! I should probably check if the HP patch has any effect on this (I only read about a NTFS version and I'm using FAT32 but I'll re-read).

 

Further more, berhaps I should try a different version of your batch thingy (I'll try to find the newest version), sins partitioning this way seems like an unnecessary amount of work this way.



#118 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 12 February 2013 - 12:03 AM

 (I only read about a NTFS version and I'm using FAT32 but I'll re-read).

Fail, that would not matter for the MBR would it? I got confused because I thought the '06CA' here http://reboot.pro/to...s-info/?p=14607 was an address.

 

There is however just one B80102 combination of bytes, so this should be 'it'.

 

I am still not completely confident about the mbrbatch usage, but I'm getting there. I'll run some more tests as soon as I can.

 

*edit*

Is address in the second sentence the correct word, or is it called an 'offset'?


Edited by Fiction, 12 February 2013 - 12:05 AM.


#119 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 12 February 2013 - 12:25 AM

Fail, that would not matter for the MBR would it? I got confused because I thought the '06CA' here http://reboot.pro/to...s-info/?p=14607 was an address.

 

There is however just one B80102 combination of bytes, so this should be 'it'.

 

I am still not completely confident about the mbrbatch usage, but I'm getting there. I'll run some more tests as soon as I can.

 

*edit*

Is address in the second sentence the correct word, or is it called an 'offset'?

 

Technically, they are "addresses" expressed as "offsets". 

Or if you prefer an address (in a file) is normally expressed as an offset.

Please consider that the ones here (including the mentioned:06CA)

http://thestarman.pc...br/Win2kmbr.htm

are "virtual" addesses in the sense that they represent (as offset) the addresses where the code will be once loaded into memory.

 

You want to have a look at the 2K MBR code with a "offline" disassembler/viewer, such as biew beye:

http://beye.sourcefo...beye_intro.html

http://beye.sourcefo...et/en/beye.html

http://sourceforge.n...eye/files/biew/

which will keep the same addresses (offsets) as in the actual MBR.

 

 

:cheers:

Wonko



#120 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 12 February 2013 - 04:44 PM

I do have a little less free time, so I'll read all of that at my own pace. I still wanted to tell you that I think I understand the MBR batch now, do I understand correctly that there is no way to specify a starting sector?

 

*edit*

I found this as well: http://samuelkerr.com/?p=262

 

0000h - 01B7h       Code Area (440 bytes)
01B8h - 01BBh       Disk Signature (4 bytes)
01BCh - 01BDh       Generally Zeroed out (2 bytes)
01BEh - 01FDh       List of Partition Records (4 16-byte structures)
01FEh - 01FFh       MBR Signature (2 bytes - Must be AA55h)

 Is this the case for every MBR, independent of the boot code?

This would be interesting, I could just clean the drive, create the partition table (and perhaps the aa55/disk signature), format using for instance diskpart and then add the code manually.

 

I guess these are all "virtual" addesses as well. What would the corresponding 'real' adresses be then? I guess the answer to this lies somewhere in the links you posted earlier :P

 

The biggest problems left then are then:

1what about the PBR

2what should the disk signature be?


Edited by Fiction, 12 February 2013 - 05:20 PM.


#121 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 12 February 2013 - 06:05 PM

I do have a little less free time, so I'll read all of that at my own pace. I still wanted to tell you that I think I understand the MBR batch now, do I understand correctly that there is no way to specify a starting sector?

Yes.

Sure you can specify a start sector (i guess you mean a start sector for a partition).

 

*edit*

I found this as well: http://samuelkerr.com/?p=262

 

 Is this the case for every MBR, independent of the boot code?

Yes, that is the "standard".

 

This would be interesting, I could just clean the drive, create the partition table (and perhaps the aa55/disk signature), format using for instance diskpart and then add the code manually.

Exactly.

BTW you NEED the 55AA magic bytes.

 

Don't worry much (or don't worry at all) about disk signature.

As soon as a NT based system will access that MBR as part of a disk it will automagically add the disk signature if those four bytes are 00, otherwise you can write *any* number.

As an example I often use in experiment (as form of respect towards the friend cdob :worship:) a signature of CD0BCD0B.

The issue may come if you connect two disks with same signature to the same NT system at the same time.

I guess these are all "virtual" addesses as well. What would the corresponding 'real' adresses be then? I guess the answer to this lies somewhere in the links you posted earlier :P

Just open a dump of the MBR in biew  beye ;).

 

The biggest problems left then are then:

1what about the PBR

2what should the disk signature be?

The PBR (just like the MBR) is made of two parts, CODE and DATA.

Traditionally (DOS) you had FDISK that ONLY wrote the MBR DATA, i.e. the partition table and the magic bytes 55AA (and you needed to run FDISK /MBR to write the CODE to the MBR.

FORMAT instead not ONLY did write the DATA in the PBR, i.e. the BPB and the magic bytes 55AA, but also the CODE.

In NT system, when you partition a disk instead, IF there is not the 55AA magic bytes in the MBR, the disk is "initialized" which basically means that the CODE is written to it, before you start creating partitions.

The FORMAT command has remained using the same paradigm, under NT as well when you format a volume BOTH DATA (BPB+magic bytes) and CODE are written to the PBR/VBR.

 

Additionally (and this is where MBRbatch comes useful) the NT FORMAT "trusts" the info that it can read in the partition table (with a couple exceptions, see the MBRbatch thread) where some CHS based partition ID's may (FAT16 and FAT32) may be changed silently by FORMAT to the corresponding LBA ID's.

 

:cheers:

Wonko



#122 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 February 2013 - 02:28 PM

On second thought, you may be more at ease using this:

http://reboot.pro/to...-v0100-release/

 

instead.

 

:cheers:

Wonko



#123 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 13 February 2013 - 08:57 PM

I must admit I like GUIs. I'm know public opinion is that GUIs aren't 'pro', but I'm very visually focused. This program will be useful in the future.

 

I got Lancelot's verion of the batchfiles working. What is the advantage of mkimg above create? The fact that mkimg does not need a file containing the MBR code, because it is loading this from a system file? I need to provide this file myself since I am using x64 win7 on the system preparing the flash drive. I think it might be a better idea to keep a copy of the mbr content. Seems like create would be more useful in this case. If I understand correctly after using create you still need to use edit, to add the partition table.

 

I think using edit for the partition table is probably a good idea, since you can not specify a start sector in create... or can you?

 

I keep thinking using tiny hexer and doing all of this manually is more fun as well :P.

 

*edit*

 

I suppose the KCS checksum can be left al 0-s as well?

 

*edit2*

Offtopic, but I skimmed this:

http://www.911cd.net...pic=21242&st=60

Do I understand correctly that you use this method to boot the OS just enough to load the drivers for the external device and a bit later continue the booting from this device, in order to continue from a different drive the booting originally started from?

That's brilliant :P


Edited by Fiction, 13 February 2013 - 09:47 PM.


#124 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15469 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 February 2013 - 10:43 PM

Do I understand correctly that you use this method to boot the OS just enough to load the drivers for the external device and a bit later continue the booting from this device, in order to continue from a different drive the booting originally started from?

That's brilliant :P

Yep :thumbsup:, that's the Kansas City Shuffle, like any confidence trick:

http://en.wikipedia....Confidence_game

it is clever. (and you need an artist  - in this case s4e - and a "sucker" - in this case the MS XP, and sometimes one or more shills - in this case Dietmar, jaclaz, cdob and karyonix).

 

The trick is to make the gullible XP believe that booting was started since the beginning from the "external device", while in reality it began from the KCS image.

 

BTW, and to be picky as always ;), you are talking of the KCSsum (i.e. something that needs to be added in order to match a given KCS checksum), not of the checksum.

 

This is only needed on the image MBR to match the "real device" KCS checksum, not only it can, but it should be left all 00's everywhere if not on a KCS image.

 

And yes, you need to edit the MBR if using MKIMG, if you prefer MBRBATCH is a "fine tweaking" tool, while mkimg is a sort of "wizard" to deliver in a few steps a base "generic" image, suitable for USB sticks and the like.

 

:cheers:

Wonko



#125 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 02 March 2013 - 04:18 PM

Ok, this might verry well be a problem caused by a weak understanding of the matter, but I'm trying to test a few differnent partitiontabels, and see if the drive is bootable.

 

However, I'm unable to get both the PBR and the MBR code to work propperly, without reformatting the entire drive.

 

Can you guys advice me tools that are able to:

1 add bootcode (both ntldr and bootmgr, preferably a msdos bootcode) to the mbr and pbr without altering the partition table RMPrepUSB reformats the entire drive if I hit '6 Prepare Drive'

2 Partially unrelated: Something I could install on windows 7 that would be able to run winnt32.exe. I am running winnt32.exe from virtualbox now, when needed and is slows down the process a fair bit.

 

If I recall correclty RMPrepUSB had a File>USB function, but I thought it wrote to the MBR only? I've seen the words 'NTLDR' and 'BOOTMGR' mentioned literally in the PBR, so I am confident some bootcode has to be written to the PBR right?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users