Bug 85741

Summary: Duplicate label causes incorrect boot
Product: [Retired] Red Hat Linux Reporter: Christian Jiresjö <ds98chji>
Component: mkinitrdAssignee: Jeremy Katz <katzj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-02 06:00:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian Jiresjö 2003-03-06 19:12:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
I have a computer classroom with computer that dualboots 2 version of linux and
windows xp and to complicate matters have removeable harddisk for various
exercises in courses where more freedom over the operating system is required.

If a removal disk is present it is booted else the internal drive boots. If that
removal disk has redhat linux installed on it which uses labels to find
root,boot and other partitions the machine will use the partitions from the
internal disk instead which is not good. 

Of course i can and will work around this by removing the labels from the
partitions on the internal disk but it's still a bug.

It might be related to the missidentification of ext3 as ntfs described in
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=80289 since the situation
described there for mounting occurs.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. install redhat system on a computer on /dev/hda (potentially on a former
single partion ntfs disk)
2. disable or remove /dev/hda
3. install another redhat system on /deb/hdc
4. reenable/reconnect /dev/hda
5. boot from grub (using labels)

Actual Results:  wrong redhat system was booted

Expected Results:  the label on the disk containing the bootloader should have
been booted

Additional info:

Comment 1 Arjan van de Ven 2003-03-07 00:20:06 UTC
the kernel doesn't know anything about labels... mkinitrd does

Comment 2 Jeremy Katz 2003-03-20 17:47:09 UTC
Reassigning

Comment 3 Jeremy Katz 2003-04-02 06:00:17 UTC
If we instead don't use labels, it causes problems for a different category of
moving disks around.  Labels are the best of the available evils right now.

Comment 4 Trevor Cordes 2004-03-25 04:41:45 UTC
I ran into this too recently.  I had a system that I was going to
upgrade to FC1 from RH7.  I took out the old disk.  Put in a new one.
 Installed FC1.  Put back the old disk as secondary master (hdc) in
order to copy over all my old data to the new system.  Booted and got
all sorts of weird stuff, like the FC splash screen on boot but it was
RH7 that actually was booted!

I understand why labels might be preferable, but perhaps to mitigate
this problem the system should use the first/earliest label match it
finds rather than the last/latest.  Almost certainly you'd prefer to
boot off of hda in most circumstances where this problem might occur
by accident.  Think from a newbie's perspective.

As Christian says, ditching the labels and hardcoding /dev/hda3 in
grub.conf makes a good workaround.