Sysresccd-manual-en System software
From SystemRescueCd
This CD aims to provide all the important pieces of software for system administration. This page shows the most important tasks you can execute.
Contents |
[edit] 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 desk.
[edit] Backing up your partition table
sfdisk is a tiny program that allows you to save your partition table. If you delete a partition accidentally, you can try to restore the table. The backup is done into a file. Of course, you must keep this file on a removable media (such as a floppy disk), or on another computer. If your hard disk is damaged, you won't be able to read the backup from the disk itself!
This command allows you to backup the full partition table of your disk HDA:
sfdisk -d /dev/hda > bak-hda
Now, the following command allows you to restore from the file:
sfdisk /dev/hda < bak-hda
Of course, 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.
[edit] 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 connect 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 and SSL encrypted connection with login.
[edit] Archivers
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 p7zip command.
Dar is an archiver like tar. But it's more powerful. Even 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) you want to restore and then proceed 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.
[edit] Clam AntiVirus
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 files of this directory an search for viruses.
Before scanning for virus, you have to update 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 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 any internet connection, you can scan for virus without updating virus definitions. Of course, it's less safe, and only old virus can be detected.
