I've been using Linux/Unix for many years. I've always had a strong interest in technology in general and computing specifically.

These are my opinions. Opinions are like noses, everyone has one, and they all smell.

Enjoy your visit.
June 2009
« May   Jul »

Moving CentOS to new hardware

I’ve been working on a customers system, upgrading the motherboard and memory for better performance and reliability. We replaced an MSI motherboard with a SuperMicro Server board. When I tried to boot up the system after installing the new hardware, I got the following message in the screen.

uncompressing linux
OK booting the kernel
Red Hat nash version starting
Ext3-fs: unable to read superblock
mount error 22 mounting ext3
mount error 2 now mounting none
switchroot: mount failed 22
umount /initrd/dev failed 2
Kernel panic not syncing
Attempted to kill init

It’s been a while since I had issues like this. So I went looking through Google for answers. Isn’t that what everyone does these days? Everything search showed seemed to indicate a problem with the the raid. So I tried to look for a problem with the raid partitions. First I used Knoppix. I found a web site Recover Data From RAID1 LVM Partitions With Knoppix Linux LiveCD I followed the instructions, using mdadm –examine –scan to examine the partitions and manually set up the raid. Everything worked fine. I could see the raid partitions, I could mount them and view the data. cat /proc/mdstat showed the proper raided partitions. So what’s the problem?

Next I tried the rescue option of the Centos CD. The system booted fine, and the rescue mode dutifully mount all the partitions in the right order to /mnt/sysimage. But still no love when I tried to boot. Next I got on irc and talked to some of my friends from KPLUG.

One suggested trying to boot to the grub prompt and running boot options by hand, using tab completion. He suggested that perhaps the system wasn’t recognizing the drive. It seemed plausible, so I tested it. But the system seemed to be finding the /boot partition just fine and tab completion found the init ram disk fine.

Another suggested that the failure of the system to recognize the drives was caused by not loading the proper controller module. This had not occurred to me, because I thought I remembered that all the modules for hard drive host controllers were built into the kernel. At least that’s the way I used to build them. I remembered wrong. My friend suggested that I look at /etc/modprobe.conf and check the scsci_hostadapter parameter. So I booted into the Centos CD rescue mode, as the system booted I noticed the message loading ata_piix. This was the clue I had been missing. I edited the /etc/modprobe.conf file and changed the reference there. When I attempted to reboot the system the raid partitions were recognized and the system finished booting.

Once upon a time, modules for hard drives were included in the kernel, not loaded at boot time. Now with the size of kernels getting very large, nearly everything is loaded at boot. That’s fine for things like ethernet and sound cards. It’s always been a point of pride with me, that we could take the hard drives from one system, and install them into another system and it would just run. I guess that’s no longer true.

IMNSHO this is not progress.


Comments are closed.