LWN.net Logo

Advertisement

GStreamer, Embedded Linux, Android, VoD, Smooth Streaming, DRM, RTSP, HEVC, PulseAudio, OpenGL. Register now to attend.

Advertise here

Rescue and recovery distributions

May 20, 2009

This article was contributed by Ivan Jelic

According to the FSF's free software definition, free software gives us the "freedom to redistribute copies so you can help your neighbor". Rescuing your neighbor from their computer problems is another good way of using free software. In this article we look at several distributions that might help you rescue a system for yourself or your neighbors.

Parted Magic 4

Purposely or by accident, Parted Magic happens to have a similar name as one of the best known proprietary disk partitioning tools. Parted Magic fits on a small, 73M, CD. One could even use that old, small USB stick you have lying around.

The default boot option copies the system to RAM, allowing optical devices to be used if necessary. If the system booting Parted Magic has between 128 and 512 MB of RAM, the creator suggests booting from removable media. The "Live with low RAM settings" option applies to the computers with less RAM than previously mentioned, so the system starts only TWM and Gparted by default. The rest of the boot options mainly relate to the graphical setup in cases where the system has an old/exotic graphical subsystem, usable only with Xvesa. Detailed explanations of all boot options are available by pressing F1.

Parted Magic 4 uses LXDE by default. The system starts without automatic network setup, so the connection needs to be initiated by the user. The "start network" GUI does this job, offering a wizard like setup for wired and wireless connections. Gparted is available from the desktop, but the full arsenal of PM's tools is visible in "System tools" menu section.

Besides Gparted 0.4.4, with full common GNU/Linux and FAT/NTFS filesystem (including EXT4) support, other items in the System tools menu make Parted Magic a serious contender for the data rescue and recovery swiss army knife title. Partition and disk cloning are made possible with G4L and Partition Image; data synchronization is taken care of by Grsync (rsync is available from the shell, of course); and ISO editing by is done by ISO Master. The Secure Erase capability of ATA drives is exploited by Erase disk tool. Testdisk and Photorec, particularly useful recovery tools, are also part of Parted Magic.

Parted Magic also finds room for Firefox, Xchat, as well as Gftp and Lftp, which are especially useful for FTPS connections.

SystemRescueCD

SystemRescueCD is aptly named. Rescuing the system with this distribution is not as user friendly as PM, but considering the target audience, a GUI is not that big an advantage.

Booting SystemRescueCD is relatively simple since it doesn't offer predefined options. The system will boot to a shell, with support for the common GNU/Linux filesystems, including EXT4 and BRTFS, and FAT/NTFS. The welcome message gives starting pointers about the available shell tools, network setup interface for wired and wireless connections and X server startup. After the "wizard" X config tool enables the X server (Xvesa is available as na option - "startx" might work too), JWM starts.

SystemRescueCD offers basic filesystem tools together with Gparted, Partimage and Testdisk. In addition to the recovery tools, SRCD provides Firefox and Dillo browsers, Xfburn, Xarchiver, Geany editor, Epdfviewer, Gvim and other general purpose applications. Several looks and searches didn't reveal any hidden graphical file manager, so Midnight commander is the only solution in this context.

Clonezilla live

Parted Magic and SystemRescueCD are intended to be multipurpose solutions, but Clonezilla live is made with only one purpose: to make Clonezilla available on a live system. Beside Clonezilla live, Clonezilla SE is recommended as a solution for massive deployment, which, according to official website "can clone many (40 plus!) computers simultaneously". Since we don't have 40 machines at one place to test it, this article is focused on Clonezilla Live.

In general, Clonezilla live allows the user to clone partition(s) or entire disks, and store images locally or to another machine through the network, using SSH, Samba, or NFS. The list of supported filesystems contains ext2, ext3, reiserfs, xfs, jfs, NTFS, FAT, and HFS+, with EXT4 in a testing distribution branch. Clonezilla provides it's functionality through ncurses based dialogs in a wizard style. The only problem which occured during a routine disk-to-image clone test was the unavailability of any option for going backward in the process. The only option in situations like that is to quit and start over again.

RIPLinuX

Recovery Is Possible LinuX closes this round of recovery and restore distributions. According to our testing experience, it's quite a nice closing.

