July 25, 2005

Graphical RPM Package Management

The system-config-packages graphical utility can be used for RPM package management. It allows for the installation and removal of RPM packages. When installing RPM packages the default will prompt for a specific CD to install the RPM package from. Trying to install several RPM packages using CD's becomes cumbersome and sometimes requires that CD's be inserted into the CD-ROM drive many times. There are several options that can change the default installation source tree. These options are --tree= and --isodir=.

The --isodir= option is used to specify the directory that contains the iso images.

The --tree= option is used to specify the directory that contains the contents from the installation CD's.
NOTE: In order for the --tree option to work properly the .discinfo file must be copied from one of the installation media CD's into the installation source tree directory. If the .discinfo file does not exist in the installation source tree directory, error messages will be displayed about an improper installation source directory.

An example:
sytem-config-packages --tree=/var/ftp/pub

Posted by christec at 10:21 AM | Comments (0)

May 19, 2005

SELinux relabeling files

Under Red Hat Enterprise Linux 4 or Fedora Core 3 when SELinux is disabled all files that are created do not contain any security information. When SELinux is enabled, these files which are missing the "security information" or security context will not function correctly. One method to quickly relabel all files based on default contexts is to use the touch /.autorelabel command. This creates an empty file that will be used by the rc.sysinit script to relabel all files when the system is rebooted.

Posted by christec at 11:21 AM | Comments (0)

March 08, 2005

Partition Table Recovery using sfdisk

Before modifying a device's partition table create a file that contains a list of the current partitions. If for some reason there's a problem or the original partition table needs to be recovered (before modification) this file can become invaluable.

Create the file using sfdisk and redirect it's output to a file.
sfdisk -d /dev/hda > hda_partitions.pt

To restore the partition table
sfdisk /dev/hda < hda_partitions.pt

Posted by christec at 03:42 PM | Comments (0)