Bug 484897

Summary: Unable to boot system after normal kernel upgrade
Product: [openSUSE] openSUSE 11.1 Reporter: Archie Cobbs <archie.cobbs>
Component: BootloaderAssignee: Michal Marek <mmarek>
Status: RESOLVED DUPLICATE QA Contact: Jiri Srain <jsrain>
Severity: Critical    
Priority: P5 - None CC: eirikjbj
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Patch to initrd image that works around this bug (for me)

Description Archie Cobbs 2009-03-12 18:48:44 UTC
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7

I have an openSUSE 11.1 system with /dev/md0 (RAID1) as the root filesystem with ReiserFS formatting. There is a separate non-RAID /boot partition.

After upgrading from kernel-default-2.6.27.7-9 (the openSUSE 11.1 default) to kernel-default-2.6.27.19-3 (which comes from 11.1 updates repository), my system would no longer boot! It could not mount root, "invalid root filesystem".

Here is a relevant thread:
http://forums.opensuse.org/pre-release-beta/409279-invalid-root-filesystem.html

Workaround I've found so far: when boot fails and you fall into a shell script, run "modprobe reiserfs", then hit CTRL-D.

I inspected my initrd and it seems to have reiserfs configured in there. The "reiserfs" module is also listed in /etc/sysconfig/kernel in INITRD_MODULES as expected.



Reproducible: Always

Steps to Reproduce:
1. Install openSUSE 11.1 system with RAID1 root filesystem with ReiserFS format.
2. zypper install kernel-default (to get newer kernel from openSUSE-11.1 Updates)
3. reboot
Actual Results:  
System would not boot: "invalid root partition".


Expected Results:  
System should boot, of course!!
Comment 1 Jiri Srain 2009-03-13 13:22:22 UTC
Following comment in the forum is:

just pressing the CTRL+D makes linux boot..
 so i suppose the module for rootfs is loaded!
 
 lsmod was I unable to run


Don't know what's wrong in initrd...
Comment 2 Archie Cobbs 2009-03-13 13:54:31 UTC
Note: Just to be clear, in my particular problem described here, I never said "just pressing CTRL-D makes linux boot".

What I said was: FIRST running "modprobe reiserfs" and THEN pressing CTRL-D makes it boot.

The mystery is: why, even though the reiserfs module seems to be included in the initrd as it should be, does it not get loaded at the appropriate time so that root can be mounted?
Comment 3 Eirik Johansen Bjørgan 2009-03-13 15:10:10 UTC
The just pressing CTRL+D worked for me, probably bacause of different rootfs (ext3). But it is sort of same problem, since we both halt at "invalid root filesystem".
Comment 4 Archie Cobbs 2009-03-14 18:44:14 UTC
I did some debugging and here is some more info.

The problem occurs in the initrd script boot/83-mount.sh in this code:

if [ -z "$rootfstype" -a -x /sbin/udevadm -a -n "$sysdev" ]; then
    eval $(/sbin/udevadm info -q env -p $sysdev | sed -n '/ID_FS_TYPE/p')
    rootfstype=$ID_FS_TYPE
    [ -n "$rootfstype" ] && [ "$rootfstype" = "unknown" ] && $rootfstype=
    ID_FS_TYPE=
fi

What's supposed to happen in there is that udevadm spits out "ID_FS_TYPE=reiserfs" (among other stuff). When you run this command after the system has booted, it in fact does work properly:

  $ /sbin/udevadm info -q env -p /devices/virtual/block/md0
  MD_LEVEL=raid1
  MD_DEVICES=2
  MD_METADATA=1.00
  MD_UUID=dec8fad4:b86893d1:8a7eeeb6:e791be9d
  MD_NAME=0
  ID_FS_USAGE=filesystem
  ID_FS_TYPE=reiserfs
  ID_FS_VERSION=3.6
  ID_FS_UUID=743d0ae3-6a8d-4b7a-81fa-fbfe890870a8
  ID_FS_UUID_ENC=743d0ae3-6a8d-4b7a-81fa-fbfe890870a8
  ID_FS_LABEL=
  ID_FS_LABEL_ENC=
  ID_FS_LABEL_SAFE=

However, when the boot/83-mount.sh script runs at boot time as part of the initrd bootstrap, this same command outputs only this (as determined by hacking this script):

  MD_LEVEL=raid1
  MD_DEVICES=2
  MD_METADATA=1.00
  MD_UUID=dec8fad4:b86893d1:8a7eeeb6:e791be9d
  MD_DEVNAME=0
  MD_NAME=0

So this failure of udevadm to spit out the ID_FS_* stuff seems to be the root of the problem.

I've attached a workaround that I've applied to my initrd. This of course only works if your root filesystem is reiserfs.
Comment 5 Archie Cobbs 2009-03-14 18:45:31 UTC
Created attachment 279626 [details]
Patch to initrd image that works around this bug (for me)
Comment 6 Eirik Johansen Bjørgan 2009-03-15 01:33:15 UTC
after updating to the latest factory kernel, I do not need to press CTRL+D to start! so the it is fixed for me!
Comment 7 Archie Cobbs 2009-04-15 13:58:33 UTC
Problem still occurs after upgrading to kernel-trace-2.6.27.21-0.1.2.
Comment 9 Michal Marek 2010-01-22 12:56:45 UTC
Fixed in a later kernel update.

*** This bug has been marked as a duplicate of bug 445490 ***