According to the boot options, RIPLinuX should be able to start an X server automatically, but that option failed for some reason during the test. Startx solved the problem though, and made the Fluxbox desktop available.

The main part of the RIPLinuX graphical interface is the rich Fluxbox menu which makes all of the distribution's capabilities available to the user. The menu is organized in a way that links to documentation about the specific applications that are available right next to them, with a note about its online or offline nature. The choice of rescue and recovery tools which are shipped with RIPLinux is very similar to Parted Magic, with an addition of the Erase disk tool.

It seems that RIPLinuX developers managed to reach the absolute limit of its 92MB image, with plenty of general purpose applications included in the system. Beside Firefox 3.5b4, three text editors, two image viewers, GUI file managers and FTP clients, even Xine and XMMS found their way into RIPLinuX live. Even Gaim is included in case anyone wants use instant messaging from RIPLinuX.

Can there be only one?

With the exception of Clonezilla, which is strictly focused on disk/partition cloning, the rest of distributions share the same purpose. Based on their showing during the tests, Parted Magic and RIPLinuX offered almost the same functionality, with a different look and feel. SystemRescueCD seems to lack the tools the other two have, which puts it behind them.

Given that the user is unlikely to watch videos during rescue and recovery, the choice between Parted Magic and RIPLinuX is strictly personal.


(Log in to post comments)

Rescue and recovery distributions

