Mounting UFS partitions in Linux

My desktop machine at work is now running RHEL 4, but before that it ran FreeBSD 4.10 for a number of years and had three hard drives with UFS filesystems. When my box was converted over to Linux, I backed up the critical files on the main hard drive and then reformatted the drive with ext3. The other two hard drives with UFS filesystems sat there collecting dust, which was unfortunate, because I could use the disk space. Today, I decided to mount the UFS partitions and look through the files and see if there’s anything worth keeping, before formatting these drives for Linux and getting myself a whole lot more disk space. Here’s how I did it.

The first task was to build the UFS kernel module, as my kernel did not have UFS support built-in, nor did my install have the UFS kernel module available. Already, having installed the proper kernel-devel RPM a while back, I did the following:

$ uname -r
2.6.9-34.0.2.ELsmp
$ rpm -qa | grep kernel-devel
kernel-devel-2.6.9-34.0.2.EL
$ cd ~/rpm/BUILD/kernel-2.6.9/linux-2.6.9
$ make menuconfig
$ make modules
$ make modules_install
$ depmod
$ sudo modprobe ufs

At this point, I had built the UFS kernel module and loaded it. Now it was time to mount the filesystems.

$ sudo mkdir /mnt/hdc1 /mnt/hdd1
$ sudo mount -t ufs -o ufstype=44bsd,ro /dev/hdc1 /mnt/hdc1
$ sudo mount -t ufs -o ufstype=44bsd,ro /dev/hdd1 /mnt/hdd1

That’s it! I now had read-only access to my two UFS partitions. Now I have to look through these files and see what’s worth keeping.

Non-functioning Alt key in qemu-0.8.2 displayed to X11.app

The Alt key on my US English keyboard going to OS X X11.app going to qemu-0.8.2 (using my own qemu-0.8.2 RHEL 4 package) on my RHEL 4 Linux box is not happening. Instead, this is spewed to the console.

Warning: no scancode found for keysym 310

Strange, since xev sees the keypress just fine:

KeyPress event, serial 24, synthetic NO, window 0x1000001,
    root 0x57, subw 0x0, time 411185488, (11,-16), root:(31,48),
    state 0x0, keycode 66 (keysym 0xffe7, Meta_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

I don’t know why the keysym reported by qemu doesn’t match the keysym reported by xev. I’m guessing that it has something to do with the fact that qemu uses SDL, which probably has its own keymap routines, that are apart from the X11 routines.

Technorati tags: linux, qemu, virtualization, rhel

links for 2006-12-17

Technorati tags: linux, rpm, redhat, usermodelinux

Installing NX Server Free Edition: Workaround for .ssh/config permissions error

In the past 24 hours, I installed NX Free Edition on two Linux machines – one RHEL 4 and one Ubuntu and on both, the installation failed with this message in /usr/NX/var/log/install:

NX> 700 WARNING: Error when trying to connect to NX server, error is:
NX> 700 WARNING: NX> 203 NXSSH running with pid: 28823^M
Bad owner or permissions on /home/marca/.ssh/config^M.
NX> 700 WARNING: nxsetup cannot validate the sanity of the current installation:
NX> 700 WARNING: the current system or NX configuration could be broken.

I tried chmodding ~/.ssh and ~/.ssh/config to be more and less restrictive and could not get the message to go away. What does work however is if I temporarily rename my config file to _config, install NX, and then rename it back.

Hopefully, NoMachine will add this to their FAQs and perhaps see if there’s a bug in the install that should be fixed.

NX is great though. You should definitely check it out if you’re into remote administration and using something like VNC, RDP, or remote X11, which are much slower than NX.

Courier IMAP working on RHEL

Well, after a bit of frustration, I finally got the courier-imap package installed on RHEL and I had the IMAP server running, but I wasn’t able to successfully authenticate with it. Eventually, I realized that I had forgotten to start the courier authdaemon:

sudo /etc/init.d/courier-authlib start

Bam. Then things started working. Duh.

I also had to do two small tweaks to my .fetchmailrc – basically formail and procmail are now in /usr/bin instead of /usr/local/bin.