Bug 183183 - Boot tries to find Fedora on the wrong partition
Boot tries to find Fedora on the wrong partition
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
5
i386 Linux
medium Severity high
: ---
: ---
Assigned To: David Cantrell
Mike McLean
:
Depends On:
Blocks: FC5Target
  Show dependency treegraph
 
Reported: 2006-02-27 04:40 EST by Ariszló
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-22 11:40:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ariszló 2006-02-27 04:40:24 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.1 (like Gecko)

Description of problem:
Installed Fedora Core 5 Test 3 onto /dev/hda7 (between two other Linux   
distributions on /dev/hda6 and /dev/hda8). After rebooting I received these  
error messages:   
   
VFS: Can't find ext3 filesystem on dev hda8   
mount: error mounting /dev/root on /sysroot as ext3: Invalid argument   
setuproot: moving /dev failed: No such file or directory   
setuproot: mounting /proc: No such file or directory   
setuproot: mounting /sys: No such file or directory   
switchroot: mounting failed: No such file or directory   
Kernel panic - not syncing: Attempted to kill init!   
   
Replacing "LABEL=/" with "/dev/hda7" in /etc/fstab and /boot/grub/grub.conf   
fixed it. 
 

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


How reproducible:
Always

Steps to Reproduce:
1. Install fc5test3 onto /dev/hda7 leaving two other Linux distributions  
on /dev/hda6 and /dev/hda8 unchanged.  
2. Reboot. 
3. Read the error messages terminating at kernel panic. 
    

Actual Results:  Kernel panic. 

Expected Results:  Normal boot. 

Additional info:
Comment 1 Karel Zak 2006-02-27 10:47:08 EST
Why your system looks for root on hda8 when you have it on hda7? It seems you
have some mismatch in your grub.conf (is it shared between all dists on your
hda?) or you have same label on multiple partitions. The label has to be unique.
Please, check your partitions and labels (as root) by commands: blkid and e2label.
Comment 2 Ariszló 2006-02-28 06:44:04 EST
Yes, both /dev/hda7 and /dev/hda8 have LABEL="/". This is the output of blkid:

/dev/hda7: LABEL="/" UUID="d4bc0bbf-de9f-4d4a-80c2-4051f2497f10" SEC_TYPE="ext2"
TYPE="ext3"
/dev/hda8: UUID="aa7871eb-7be6-41e1-938d-8a2304ac373a" LABEL="/" TYPE="reiserfs"

/dev/hda8 had already had LABEL="/" when I installed Fedora Core 5 Test 3 onto
/dev/hda7 so it should not have added the same label to /dev/hda7. But it did.

Now I have Ubuntu on /dev/hda8 but I believe the label was left behind by an
earlier installation of Fedora Core 4.

man e2label says that e2label is to edit labels on ext2/ext3 but the filesystem
of /dev/hda8 is reiserfs.
Comment 3 Karel Zak 2006-02-28 07:11:59 EST
You're probably right that installer should be check for unique labels.
Comment 4 Jeremy Katz 2006-03-02 20:27:36 EST
We do when we can read the label.  David -- didn't you fix this before test3?
Comment 5 David Cantrell 2006-03-03 11:52:04 EST
I added the reiserfs label collision avoidance code before Test 3.  I'll look in
to this now.

Karel, was the clock on this system invalid when you did the FC installation
(i.e., set before the epoch)?  libblkid returns nil if the clock is <
(time_t)-1.  I submitted a patch for e2fsprogs, but they have not rolled a new
package.
Comment 6 Karel Zak 2006-03-07 14:35:57 EST
David, I don't know. This problem is originaly reported by Ariszló (see comment #1).
Comment 7 David Cantrell 2006-03-07 17:17:43 EST
Yeah, my mistake.  Two bugs crossed paths in my mind.  The reiserfs collision
prevention code is probably not catching his case.  I'll look at this further. 
Sorry for the confusion.
Comment 8 David Cantrell 2006-03-08 15:47:49 EST
Ariszló,

I can't recreate this here.  The support to avoid reiserfs label collision was
added on February 2nd, so it should be in FC5 Test 3.  Are you sure you're using
FC5 Test 3?  I've done an install of Ubuntu 5.10 here to reiserfs, then FC5 Test
3 and it installs just fine.  The root filesystem on Fedora isn't labeled and it
boots up just fine.
Comment 9 Ariszló 2006-03-10 06:58:00 EST
Yes, I installed FC5 Test 3 using the 2006-02-20 isos from
http://torrent.fedoraproject.org/

This is how I experienced the label clash. Relevant partitions before installation:

/dev/hda5 swap
/dev/hda7 reiserfs
/dev/hda8 reiserfs labelled /

I don't remember if /dev/hda7 was also labelled / before installing FC5 Test 3
onto it. Let's assume the two identical labels already existed before the
installation.

During installation selected /dev/hda7 for / and reformatted it to ext3. At the
end both /dev/hda7 and /dev/hda8 were labelled / and Fedora wanted to run from
/dev/hda8 instead of /dev/hda7, which resulted in kernel panic.

To reproduce all this, first you need to identically label two reiserfs
partitions as / with reiserfstune.
Comment 10 David Cantrell 2006-03-22 11:40:40 EST
This was a strange bug.  I was able to recreate the scenario you described and
have fixed the problem in rawhide.  Sorry it didn't make it to FC5 final.

There were several problems.  First, a problem with the reiserfs label reading
code I added weeks ago.  Second, we didn't have a function to write labels to
reiserfs filesystems.  And we lacked a handler for the scenario you described
where two filesystems will have the same label *before* running anaconda. 
Unfortunately there's no good way to handle more than two of the same fs labels,
but I say it's the user's fault in that case.

With all that, reiserfs is still 100% unsupported in Fedora.  If you are
installing to a reiserfs filesystem for /, you must separate the /boot
filesystem to an ext2/ext3 partition.  In addition, be sure to add "noselinux
selinux=0" to the additional boot arguments for the boot loader.  Reiserfs lacks
the extended attributes needed to support selinux, so you'll just have to
disable it.

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