Using Toms floppy

From LQWiki
Jump to navigation Jump to search

Using Toms boot disk for MBR

1) Research your /etc/fstab if you don't know your fs and how to use the mount command. Change hda to sda for SCSI or SATA drives.

2) Grab a recent TOM's boot disk www.TOMS.net.

Backup to Floppy

1) Mount a blank floppy disk in a fully booted system. As you are saving a working MBR there is no need to use a rescue floppy at the save stage.

2) Open a terminal and su to root permissions

3) dd if=/dev/hda of=/mnt/floppy/mbr-backup bs=512 count=1 This creates the file mbr-backup at the same time. If it fails to create it, you may need to touch /mnt/floppy/mbr-backup then retry command

4) Test the saved file with dd if=/mnt/floppy/mbr-backup bs=512 count=1 No need for output file (of= ) as we print to screen. It should have some text like grub or lilo, if you have a bootloader in MBR and if not, it should have words like Geom hard disk error

5) If you have 4 primary parts, ie. no logical parts, you are finished. Otherwise you need to save your logical partitions sfdisk -d /dev/hda > /mnt/floppy/part.sfd change hda to sda etc This can go on same floppy

Restore from Floppy WITHOUT TOM's

1) If you can get to your linux using a boot floppy, then after mounting backup floppy its dd if=/mnt/floppy/mbr-backup of=/dev/hda bs=512 count=1

2) PLEASE test as per save (4) above to make sure you have a good copy. Do at your own risk etc.

Restore from Floppy WITH TOM's

1) Change bios boot order to floppy before all other drives.

2) Boot up Tom's

3) Login as root with password of xxxx

4) Remove Tom's and insert mbr floppy and mount it with mount -t msdos /dev/fd0 /mnt/floppy or mount -t ext2 /dev/fd0 /mnt/floppy

5) dd if=/mnt/floppy of=/dev/hda bs=512 count =1

and remember warnings

6) If you had logical partitions to save and need to restore its sfdisk /dev/hda < /mnt/floppy/part.sfd

Change hda to sda etc

External links