- BackUP the MBR
the LILO configuration is stored in /etc/lilo.conf
Explanation: –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 bootThere 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:
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 root@debian:~#
- if = input file
- of = output file
- bs = block size
- count = how many = 1 = one block of 512 bytes
dd if=/root/backup.mbr of=/dev/sda bs=512 count=1You can restore the MBR from a floppy, usb, live cd, etc.