Sysresccd-manual-en System software
This CD aims to provide all the important pieces of software for system recovery and administration. This page shows the most important tasks.
Backing up the partition table
sfdisk is a tiny program which saves the partition table to a regular file and only takes a few seconds. As an initial step for system recovery before making things worse, do it now! For example:
sfdisk -d /dev/hda > hda.081231.2359.partTable (will make a backup.)
Copy the backup to another hard disk, removable media (thumb disk, floppy or CD) or ftp it to another computer.
cat hda.081231.2359.partTable | sfdisk /dev/hda will restore partition table.
This command is very dangerous, because it overwrites the existing partition table!!!
Before restoring, you should back up the current version, even if it seems to be damaged. This would allow you to undo the restoration.
Do it now!
Backing up the contents of a partition
Partimage (client and server) are provided. Partimage allows you to save an existing partition into an image file. If something goes wrong, you can restore the partition from the image. A semi-text interface is provided, and this should not be very hard to use. You need a partition with a lot of free space in order to store the image file.
Since version 0.2.14 of SysRescCd, two partimage versions are provided:
- The default version is compiled without SSL and without login support. The client is available by typing "partimage", and the server with "partimaged". You should use this client in most cases, and when you want to connect to a partimaged server that does not support SSL.
- The secured version is compiled with SSL and login support. The client is available by typing "partimagessl", and the server with "partimagedssl". You should use this client when you connect a partimaged server that expects an SSL encrypted connection with login.
SystemRescueCd comes with a lot of archive programs. You can use zip/unzip for the ZIP format, and rar/unrar for the RAR format. Even the new 7zip is supported with the
Dar is an archiver similar to tar, but it's more powerful. Even when using compression, dar does not have to read the whole backup to extract one file. This way, if you just want to restore one file from a huge backup, the process will be much faster than using tar. Dar first reads the catalogue (i.e. the contents of the backup), then it goes directly to the location of the saved file(s) which you want to restore and then proceeds to restoration. In particular using slices dar will ask only for the slice(s) containing the file(s) to restore. But you can also restore all files from an archive, dar will then read sequentially without seeking into the file, except for the first and last slice, dar will not ask twice for the same slice.
Clam AntiVirus is a free anti-virus software provided since version 0.2.3 of SystemRescueCd. It provides several important commands:
freshclam. This command updates the virus definitions. Of course, you need to be connected to internet for updating.
clamscan -r /path/to/dir. It scans all the files in this directory and searches for viruses.
Before scanning for viruses, you have to update the virus definitions. Because this is run from a CD-ROM, you may have read-only related problems. That's why you have to specify a read-write directory for definitions. Here is how to update definitions and make a scan:
- Step-01: ensure that you are connected to the internet.
- Step-02: Download the latest virus definitions by running the following commands:
chown clamav:clamav /var/lib/clamav chown clamav:clamav /var/lib/clamav/* freshclam
- Step-03: Mount the partition to be scanned
mkdir -p /mnt/testpart mount /dev/hda1 /mnt/testpart
- Step-05: Perform the scan on the files.
clamscan -r /mnt/testpart
If you really don't have an internet connection, you can scan for viruses without updating the virus definitions. Of course, it's less safe because only the older viruses can be detected.
Graphical Partition Tools
This CD provides a Partition-Magic clone, which aims to be very easy to use, and very powerful. Running this tool is very easy, but you need to have the X.Org graphical environment working. Please refer to the boot process if you don't know how to work in X.Org. You can run GParted by typing this command:
gparted, or from the contextual menu on the desktop.