
Booting the wrong partition?This bit me while upgrading from RH 7.3 to RH9. I had the same problem as this guy. I'm reproducing the news group posting here. The original from Google Groups is here.
Message 1 in thread
From: Dale Trager (trager@nospam.cybernothing.org)
Subject: RedHat (Grub?) booting to wrong disk
View this article only
Newsgroups: comp.os.linux.setup, comp.os.linux, comp.os.linux.help, linux.redhat
Date: 2003-03-03 06:18:13 PST
I had an IDE hard drive with an existing Linux installation on it (RedHat
7.2). I unplugged it and connected a new drive as primary master which I
installed RH 8.0 to. Once that installation was finished, I connected the
old drive as secondary master (hdc). My goal was to choose and copy old
files from the previous installation to the new disk.
When I booted the system, grub listed the 8.0 installation's kernel and
started to boot with it, but somewhere in the process, right after the
grub splash screen was displayed, the machine suddenly switched to booting
off the old drive. I got all kinds of errors about swap being missing (it
had been on partition 5 but it was on 9 on the new drive) and other
issues. I changed the old drive's jumpers and moved it to secondary slave
(hdd), but the same thing happens.
My sense is that this has something to do with the LABEL scheme, since the
LABEL names are the only things the drives share, but I can't figure out
how to get around it. I specified the / partition of the new drive in the
grub.conf file (boot=/dev/hda2, and later in the kernel stanza I changed
root=LABEL=/ to root=/dev/hda2 ), but all this did was create different
errors (many stating /var couldn't be found, or that filesystems were
read-only).
What can I do to correct/get around this? It seems like a bug to me, and I
wonder if it's specific to grub.
- DDT
Message 2 in thread
From: Timothy Murphy (tim@birdsnest.maths.tcd.ie)
Subject: Re: RedHat (Grub?) booting to wrong disk
View this article only
Newsgroups: comp.os.linux.setup, comp.os.linux, comp.os.linux.help, linux.redhat
Date: 2003-03-03 15:16:12 PST
Dale Trager wrote:
> I had an IDE hard drive with an existing Linux installation on it (RedHat
> 7.2). I unplugged it and connected a new drive as primary master which I
> installed RH 8.0 to. Once that installation was finished, I connected the
> old drive as secondary master (hdc). My goal was to choose and copy old
> files from the previous installation to the new disk.
>
> When I booted the system, grub listed the 8.0 installation's kernel and
> started to boot with it, but somewhere in the process, right after the
> grub splash screen was displayed, the machine suddenly switched to booting
> off the old drive. I got all kinds of errors about swap being missing (it
> had been on partition 5 but it was on 9 on the new drive) and other
> issues. I changed the old drive's jumpers and moved it to secondary slave
> (hdd), but the same thing happens.
>
> My sense is that this has something to do with the LABEL scheme, since the
> LABEL names are the only things the drives share, but I can't figure out
> how to get around it. I specified the / partition of the new drive in the
> grub.conf file (boot=/dev/hda2, and later in the kernel stanza I changed
> root=LABEL=/ to root=/dev/hda2 ), but all this did was create different
> errors (many stating /var couldn't be found, or that filesystems were
> read-only).
>
> What can I do to correct/get around this? It seems like a bug to me, and I
> wonder if it's specific to grub.
You could try "grub-install --recheck /dev/hda"
(assuming that is where grub is installed).
Alternatively, the labels may have got confused, as you say.
You can replace them in /etc/fstab and grub.conf
by the actual devices, eg /dev/hda5 instead of LABEL-/
Or you can find how your disks are labelled by eg "e2label /dev/hda2".
--
Timothy Murphy
e-mail: tim@birdsnest.maths.tcd.ie
tel: 353-86-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Message 3 in thread
From: Paul W. Frields (stickstrfoo5@hotmail.com)
Subject: Re: RedHat (Grub?) booting to wrong disk
View this article only
Newsgroups: comp.os.linux.setup, comp.os.linux, comp.os.linux.help, linux.redhat
Date: 2003-03-03 15:45:11 PST
In article <1046701083.350846@news.explosive.net>, Dale Trager wrote:
> I had an IDE hard drive with an existing Linux installation on it (RedHat
> 7.2). I unplugged it and connected a new drive as primary master which I
> installed RH 8.0 to. Once that installation was finished, I connected the
> old drive as secondary master (hdc). My goal was to choose and copy old
> files from the previous installation to the new disk.
>
> When I booted the system, grub listed the 8.0 installation's kernel and
> started to boot with it, but somewhere in the process, right after the
> grub splash screen was displayed, the machine suddenly switched to
> booting off the old drive. I got all kinds of errors about swap being
> missing (it had been on partition 5 but it was on 9 on the new drive) and
> other issues. I changed the old drive's jumpers and moved it to secondary
> slave (hdd), but the same thing happens.
>
> My sense is that this has something to do with the LABEL scheme, since
> the LABEL names are the only things the drives share, but I can't figure
> out how to get around it. I specified the / partition of the new drive in
> the grub.conf file (boot=/dev/hda2, and later in the kernel stanza I
> changed root=LABEL=/ to root=/dev/hda2 ), but all this did was create
> different errors (many stating /var couldn't be found, or that
> filesystems were read-only).
>
> What can I do to correct/get around this? It seems like a bug to me, and
> I wonder if it's specific to grub.
It's not specific to GRUB, and not a bug per se, but rather caused by your
not knowing how the volume label feature works. Not a problem; simply do
*one* of the following:
1. Boot from your 8.0 install CD in rescue mode, *do not* mount your Linux
system, then remove the volume labels from the offending partitions on
/dev/hdc using the e2label program like so:
e2label /dev/hdc1 "" # removes label
2. Boot from your 8.0 install CD in rescue mode, *do not* mount your Linux
system, and then mount manually your root (/) partition only, on
/mnt/sysimage. Then do:
cd /mnt/sysimage
vi /etc/fstab
(Now change all LABEL= to /dev/hdaN entries.
Use "e2label /dev/hdaN" if you need help
remembering which is which.)
Your grub.conf should be OK from what you did before; all the errors are
caused by the conflicts coming from your /etc/fstab file. Good luck and
have fun.
--
Paul W. Frields, RHCE/RHCX (remove "foo" from e-mail to reply)
Hope that helps someone! :) Created by swannie on 2003-10-07 10:50:10.
|
| Home > Linux > Red Hat 9 > Booting the wrong partition? |