Sunday, March 18, 2012

Linux 5 - The Boot Manager

  • LILO
  • GRUB
  • BackUP the MBR
LILO is rarely used
the LILO configuration is stored in /etc/lilo.conf

–boot   → what device it’s going to boot from (in this case the first serialATA 
–map    → LILO creates a map file to say what is mapped where
–install → default, leave this boot.b as the default
–prompt  → does it prompt the user or boot directly
–timeout → timeout default 50s
–message → welcome message to the boot screen
–lba32   → type of drive, it’s an LBA drive so it can use the entire drive
–default → what default label it boot
There are two different operating systems or stanzas.
The first one is /boot/vmlinuz….
mount read only
located on /dev/sda1
The second one is an active an bootable partition labeled dos
to update, issue the command lillo
It might give you a warning that is only for older computers.
The older version (v1) was like this and was located in /boot/grub/menu.lst
GRUB version 2 menu is in grub.cfg in /boot/grub/
To install grub run:
grub-install /dev/sda
IDE Drives: /dev/hda
SATA Drives /dev/sda
root@debian:~# mount
/dev/sda1 on / type ext3 (rw,errors=remountro)
our root parition is /dev/sda, mount is a way to double check
root@debian:~# dd if=/dev/sda of=/root/backup.mbr bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0282292 s, 18.1 kB/s
  1. if = input file
  2. of = output file
  3. bs = block size
  4. count = how many = 1 = one block of 512 bytes
To restore:
dd if=/root/backup.mbr of=/dev/sda bs=512 count=1
You can restore the MBR from a floppy, usb, live cd, etc.

No comments:

Post a Comment