Issue #4 February 2005

Tips & Tricks

Red Hat's customer service team receives technical support questions from users all over the world. As they are received, Red Hat technicians add the questions and answers to the Red Hat Knowledgebase on a daily basis. Individuals with a redhat.com login are granted limited access. Red Hat Enterprise Linux subscribers are granted full access — with expanded categories and advanced search capabilities. Every month, Red Hat Magazine offers a preview into the Red Hat Knowledgebase by highlighting some of the most recent entries.

This month's Tips & Tricks provide helpful information to Enterprise Linux 4 users and administrators.

Tips from RHCEs

Can the package management tool use the local disk instead of CDs to find packages?

The system tool called system-config-packages (System Settings -> Add/Remove Applications) allows for package addition and removal via a graphical interface.  In its normal operation, it prompts for packages from one of the installation CD, which can be inconvenient.  Many people might find that it's better to copy all the packages from the four distribution CDs (or from ISO files) onto the local system.  This way there's no looking for and shuffling of CDs when you want to add packages.  For example, make the local repository under /data/rhel3asu4 using the following steps:

mkdir -p /data/rhel3asu4 
 
mount /mnt/cdrom 
cp -a /mnt/cdrom /data/rhel3asu4/ 
cp  /mnt/cdrom/.discinfo /data/rhel3asu4/
umount /mnt/cdrom 
find . -name TRANS.TBL -exec rm -f {} \; 
(repeat for each disc, except you only want .discinfo from disc 1)

Having done that, the following command line option allows the packaging tool to find packages on the local disk (the command might be redhat-config-packages on older systems):

system-config-packages --tree=/data/rhel3asu4/ 

Points to note:

  • There is a bug in redhat-config-packages prior to Enterprise Linux 3 Update 4. If you don't already have redhat-config-packages-1.2.9.2-1, then you need to update. Refer to Bugzilla 116713 for details.
  • Don't do this using the original Enterprise Linux 3 media set because there have been so many packages updated since October 2003 when it was released. It is suggested that you use Enterprise Linux Update 4 media which can be downloaded from Red Hat Network.
  • This same behavior can be done directly from ISO files if that is preferred; use the command line option--isodir instead of --tree.
  • While using this method is better than using CD, it is still not not as good as using Red Hat Network because RHN ensures you always get the latest version of a package.

Why does Red Hat Enterprise Linux 4 not forward X11 Connections?

By default, Red Hat Enterprise Linux 4 is not configured to allow requests for X11 forwarding. When connecting to an SSH server you must specify the -X or -Y option on the command line as per the following example:

ssh -X username@hostname

Alternatively, you can omit the command line option if you enable the ForwardX11 option in your ~/.ssh/config

The .ssh directory exists in the home directory of the user that is attempting to connect to the remote server. When you attempt to connect to a remote server the .ssh directory is created automatically.

In the .ssh directory, create a file called config. This file may already exist, if so, append the following line:

ForwardX11 yes

Now when connecting to the remote SSH server as this user, there is no need to specify any additional flags. The connections forward X11 session by default.

The new Nautilus opens a new window every time I click a folder. How can I change it back to the old behavior?

The new Nautilus uses a spatial mode, where each folder that is clicked on opens a new folder. Many people believe that this is an improvement in usability while others do not like the way that the new Nautilus works.

It is easy to revert Nautilus back to its old "Browser mode" by issuing the command below as the current user:

gconftool-2 --type bool --set /apps/nautilus/preferences/always_use_browser true

You may have to log out, then back in again for the changes to take effect.

To change this back to its original behavior issue the command:

gconftool-2 --type bool --set /apps/nautilus/preferences/always_use_browser false

Nautilus can be further customized by using the "Configuration Editor" in the System Tools menu.

I see a (U) after some modules in a kernel oops on Red Hat Enterprise Linux 4, what does this mean?

