Archive for August, 2009

Had a weird problem come up today. I reboot one of our systems and it would not come up. Actually, it apparently was working, just ridiculously slowly. I thought it had hung at the Starting udev line, but letting it run for an hour, got it a few lines further down. Nonetheless, something was definitely wrong. I tried my usual ideas of adding apm=off acpi=off noapci noapmd, but that didn’t help. It seemed like the disk was bad, but not with the usual messages that I would get.

I brought out a RHEL installation disk and boot into rescue mode. I did get an error about it not being able to find all of the current linux installations. I then went into the bios and found that this computer was set up to have its sata disks act like ide ones. I’m pretty sure that I did this when I originally installed because it wouldn’t recognize the drives as ahci. However, I’m also sure that they should be ahci, which is newer, instead of acting like the old ide. So I changed this to ahci, even though I was sure this was going to cause more problems. (I was right about the last part.)

I then again, did a linux rescue. For some reason, I no longer got the error about not finding all my linux installations. I could run chroot /mnt/sysimage to get my installation mounted properly. Then, I copied /etc/modules.conf to /etc/modules.conf.SAVE. I knew that I needed to change the modules that were loaded to reflect ahci drives instead of ide ones. So I edited this line:

alias scsi_hostadapter1 ata_piix

to

alias scsi_hostadapter1 ahci

This would work for after the kernel is loaded, but I needed to make sure the ahci module was loaded at boot. For this, I needed to make a new initrd image. I used the following:

mkinitrc --preload=ahci \\
/boot/initrd-2.6.9-89.0.3.ELhugemem.mary.img \\
2.6.9-89.0.3.ELhugemem

Then, I edited /etc/grub.conf to take this initrd file instead of the one it had. And lastly, to make sure it was using the proper disk. For some reason, my disk devices would change from /dev/sda and /dev/sdb to /dev/sdb and /dev/sdc. Instead of putting the device names in /etc/grub.conf, I used the labels.

kernel /vmlinuz-2.6.9-89.0.3.ELhugemem ro root=/dev/sda3 rhgb quiet

I also used the labels in /etc/fstab.

LABEL=/1                   /                       ext3    defaults        1 1
LABEL=/boot	        /boot                   ext3    defaults        1 2

After I reboot and everything worked, I renamed the initrd file without the mary bit, thus overwriting the original.

One thing I was worried about was whether I would have to do this each time I updated the kernel. Fortunately, there was a kernel update ready, so I installed it. The initrd file that came in worked perfectly. I didn’t have to do anything special.

I had to reinstall a computer with XP. It would boot off the cd ok, but then after the “Setup is inspecting your computer’s hardware configuration” message came up, it wouldn’t do anything. It was just a blank screen. I ran memtest to check the memory and it all came up clean. I did notice that the light for hard drive activity would be constantly lit when the screen was blank. However, I had no problem at all in installing linux on this computer. So, I used a live cd of Damn Small Linux (DSL) to boot. Then I ran the following command:

# sudo fdisk /dev/hda

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Command (m for help): w

After this, the windows installation worked fine.