http://www.Linux-Boot.net


Linux-Boot.net

BIOS
CPU Arch

MBR
Boot Stages
Boot Squence
Boot Errors

BootSplash
FrameBuffer

Booting
Boot-Loaders
SysLinux
Grub
Lilo


RootFS-HOWTO
RootFS-Config
RootFS-HOWTO


InitRD-HOWTO
InitRD
InitRD-Config
InitRD-HOWTO

Creating initrd.gz
RamDisk
Loop

Viewing initrd.gz


Obsolete
initrd/rootfs Scripts

Old Scripts


initrd HOWTO Scripts
rootfs HOWTO Scripts
( Bootable CF, USB, FD, CD )
Standalone Boot
/boot
InitRD
RootFS
Patches


Boot Media
CD-Boot
Floppy-Boot
USB-Boot
Compact-Flash-Boot
Network-Boot
DOS


Chroot


Forgot Root PassWord


CDRW HOWTO



1U Rackmount Chassis

Custom-Chassis.com

Linux-1U.net

1U-ITX.net


ITX-Blades.net


Small PC cases

Mini-Box.net

Wrap-Box.net

Wrap-OS.net


Wan-Sim.net



Linux-Consulting.com

Linux-CAE.net

Linux-Sec.net

Linux-Boot.net

Linux-Backup.net

Linux-Wireless.org

Linux-Office.net

Linux-Video.net

Linux-VOIP.net

Linux-Jobs.net

Linux-Diff.net

1U-Raid5.net

Linux-Howto.net


Spam Reporting



Free Linux CDs

ISO9660.org

Distro-CD.org

Patch-CD.org




Contact



Linux is a registered trademark of
Linus Torvalds

More Linux Legalese


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
        A:> fdisk /mbr
    • from windoze
        C:> fdisk /mbr
    • 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


Copyright © 2000
Linux-Consulting
All Rights Reserved.
Updated: Tue Sep 13 07:10:08 2005 PDT