Operating System - Linux
1830045 Members
15266 Online
109998 Solutions
New Discussion

Re: Problem with root disk

 
Andy Gray
New Member

Problem with root disk

Hi folks, I have a fairly simple problem...I moved the HDD with the linux boot and root partitions from hdc to hdb (ie I unplugged the disk from master on secondary IDE to slave on primary IDE). Of course, I can't boot this coz lilo can't find hdc, so I boot off a cd-rom, mount the root fs (with /boot on it also) and chroot to it. edit /etc/lilo.conf and /etc/fstab changing hdc1 with hdb1, run lilo, eveything is cool. Now, when I boot I get this error during kernel boot:

kmod: failed to exec /sbin/modprobe -s -k ide-disk, errno = 2
hdb: driver not present
VFS: Cannot open root device "341" or 03:41
Please append a correct "root=" boot option
kernel panic: VFS: Unable to mount root fs on 03:41

Even when I enter "linux root=/dev/hdb1" it still gets the same error.

I am sure I have done something simple wrong here. Does anyone know if there is perhaps an easier way to keep linux booting even if you move the location of the partition or disks? This seems such a big pain.

Any hints how to get it booting normally again? Thanks for the help.

- Andy Gray

3 REPLIES 3
dirk dierickx
Honored Contributor

Re: Problem with root disk

could you recheck your /etc/fstab file?
normally it should be no problem to move drives as long as the changes are reflected in the fstab file. you said you changed hdc1, but is that the only linux partition on that drive?
normally somewhere since redhat 7 it is possible to give partitions labels, which should make this kind of thing easier. (man e2label)
Andy Gray
New Member

Re: Problem with root disk

Hi,

I have only 2 partitions on the drive. one is / (6 GB) and the other is swap. The / partition (hdb1 currently) is an ext3 file system.

/etc/fstab had this:
LABEL=/ / ext3 defaults 1 1
... then the rest eg cdroms etc

I tried replacing the LABEL=/ with an explicit /dev/hdb1, but the same problem occured next reboot.

Any other suggestions? Do you need more information?

As a summary, hda1 is a 40 GB partition with win98 running, lilo is installed into the MBR on this drive. hdb has two partitions, hdb1 is ext3, hdb2 is swap. that is all on that drive. hdb was previously hdc. As you suspected, it doesn't seem likely that it is a problem with lilo, since the kernel does infact load...but somewhere there is a configuration problem stopping further booting, and this is related to the change of device addresses.

Any further help would be appreciated. Thanks.

- Andy Gray
Andy Gray
New Member

Re: Problem with root disk

Hi,

I forgot to mention that when I ran e2label /dev/hdb1, the output said that it's label was "/", which would correspond to what was in /etc/fstab.

Also, I can't remember if I mentioned that this isn't necessarily a kernel specific issue, since I get the same error with a couple of different kernels which were backups (old kernels).

Thanks again folks.

- Andy Gray