Home
|
UNIX
|
Practical
How to initialize the MBR from a UNIX prompt
and how to create DOS bootable floppies from a UNIX prompt
Initialize MBR
The DOS equivalent for "fdisk /mbr" on UNIX is,
dd if=/dev/zero of=/dev/sdX bs=446 count=1
To remove the partition table with it,
dd if=/dev/zero of=/dev/sdX bs=512 count=1
Note there's a tool to do that otherwise,
To backup the MBR & parttable,
dd if=/dev/hdx of=MBR-backup bs=512 count=1
To restore the MBR & parttable,
dd if=MBR-backup of=/dev/hdx bs=512 count=1
DOS bootable floppy
To make a DOS bootable floppy on DOS,
format a: /s
and on UNIX,
fdformat /dev/fd0u1680
mformat a:
ms-sys -w /dev/fd0
mcopy /dosc/io.sys a:
mcopy /dosc/msdos.sys a:
mcopy /dosc/command.com a:
Links
References