|
|
System Rescue CD
By Jay Fougere
Expert Author
Article Date: 2010-03-17
One of the most useful rescue disks for both Windows and Linux systems that I have found is SystemRescueCD (SRCD); A free (as in beer and freedom!) "live" Linux distribution that allows for booting on either a 32-bit or 64-bit Intel/AMD system. SRCD is based on my favorite Linux distribution, Gentoo.
I like to run SRCD from a USB drive, however there is no reason you cannot burn it to CD-ROM. In fact, for older systems, burning to a disk might be required in order to boot the system. Installing on a USB stick is simple and involves using the same *.iso as if you were going to burn to CD, so you will not waste time with the download regardless of which method you want to try. Also, the distribution is only about 250MB, thus even on moderate broadband you will be able to download the ISO image in a reasonable amount of time.
Once you have downloaded the ISO you can have it ready to run quickly by burning the image to a CD-ROM. This can be done under virtually any operating system, though I leave that as an exercise for the reader.
Installing SRCD to a USB stick offers a couple advantages if you are using SRCD on systems new enough to boot from USB. First of all, you have a writable storage device once you boot into the system so that you don't have to have another device to backup files. This is especially handy if you have a network card that doesn't work with SRCD or you just don't feel like setting up networking and remote shares. Also, since by default you are installing to a FAT partition on the USB device, you can copy files from Windows prior to booting with the device (ie. drivers, virus definitions, etc...). Lastly, you can boot machines that do not have a CD-ROM drive or on which the CD-ROM drive is malfunctioning. An added bonus is how fast SRCD will boot from a USB flash drive compared to booting from a CD-ROM.
Full instructions for installing SRCD to a USB drive from either Windows or Linux can be found here.
To boot into a 32-bit environment at boot time, do nothing as this is the default. To boot into a 64-bit environment, simply type 'rescue64' at the ISOLinux boot prompt.
So what can you do with it once you have it downloaded and ready to run? You are only limited by your imagination and your "Mad Skillz".
You can mount Windows and Linux filesystems in read and write modes so that you can copy files to or from your disks. With a recognized network card (most popular cards are auto-detected) you can copy files to/from NFS/SMB/CIFS shares. If you are going to be mounting NTFS filesystems, be sure to read up on NTFS3G. You can also partition disks, not only with command line tools such as fdisk, but with a graphical interface such as gparted.
gparted is not the only graphical tool on SRCD -- a fully functional desktop including web browser are available via X11,XFCE and Firefox. Not sure if a package you require is included with the distribution? A complete package list can be found here.
On Linux systems, you can "chroot" into your system in order to do repairs. You can find out more here. The sky really is the limit for Linux system repairs. SRCD even includes tools for mounting LVM and RAID volumes on Linux systems.
A quick and dirty chroot follows:
1). Determine the disk partition your system lives on (if you don't already know -- probably something like /dev/sda1 or /dev/hda1):
#fdisk -l
Disk /dev/hda: 32.2 GB, 32212254720 bytes 255 heads, 63 sectors/track, 3916 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hda1 * 1 3569 28667961 83 Linux /dev/hda2 3570 3916 2787277+ 82 Linux swap / Solaris
2). In the above example, /dev/hda1 is the one, so we will need to mount it and a few pseudo file systems that certain programs rely on, just to be safe:
#mkdir /mnt/system #mount /dev/hda1 /mnt/system #mount -t proc proc /mnt/system/proc #mount -t sysfs sys /mnt/system/sys #mount -o bind /dev /mnt/system/dev #mount -t devpts devpts /mnt/system/dev/pts
Note: Those last 4 are optional, but many programs rely on one or more of them.
3). chroot into your system:
#chroot /mnt/system
If you get an error about the wrong shell (SRCD uses ZSH by default but most Linux distros use BASH by default), you can export your shell and try again:
#export SHELL=/bin/bash #chroot /mnt/system
That is it -- you are now 'root' in your old system! Enjoy!
One really cool utility on the disk is chntpw. As you might suspect from the name, this little utility allows you to reset the password for any local user account on a Windows NT based system (NT, 2000, XP, Vista, 7), including the administrator account.
Have you got a Windows machine that is infected with some almost impossible to get rid of virus? SRCD includes clamav and if you get networking running, you can run freshclam, which will update the virus database to the very latest. With clamav you can not only detect viruses, but you can remove them as they will not be "protected" by Windows.
As is the case with most Unix systems, if you do not know the various switches and arguments for a command, you can run 'man ' where is the command you want information on.
I could go on and on but the best way to see if SRCD is right for you is to simply download it and use it. Being that it is a live distribution you can simply reboot to any machine you run it on and boot from the hard disk (assuming you made no changes to the hard disk of course!) -- it will be as if you never booted SRCD.
I hope you enjoyed this article.
About the Author: Jay Fougere is the IT manager for the iEntry network. He also writes occasional articles. If you have any IT questions, please direct them to Jay@ientry.com.
|
|