Recovering from a bad initrd image

When Linux is booted by the boot loader, it will first load the kernel image (usually /boot/vmlinuz) into memory, followed by the initial boot ramdisk (usually /boot/initrd). If for some reason the initrd image has been corrupted, booting may fail. The following procedure can be used to re-generate the initrd image.

  1. Make sure the BIOS is set to boot from the optical drive
  2. Insert the OpenSUSE install DVD into the optical drive.
  3. Boot the machine
  4. Select the menu option “Rescue System”
  5. When prompted to login, type “root”
  6. Mount the Linux root partition, typically something like “mount -t ext3 /dev/sda1 /mnt”
  7. If the Linux /boot area is on a separate partition, also mount that into the root partition, f.ex. “mount -t ext3 /dev/sda2 /mnt/boot”
  8. Bind the rescue system’s /dev to the mounted root filesystem with “mount –bind /dev /mnt/dev” – this will make sure all your device nodes are correct
  9. Chroot to the mounted root filesystem with “chroot /mnt”
  10. Mount proc and sys: “mount /proc” and “mount /sys”
  11. Re-generate initrd image with “mkinitrd”
  12. Remove DVD and reboot
Posted in Installation, OpenSUSE 11.1 | Leave a comment

Changing GDM theme in OpenSUSE 11.1

OpenSUSE 11.1 ships with GDM 2.24.x which is a not yet feature-complete rewrite of the original GDM codebase. One consequence of this is that it is no longer possible to customize the login screen using gdmsetup. It is, however, still possible to customize the background image, icon theme and Gtk theme by editing gconf settings.

The properties for GDM are defined in the distribution-specific gconf settings in /etc/gconf/gconf.xml.vendor/%gconf-tree.xml.

To change the background image, look for:

<dir entry=”background”>

<entry name=”picture_filename” mtime=”1241629069″ type=”string”>

<stringvalue>/usr/share/backgrounds/glass/glass.xml</stringvalue>

</entry>

</dir>

Change the string value to the location of the background image you want to use.  This can be either a JPG file or an XML file in the Gnome background slideshow XML format (which does not seem to be documented).

The icon theme and Gtk theme can be similarly modified by editing the properties “icon_theme” and “gtk_theme” respectively.

Posted in Configuration, OpenSUSE 11.1 | Leave a comment

OpenOffice troubles

Since I upgraded my T60 from OpenSUSE 10.2 to 10.3, I have been unable to start OpenOffice. No matter what I did the OpenSUSE customized splash screen appeared, but the progress bar never moved. Starting OO as root, it actually managed to freeze X, requiring me to bail out of X with Ctrl+Alt+Backspace.

To debug the problem I tried stracing oowriter without much luck. Around the net people reported various similar problems, but none of the suggested solutions worked. Eventually I found a bug report in Novell’s Bugzilla where Martin Tessun explained, that with the ATI Radeon fglrx driver, LD_LIBRARY_PATH must be set to point to /usr/X11R6/lib:/usr/X11R6/lib64. True enough, after exporting LD_LIBRARY_PATH with these paths, OO started without a hitch.

To make the change permanent, I added the export statement to /etc/profile.local.

Posted in OpenSUSE 10.3 | Comments Off

NTP synchronization of the system clock

Update: I realised that the recipe below will not necessarily ensure the NTP service is started on booting and in the process of fixing that, I discovered that Yast actually has a nice GUI for setting up NTP. So, instead of step 2 and 3 below, open up Yast and go to Network Services > NTP Client, add the servers found in step 1 and be sure to select “During boot” under “Automatically start NTP daemon”. Next click Finish and you are done!

It takes just 5 minutes to set up your OpenSUSE box up to synchronize its clock with internet time servers, ensuring that you never have to manually adjust the time again. Internet time servers use a protocol aptly named Network Time Protocol (NTP). In a default installation of OpenSUSE you should already have the software needed to communicate with NTP servers. You can check this by issuing the following command as root in a console:
rpm -q xntp
If installed, you should see the version number printed. If not, install the package using YAST2 or use this command (on OpenSUSE 10.2):
zypper install xntp

Step 1 – finding appropriate time servers

You ISP may provide a time server for you to use. This should give you the most accurate synchronization, as the time server should be close to you in terms of network distance. If your ISP does not provide a time server, you can use the pool of servers offered by the pool.ntp.org project. They maintain a list of public time servers and use DNS to distribute the load among the servers. To find the time servers appropriate for you, go to their main page og select the region you are in from the list on the right. Next, see if you can find your own country listed. You should end up with a list of servers something like this:
server 1.dk.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org

Step 2 – setting up the NTP daemon

As root, open /etc/ntp.conf in your favourite editor and paste the server list found above into the file under the section labelled “Outside source of time synchronization”. Save the file.

Step 3 – restarting NTP

Next, still as root, run the command:
service ntp restart

If your clock was out of sync, you should see it change. From now on, the NTP daemon will periodically contact the time servers and adjust your system clock so it is always accurate.

Posted in Configuration | Leave a comment

Installing ATI graphics drivers on OpenSUSE 10.2

To get 3D graphics acceleration on ATI Radeon X1xxx series graphics cards, ATI’s proprietary driver must be installed. Ideally, it should be a simple exercise: download the driver from ATI and follow their installation instructions. However, using the automated installer, I got error messages saying file atiogl_a_dri.so could not be found. Installation reported successful completion, but although the fglrx driver was installed and everything was OK in 2D, there was no 3D acceleration.

The correct way to install the ATI driver is documented in the ATI HOWTO. Basically, you have to build a distribution-specific package and then install that using rpm. At the end you should have full 3D acceleration as witnessed by running fglrxinfo:

ckm@zeus:~> fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1400
OpenGL version string: 2.0.6400 (8.35.5)

Check that you get the same result both as root and a normal user. If you get permission problems with a normal user, edit /etc/X11/xorg.conf, find the section labelled “DRI” and change the Mode line to:

Mode 0666

Save the file and restart X.

Posted in Hardware Devices, Installation | 2 Comments