Posted May 21, 2009 4:50 UTC (Thu) by pabs (subscriber, #43278) [Link]

> The Secure Erase capability of ATA drives is exploited by Erase disk tool.

I can't find this tool in their list of programs:

http://partedmagic.com/programs.html

Anyone know what the homepage for that tool is?

If the article is wrong, is there a Linux tool that can issue this SE ATA command to disks?

Rescue and recovery distributions

Posted May 21, 2009 4:57 UTC (Thu) by pabs (subscriber, #43278) [Link]

> is there a Linux tool that can issue this SE ATA command to disks?

Found the answer to my own question:

http://howflow.com/tricks/secure_erase_how_to_erase_a_har...

# hdparm -I /dev/sda | grep -i erase
# hdparm --security-erase /dev/sda
# hdparm --security-erase-enhanced /dev/sda

Rescue and recovery distributions

Posted May 21, 2009 5:00 UTC (Thu) by pabs (subscriber, #43278) [Link]

Looks like you need the running Linux kernel to be built with this:

CONFIG_IDE_TASK_IOCTL=y

http://freshmeat.net/projects/hdparm/comments

PXE is awesome

Posted May 21, 2009 6:40 UTC (Thu) by njs (guest, #40338) [Link]

Parted Magic has one huge advantage over other recovery distributions I've found -- it has a PXE boot option. That means that you can toss it on your netboot server and then whenever you need it it's just a reboot away. Much more convenient than reformatting flash drives (esp. since when you need it, you may not *have* a computer that can conveniently reformat a flash drive).

I used to think netboot was something exotic and scary, but it turns out that on a home network running dnsmasq, setting it up literally consists of uncommenting two lines in a config file.

It'd be nice if there were a x86-64 version available, though.

PXE is awesome

Posted May 21, 2009 12:18 UTC (Thu) by Velmont (guest, #46433) [Link]

Thank you for this information!

I'll use it at work then. I'm using dnsmasq there, and PXE-booting would be really nice.

PXE is awesome

Posted May 21, 2009 15:10 UTC (Thu) by nix (subscriber, #2304) [Link]

I'm not sure what x86-64 would really bring here. Extra address space is possibly useful for fscking huge disks, but other than that... extra speed? What for? You're going to be disk-bound!

PXE is awesome

Posted May 21, 2009 19:48 UTC (Thu) by njs (guest, #40338) [Link]

Right, should have explained... If you're recovering an x86-64 machine, it's very useful to be able to chroot into the recovery partition and run the programs there. (Last time this came up for me, I just needed to fix a fubared grub install, so the system's filesystem was fine, but I needed to make sure that the version of grub I was installing in the MBR matched the version of grub on the disk.) Only a 64-bit kernel can run 64-bit binaries.

PXE is awesome

Posted May 21, 2009 21:32 UTC (Thu) by nix (subscriber, #2304) [Link]

Well, yes, but as a 64-bit kernel can also run 32-bit binaries, I still
can't see any benefit to the 64-bit recovery tools. What can you do with
them that you can't with 32-bit tools? Do they have any benefit?

PXE is awesome

Posted May 21, 2009 21:53 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

that depends on the tools. if the tool could benifit from lots of memory (like say fsck) then having a 64 bit version is better.

if the tool spends almost all it's time waiting for the disk it may not benifit.

if the tool does a lot of computation, it can benifit from the additional registers abailable to 64 bit apps

PXE is awesome

Posted May 21, 2009 23:47 UTC (Thu) by nix (subscriber, #2304) [Link]

Yes, I now. But most repair tools don't benefit from heaps of memory nor
from the extra registers in any detectable manner: they're I/O bound. Even
fsck doesn't benefit enormously: if you've got an fs big enough to need
>4Gb RAM, you pretty much have to be using ext4, where fsck uses much less
memory anyway because of flexbg (IIRC).

PXE is awesome

Posted May 21, 2009 23:05 UTC (Thu) by njs (guest, #40338) [Link]

Not that I know of. But Parted Magic only offers a 32-bit kernel.

PXE is awesome

Posted May 21, 2009 17:28 UTC (Thu) by jello (subscriber, #6083) [Link]

SystemRescueCD also has PXE boot available, it's quite handy. It has an x86_64 kernel available too (just specify rescue64).

PXE is awesome

Posted May 21, 2009 23:42 UTC (Thu) by njs (guest, #40338) [Link]

But -- if I understand correctly -- using SystemRescueCD's PXE boot requires that you either:
-- have SystemRescueCD boot media and a spare computer to use as the boot host, or
-- have an NFS server set up and be willing to extract the relevant files into it by hand (there's no official documentation)

For Parted Magic, you can just download the PXE version, drop it in /var/lib/tftpboot, and add an entry to your pxelinux.cfg/default -- it loads the whole root filesystem as its initrd. That's easy enough that it's worth throwing it in there and leaving it "just in case". I don't think one can say the same about deploying NFS...

PXE is awesome

Posted May 22, 2009 2:59 UTC (Fri) by jello (subscriber, #6083) [Link]

I have it fetch the sysrcd.dat via HTTP, which isn't as much trouble as NFS, but having it all in the initrd does sound nicer. I have it all working already, so obviously there's no reason to change though, also I couldn't find anything saying if Parted Magic supports using a serial console, which I need.

PXE is awesome

Posted May 28, 2009 19:10 UTC (Thu) by sciurus (subscriber, #58832) [Link]

It's not that complicated. All you need is a tftp server.

1) Download the sysresccd cd image.
2) Extract the kernel (rescuecd), initrd (initram.igz), filesystem (sysrcd.dat), and checksum (sysrcd.md5) to a directory under your tftp root. Let's call that directory sysrcd.
3) Add the following to your pxelinux configuration.

label sysrcd
menu label Start SystemRescueCD
kernel sysrcd/rescuecd
append initrd=sysrcd/initram.igz boottftp=tftp://your.ip.address/sysrcd/sysrcd.dat

PXE is awesome

Posted May 22, 2009 2:00 UTC (Fri) by tzafrir (subscriber, #11501) [Link]

RIP is a single initrd (besides the kernel) and as such simple to set up for PXE boot. The home page inlcudes a "PXE" tarball.

PXE is awesome

Posted May 22, 2009 5:50 UTC (Fri) by njs (guest, #40338) [Link]

Wow, I'm a dork -- I double-checked its website before posting my original comment, but somehow missed that. Then when I saw your comment, I went to go drop it on my server too, and discovered that, uh, I already did that 6 months ago...

And it has a 64-bit kernel, score! Thanks :-)

Rescue and recovery distributions

Posted May 28, 2009 19:40 UTC (Thu) by sciurus (subscriber, #58832) [Link]

I need to check out RIP, since i haven't used it before. I have tried the others and became a huge fan of SystemRescue CD. It includes a large amount of software, and it's easy to customize by adding or removing software. I keep a version with the development tools and all graphical applications removed on my susb stick. That customization significantly reduced the size of the system, and installing it to a usb stick was straightforward. There are a great set of boot options; I find the one for autorunning a script when it boots to be very handy. There's great documentation on most aspects of the system. Development is steady, and the developers listen to feedback on the forums.

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds