[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DOS MBR



The DOS MBR will only be valid for you from a hard drive with the exact
same paramaters and exact same partition table.  (i.e. no one has one you
can use).

What you can do (I have done this before with success) is:  (But beware,
this is not guaranteed to work--I have also done this and failed)

1. In Linux, create an image of your entire DOS partition (This can take
quite some time on a large drive!):

	dd if=/dev/hda1 of=DOS.img

2. Reformat the drive using DOS, which will create the mbr you need:

	format /s c:

3. In Linux again, copy the (good) DOS MBR:

	dd if=/dev/hda1 of=DOS_MBR.img bs=512 count=1

4. Copy the original image back to the actual partition:

	dd if=DOS.img of=/dev/hda1

5. Copy the new (good) DOS MBR to the partition:

	dd if=DOS_MBR.img of=/dev/hda1

If all goes well, this _should_ allow you to boot into DOS again.  And, if
not, you at least have an image of the original DOS partition... if all
else fails, you can reformat the DOS partition as normal (format /s c:),
then mount the image in Linux (mount -o loop -t msdos DOS.img /mnt) then
mount the actual DOS partition (mount -t msdos /dev/hda1 /mnt2) then copy
everything from the image to the actual drive (cp -a /mnt/* /mnt2).

Does that accomplish what you need?

Like I said, I have done that with success before.  I have also done it
unsuccessfully before.  I really don't know what I did wrong the time it
failed, so I can't tell you what to avoid.  But... in *theory* that should
always work (but as we all know, theory sometimes fails :-).  So be
prepaired for the worst... (which in this case probably isn't that bad if
you've successfully created the image of the DOS partition as mentioned in
step #1).

Best of luck...


On Tue, 6 Jul 1999, Felipe Alvarez Harnecker wrote:

> 
> Can someone send me a DOS Master Boot record so a can dd it to
> /dev/hda?
> 
> Please answer only if you realy know what i mean because i dont want
> to alter the partition table.
> 
> Send me version info as well.
> 
> Thanks.
> 
> -- 
> ______________________________________________________
> 
> Felipe Alvarez Harnecker.  QlSoftware.
> 		
> Tel. 09.874.60.17  e-mail: felipe.alvarez@qlsoft.cl
> 
> Potenciado por Ql/Linux  http://www.qlsoft.cl
> ______________________________________________________
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
> 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Jonathan Hall  *  jonhall@futureks.net  *  PGP public key available
 Systems Admin, Future Internet Services; Goessel, KS * (316) 367-2487
         http://www.futureks.net  *  PGP Key ID: FE 00 FD 51
         -=  Running Debian GNU/Linux 2.0, kernel 2.0.36  =-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Reply to: