LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-20-2010, 09:49 AM   #1
scoob8000
Member
 
Registered: Jun 2003
Distribution: Redhat 8, Redhat 9, Win2k, WinXP
Posts: 64

Rep: Reputation: 15
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..

Last edited by scoob8000; 01-20-2010 at 03:40 PM. Reason: Solved - Title
 
Old 01-20-2010, 09:58 AM   #2
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 38
The kernel line in menu.lst should point to root=/dev/sda

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

Last edited by mdg; 01-20-2010 at 09:59 AM. Reason: grammar
 
Old 01-20-2010, 11:24 AM   #3
scoob8000
Member
 
Registered: Jun 2003
Distribution: Redhat 8, Redhat 9, Win2k, WinXP
Posts: 64

Original Poster
Rep: Reputation: 15
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.

Last edited by scoob8000; 01-20-2010 at 11:35 AM.
 
Old 01-20-2010, 02:19 PM   #4
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 38
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.
 
Old 01-20-2010, 02:45 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410

Rep: Reputation: 141Reputation: 141
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.
 
Old 01-20-2010, 02:53 PM   #6
scoob8000
Member
 
Registered: Jun 2003
Distribution: Redhat 8, Redhat 9, Win2k, WinXP
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by mdg View Post
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.
 
Old 01-20-2010, 03:32 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by scoob8000 View Post
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?
 
Old 01-20-2010, 03:40 PM   #8
scoob8000
Member
 
Registered: Jun 2003
Distribution: Redhat 8, Redhat 9, Win2k, WinXP
Posts: 64

Original Poster
Rep: Reputation: 15
[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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sda drive seen as hda on centos5 cormander Linux - Hardware 2 12-28-2007 03:00 PM
Compiles 2.6.23.9 kernel, sees drive as hda, reiserfs still thinks it's sda spiffytech Slackware 6 12-05-2007 09:01 AM
Fedora 7 Network Install is showing SDA partitions when I have Hda rtoney5 Fedora 13 10-29-2007 03:05 PM
[SOLVED] How to boot sda from hda LILO Mallegonian Slackware 7 08-20-2007 12:52 PM
Install lilo on external drive (/dev/sda), then boot as INTERNAL (/dev/hda)? slackware-elf Slackware 3 08-18-2007 05:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration