Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80379 - can't boot after a fresh 2004.3 install with software RAID
Summary: can't boot after a fresh 2004.3 install with software RAID
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-01 12:53 UTC by Cynick Young
Modified: 2005-04-15 19:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cynick Young 2005-02-01 12:53:06 UTC
After doing a fresh install of 2004.3 with software RAID, the system refuses to boot.  I'm using 2.6 series kernel with udev and mdadm for raid tools.  I'm using the latest stable packages off the portage tree.  The problem occurs during the root filesystem check.  It dies with message "No such device /dev/md2" every time.

After some investigation, I tracked the problem down to the checkroot init script.  The problem being that it's trying to do fsck on /dev/md2 which doesn't exist yet because it gets created by the checkfs init script.  Catch 22.

As a hack, I changed the following:
if [ ! -f /fastboot -a -z "${CDBOOT}" ]

to:
if [ ! -f /fastboot -a -z "${CDBOOT}" -a ! -f /proc/mdstat ]

which just skips the whole root filesystem check altogether, but it lets me boot.

I hope there's a better solution to the problem.

Reproducible: Always
Steps to Reproduce:
1. Install 2004.3 with support for software RAID
2. Install 2.6 series kernel
3. Install udev
4. Reboot

Actual Results:  
Can't find device /dev/md2
Comment 1 SpanKY gentoo-dev 2005-03-01 20:40:17 UTC
should be fixed with the upcoming baselayout-1.11.10+
Comment 2 Gregg Casillo 2005-03-07 23:16:05 UTC
Oi! I've been banging my head against this wall
for four days now. *sob*

As you can see from my last post, I'm updating
everything with ACCEPT_KEYWORDS="~x86". I suppose
this means I'll get the new baselayout with the
fix (we'll see shortly). But what about folks
running stable? They could potentially run into
a very frustrating wall like I did this weekend.

Just a thought. Thanks, Cynick, for posting this
bug report!
Comment 3 Gregg Casillo 2005-03-07 23:17:06 UTC
I was referring to this thread/my call for help/an
angry diatribe:

http://forums.gentoo.org/viewtopic-t-304150-highlight-.html
Comment 4 Cynick Young 2005-03-08 07:51:50 UTC
I just had a look at the latest portage tree and it doesn't show any ebuilds for baselayout-1.11.10+  Judging from the Changelog comments, I don't think the fix is in there yet even if you install unstable packages ie. ACCEPT_KEYWORDS=~x86.

If you're desparate, you could try my work-around above.  Just edit /etc/init.d/checkroot and reboot.

There are 2 things to be aware of though.

1. If you update baselayout after, you must remember to merge that change into the newer file.

2. If your system is shut down without unmounting the drives properly, you need to manually run fsck from a LiveCD.  My hack bypasses the fsck on boot.

I'm running journalling filesystems EXT3 and ReiserFS so I'm not too concerned.

Hope this helps.
Comment 5 Gregg Casillo 2005-03-08 14:26:08 UTC
I too am running ext3 on all of my volumes & partitions, so no real worries. The use of ACCEPT_KEYWORDS="~x86" seemed to do the trick for me. I am running baselayout-1.11.9-r1 which appears to have the fix in place in /etc/init.d/checkfs:

if [[ -z ${CDBOOT} ]] && [[ -f /proc/mdstat ]] ; then

I try to avoid hacking boot scripts whenever possible, largely because I don't understand them at first glance. So I'm relying on whatever portage gives me at this point. I'll be careful when updating to anything newer that my affect my booting though, rest assured.
Comment 6 Cynick Young 2005-04-15 19:36:53 UTC
Phani Achanta wrote:

with reference to your post below

http://bugs.gentoo.org/show_bug.cgi?id=80379

I>f you're desparate, you could try my work-around above.  Just >edit
/etc/init.d/checkroot and reboot.

i always end up with /dev/md2 not found. How do i get into the system
to change the /etc/init.d/checkroot

i cant save anything if i enter from the maintainance mode below as it
says read only file system. how do i make it accept my changes ?

Please help


Checking root filesystem                                 [OK] 
ext2fs_check_if_mount: No such file or directory while determining
whether or /dev/md2 is mounted.
fsck.ext3: No such file or directory while trying to open /dev/md2 
/dev/md2: 
The superblock could not be read or does not describe a correct ext2
fileystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the
superblock is corrupt, and you might try running e2fsck with an
alternate superblock:
     e2fsck -b 8193 <device> 

*Filesystem couldn't be fixed  :(                           [!!] 

Give root password for maintenence 
(or type Control-D for normal startup).

Answer:

To change the /etc/init.d/checkroot script, you'll need to boot from the LiveCD and mount your drive(s) using RAID.  I'm assuming that you were able to do the installation using RAID so I will skip those instructions.

Mount your /dev/md* to the /mnt/gentoo mount points like the regular installation.  You can skip the chroot and just edit /mnt/gentoo/etc/init.d/checkroot and that should do the trick.

If you still have questions, let me know.  And please post to the bug so others can share this information too.