The Red Hat Enterprise Linux 4 kernel uses digital signatures on all the kernel modules that come with the kernel RPM. These signatures are checked during the loading of kernel modules and if the signature is not present, the module will get an (U) printed after it's name in oops output.

This technology allows Red Hat support to better respond to customer issues regarding kernel oopses but otherwise imposes no restrictions whatsoever.

If you see a module that should come from the kernel RPM (such as the e1000 Ethernet driver) but that still is marked with (U), then you are not using the driver that Red Hat originally shipped. This can happen if you (or the OEM you bought your pre-installed Red Hat Enterprise Linux 4 system from) used a driver disk or the DKMS tool to install a modified driver.

How do I view my initrd file in Red Hat Enterprise Linux 4?

The initrd file is a compressed cpio archive of a temporary root filesystem. To view the contents of the file, copy it to a directory and name it with the .gz file extension:

cp /boot/initrd-<version>.img /tmp/initrd-<version>.gz

Renaming the file to have a .gz extension allows the file to to be decompressed with gzip. Decompress the file with the following command:

gunzip initrd-<version>.gz

To view the file it must be extracted using the cpio command:

mkdir initrd
cd initrd
cpio -cid -I ../initrd-<version>

Then use the tree command to view the contents:

.
|-- bin
| |-- hotplug -> /sbin/nash
| |-- insmod
| |-- lvm
| |-- modprobe -> /sbin/nash
| |-- nash
| |-- udev
| `-- udevstart -> udev
|-- dev
| |-- console
| |-- null

| |-- ram
| |-- systty
| |-- tty1
| |-- tty2
| |-- tty3
| `-- tty4
|-- etc
| |-- lvm
| | `-- lvm.conf
| `-- udev
| `-- udev.conf
|-- init
|-- lib
| |-- dm-mirror.ko
| |-- dm-mod.ko
| |-- dm-snapshot.ko
| |-- dm-zero.ko
| |-- ext3.ko
| `-- jbd.ko
|-- loopfs
|-- proc
|-- sbin -> bin
|-- sys
`-- sysroot

11 directories, 24 files

The initrd file has a nash script that is used to load kernel modules. View the script with the command cat init and see what modules are loaded:

#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounted /proc filesystem
echo Mounting sysfs
mount -t sysfs none /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs none /dev
mknod /dev/console c 5 1
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mkdir /dev/pts
mkdir /dev/shm
echo Starting udev
/sbin/udevstart
echo -n "/sbin/hotplug" > /proc/sys/kernel/hotplug
echo "Loading dm-mod.ko module"
insmod /lib/dm-mod.ko
echo "Loading jbd.ko module"
insmod /lib/jbd.ko
echo "Loading ext3.ko module"
insmod /lib/ext3.ko
echo "Loading dm-mirror.ko module"
insmod /lib/dm-mirror.ko
echo "Loading dm-zero.ko module"
insmod /lib/dm-zero.ko
echo "Loading dm-snapshot.ko module"
insmod /lib/dm-snapshot.ko
/sbin/udevstart
echo Making device-mapper control node
mkdmnod
echo Scanning logical volumes
lvm vgscan
echo Activating logical volumes
lvm vgchange -ay
echo Making device nodes
lvm vgmknodes
echo Creating root device
mkrootdev /dev/root
umount /sys
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
mount -t tmpfs --bind /dev /sysroot/dev
echo Switching to new root
switchroot /sysroot
umount /initrd/dev

How do I change the location of where Firefox, the web browser, downloads files?

Firefox is the default web browser in Red Hat Enterprise Linux 4. To change the default location of where Firefox downloads files, use the following instructions:

  1. Open the browser and select Edit -> Preference from the pull-down menu
  2. Select Downloads from the left sided menu From these options you can configure where downloaded files are saved by default or choose to be prompted to determine where to save the file each time.

This article is protected by the Open Publication License, V1.0 or later. Copyright © 2004 by Red Hat, Inc.