#FIG 2.1 80 2 1 3 0 1 -1 0 0 21 0.00000 1 0.000 65 149 5 5 65 149 70 149 1 3 0 1 -1 0 0 21 0.00000 1 0.000 65 288 5 5 65 288 70 288 2 1 0 3 -1 0 0 0 0.000 -1 0 0 19 49 859 49 9999 9999 2 1 0 3 -1 0 0 0 0.000 -1 0 0 19 629 859 629 9999 9999 4 0 19 18 0 -1 0 0.00000 4 21 379 39 39 Troubleshooting and Repairing a Linux System 4 0 31 36 0 -1 0 0.00000 4 40 456 79 99 Repairing a Trashed MBR 4 0 16 32 0 -1 0 0.00000 4 38 325 79 159 MS-DOS FDISK /MBR 4 0 17 24 0 -1 0 0.00000 4 29 691 119 194 This handy command overwrites the MBR on the selected drive  4 0 17 24 0 -1 0 0.00000 4 29 704 119 226 with an MS-DOS bootable one (be sure to set MS-DOS partition 4 0 17 24 0 -1 0 0.00000 4 29 669 119 261 as `active'). Use your Linux kernel floppy to get back to sanity. 4 0 16 32 0 -1 0 0.00000 4 38 393 79 299 Using the LILO-saved MBR 4 0 17 24 0 -1 0 0.00000 4 29 214 119 404 old boot record with 4 0 17 24 0 -1 0 0.00000 4 29 614 119 439 dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1 4 0 17 24 0 -1 0 0.00000 4 29 22 119 474 or 4 0 17 24 0 -1 0 0.00000 4 29 613 119 509 dd if=/boot/boot.0800 of=/dev/sda bs=446 count=1 4 0 17 24 0 -1 0 0.00000 4 29 726 119 334 LILO saves old boot sector (446 bytes) in /boot/boot.NNNN, where  4 0 17 24 0 -1 0 0.00000 4 29 724 119 369 NNNN == 0300 for /dev/hda, 0800 for /dev/sda. You can restore the 4 0 17 24 0 -1 0 0.00000 4 29 728 119 544 LILO only makes backup if file doesn't exist; use FORCE-BACKUP 4 0 17 24 0 -1 0 0.00000 4 29 662 119 579 in /etc/lilo.conf to override. Note that some distributions have  4 0 17 24 0 -1 0 0.00000 4 29 473 119 614 /boot/boot.NNNN pre-installed; get rid of it!