A Sample Bare-Metal Recovery
This example uses pax (emulating tar), gzip, fdisk, lilo, and tomsrtbt to back up and recover a complete Linux system on an (Intel) Toshiba Satellite Pro laptop.
Performing the Backup
As mentioned earlier, I backed up the metadata by running the command:
# fdisk -l >/etc/fdisk-l.txtWe then backed up the
operating system
using pax (emulating tar) to a
Zip drive mounted on /backup:
# cd / ; tar cf - . |gzip -c >/backup/root.tar.gzNow it’s time to blow it up! The following dd command blows away both the lilo boot block and the disk’s partition information. Although the root filesystem is still there, we couldn’t find it if we wanted to!
#dd if=/dev/zero of=/dev/hda bs=512 count=1#rebootInsert system disk in drive Press any key when ready.
Perform the Recovery
As mentioned in the preceding explanation, we will need to boot the system, partition its drives, create the root filesystem, restore the system, and reinstall the boot image.
Boot the system
The first step in recovering this system is to place the tomsrtbt floppy into the floppy drive and press any key. Here’s what it displays while it is booting:
Welcome to tomsrtbt-1.7.134 http://www.toms.net/rb ##### ####### ##O#O## #VVVVV# ## VVV ## # ## # ## ~ # ### . . QQ# ##Q /V\ QQQQQQ# #QQQQQQ // \\ QQQQQQQ# #QQQQQQ /( )\ QQQQQ#######QQQQ ^`~'^ Other distributions tomsrtbt (15 seconds...) boot: Loading zImage.............. Press <RETURN> to see video modes available, <SPACE> to continue or wait 30 secs ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access