Bug 85741 - Duplicate label causes incorrect boot
Summary: Duplicate label causes incorrect boot
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mkinitrd
Version: 8.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-03-06 19:12 UTC by Christian Jiresjö
Modified: 2007-04-18 16:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-04-02 06:00:17 UTC

Attachments (Terms of Use)

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:

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

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.

Note You need to log in before you can comment on or make changes to this bug.