LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Moved install to new drive (/hda to /sda) - Wont boot (https://www.linuxquestions.org/questions/linux-newbie-8/moved-install-to-new-drive-hda-to-sda-wont-boot-783489/)

scoob8000 01-20-2010 08:49 AM

Moved install to new drive (/hda to /sda) - Wont boot
 
I just moved a Centos 5 install (using Grub to boot) to a new hard drive in the same system. Moved from and IDE drive to a SATA so now my device is /dev/sda instead of /dev/hda.

Without changing any lines in Grub, it starts to boot and gets to
Unable to access resume device SWAP-hda2
Mount: Could not find filesystem '/dev/root'


I'm sure it's a matter of booting a rescue cd and editing the proper files, but not sure where to begin.. :)

mdg 01-20-2010 08:58 AM

The kernel line in menu.lst should point to root=/dev/sda

You will also need to edit /etc/fstab to reflect the change.

scoob8000 01-20-2010 10:24 AM

In the meantime I did fumble around with my menu.lst and did fix the root= line. Should that be /dev/sda or /dev/sda3 (my root partition)?


Oddly I did edit my /etc/fstab, but on the next boot I'm still getting
Quote:

Unable to access resume device SWAP-hda2
I did boot up my rescue disc, and low and behold my fstab is still correct.

On another attempt I tried getting rid of all the labels in menu.lst and /etc/fstab. Still hangs with the same messages.

mdg 01-20-2010 01:19 PM

Yes, root= should point to /dev/sda3 if that is your root partition.

I assume that your swap partition was hda2. If it is now on the same disk as your root partition, will be called /dev/sda*. Make sure that is also updated in /etc/fstab.

Quakeboy02 01-20-2010 01:45 PM

Don't forget your device.map.

And also don't forget that your goal is to get the system working; not to become an expert in grub. Google "Super Grub Disk". It has a very good track record of fixing things like this.

scoob8000 01-20-2010 01:53 PM

Quote:

Originally Posted by mdg (Post 3833896)
Yes, root= should point to /dev/sda3 if that is your root partition.

I assume that your swap partition was hda2. If it is now on the same disk as your root partition, will be called /dev/sda*. Make sure that is also updated in /etc/fstab.


Correct, that's all good.

FWIW, my partitions are sda1 = boot, sda2 = swap, sda3 = root.


Well, I'm still getting hung up at the same spot. I did notice a file in my grub folder called device.map. In it was an entry pointing hd0 to /dev/hda.

I fixed that, but still no avail.

I'm downloading a rescue disk now to try to build a new initrd.

Quakeboy02 01-20-2010 02:32 PM

Quote:

Originally Posted by scoob8000 (Post 3833949)
I did notice a file in my grub folder called device.map. In it was an entry pointing hd0 to /dev/hda.

And you don't have a /dev/hda anymore, right?

scoob8000 01-20-2010 02:40 PM

[SOLVED]

I ended up remaking my initrd image from the rescue disc.

Thanks for your help! I don't use the forums much, but I'm sure glad they're here! :)


All times are GMT -5. The time now is 07:19 PM.