|
|
|
| Master Boot Record |
GeoCities.com All the gory MBR details in assy
MCSelec.com MBR
xbox.plug.org.au
- Stage-1 Loader is in the MBR
- Don't forget ( 4 partitions * 16Bytes each ) plus 2 bytes for "bootable" flag
==>> MBR is the first 446 out of 512
- Erase the MBR
- if booting from DOS floppy
- from windoze
- from linux
root# dd if=/dev/zero of=/dev/hda bs=446 count=1
- Overwriting the MBR
- When you use lilo, it first saves the current MBR to /boot/boot.MMmm,
than it installs itself
- When you use grub, ... it does ....
- Restore the MBR to it's Previous state
dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1
The name of the original boot sector will be boot.MMmm where
'MM' is the major device number and 'mm' is the minor device number
/dev/hda is boot.0300
/dev/hdb is boot.0364
/dev/hdc is boot.2200
/dev/sda is boot.0800
- The original boot sector is actually 512 bytes in length,
but the remaining bytes after 446 are part of the partition table and
we don't want to overwrite the partition info in case it's changed or different
- the boot partition flag is 0xaa55 ( 2 bytes )
- the main MBR info is 446 bytes ( 512 -64 -2 )
|
| Partition Records |
ExecPC.com Partition Table
- the Primary Partition Table is 16 bytes each
- there is 4 primary partitions ( logical partions are different )
|
| Partition Scheme |
- Hard Disk with 2 Partitions
- DualBoot Grub
- DualBoot Lilo
|
|
|