grub doesn't properly migrate from incorrectly-detected-as-evms root filesystems

Bug #102148 reported by Gerv
6
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Binary package hint: mdadm

Upgrading to the beta has near-bricked my IBM X40 laptop :-( Note that my machine has a single, 40GB disk, and I've never asked for or used RAID of any sort.

A straight boot puts up the splash screen; the progress bar gets 2px in and hangs. Ctrl-Alt-F1 shows:

Loading, please wait...
libgcc_s.so.1 must be installed for pthread_cancel to work

Apr 02 22:53:59 (none) _0_ Engine: signal_handler: ***
Apr 02 22:53:59 (none) _0_ Engine: signal_handler: *** Signal: Aborted
Apr 02 22:53:59 (none) _0_ Engine: signal_handler: ***
Aborted
mdadm: No devices listed in conf file were found.

From reading various bugs, I learnt about using the "break=mount" boot option. That gets me to a (initramfs) prompt.

(initramfs) cat /etc/mdadm/mdadm.conf
DEVICE partitions

(initramfs) ./scripts/local-top/mdadm
mdadm: No arrays found in config file or automatically

(initramfs) ./scripts/local-top/mdadm from-udev
beginning: Loading MD modules
success: loaded module linear.
success: loaded module multipath.
success: loaded module raid0.
success: loaded module raid1.
success: loaded module raid456.
success: loaded module raid5.
success: loaded module raid6.
success: loaded module raid10.
done.
beginning: Assembling all MD arrays
mdadm: No arrays found in config file or automatically
./scripts/local-top/mdadm: ./scripts/local-top/mdadm: 120: log_failure_msg: not found

(initramfs) lvm vgscan
No volume groups found

That's just a random selection of commands I've found from the several bugs which seem to be related. None of the "magic solutions" other people propose seem to work; they all seem to have non-working ancillary RAID arrays, whereas it's my single, only, root drive which won't mount.

I'm hamstrung a bit because busybox doesn't seem to come with an editor.

According to bug 75681, something has very recently fixed in this area - so if I could boot once, I could perhaps do an apt-get to find the upgraded packages. But I can't boot even once!

My laptop is hosed. Please help :-(

Gerv

Related branches

Revision history for this message
Gerv (gerv) wrote :

Subscribing a couple of people who were involved in the related bugs. I hope that's not impolite...

Gerv

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Please provide the output of the following:

  dpkg-query -W dmsetup libdevmapper1.02 udev volumeid
libvolume-id0 lvm2 lvm-common mdadm

Changed in mdadm:
status: Unconfirmed → Needs Info
Revision history for this message
Gerv (gerv) wrote :

(initramfs) dpkg-query
/bin/sh: dpkg-query: not found

Like I said, I can't boot to a normal prompt. I can only get to the (initramfs) one using the "break=mount" boot option. :-(

The following is all I can gather, and hopefully may be of use:

(initramfs) lvm version
LVM version: 2.02.05 (2006-05-12)
Library version: 1.02.08 (2006-07-17)
Driver version: 4.11.0

(initramfs) mdadm --version
mdadm - v2.5.6 - 9 November 2006

(initramfs) ls /lib
...
libdevmapper.so.1.02
libvolume_id.so.0
...

I couldn't find any tell-tale information for the other packages you mention.

Gerv

Revision history for this message
Gerv (gerv) wrote :

I've downloaded, burned and booted with a nightly Feisty LiveCD, so I can get the machine started. But I don't know how to access my hard disk (I can't see it mounted) and I don't know how I can run the dpkg-query command without getting the results from the LiveCD rather than the installed software. If this is a good step forward, help in this area would be appreciated.

Gerv

Revision history for this message
Gerv (gerv) wrote :

I figured out how to mount my drive, and how to get dpkg-query to use a different database. Here are the results:

ubuntu@ubuntu:/tmp/hd$ dpkg-query --admindir=/tmp/hd/var/lib/dpkg -W dmsetup libdevmapper1.02 udev volumeid libvolume-id0 lvm2 lvm-common mdadm
dmsetup 2:1.02.08-1ubuntu5
libdevmapper1.02 2:1.02.08-1ubuntu5
udev 103-0ubuntu14
volumeid 103-0ubuntu14
libvolume-id0 103-0ubuntu14
lvm2 2.02.06-2ubuntu8
lvm-common 1.5.20ubuntu11
mdadm 2.5.6-7ubuntu4
ubuntu@ubuntu:/tmp/hd$

Hope that helps.

Gerv

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Updating to the latest package versions at the end of the day should cure your problems, if not, please set the bug back to confirmed

Changed in mdadm:
status: Needs Info → Fix Released
Revision history for this message
Gerv (gerv) wrote :

I booted into the live CD, manually mounted /dev/sda1, chrooted into it and did:

sudo apt-get update
sudo apt-get upgrade

135 packages later, I rebooted. No improvement, same error. :-((

dpkg-query, executed in the same way as last time, now says:

ubuntu@ubuntu:/tmp/hd$ dpkg-query --admindir=/tmp/hd/var/lib/dpkg -W dmsetup libdevmapper1.02 udev volumeid libvolume-id0 lvm2 lvm-common mdadm
dmsetup 2:1.02.08-1ubuntu10
libdevmapper1.02 2:1.02.08-1ubuntu10
udev 108-0ubuntu3
volumeid 108-0ubuntu3
libvolume-id0 108-0ubuntu3
lvm2 2.02.06-2ubuntu9
lvm-common 1.5.20ubuntu12
mdadm 2.5.6-7ubuntu4
ubuntu@ubuntu:/tmp/hd$

So all packages except mdadm have changed versions.

What do I do now?

Gerv

Revision history for this message
Gerv (gerv) wrote :

Resetting status, as requested.

Gerv

Changed in mdadm:
status: Fix Released → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

After discussion with Gerv on IRC, this turned out to be because his /boot/grub/menu.lst said root=/dev/evms/hda1 rather than /dev/sda1 or a UUID= version; this in turn was because he had originally installed dapper, where evms was installed by default. grub's migration code needs to handle this case.

Revision history for this message
Colin Watson (cjwatson) wrote :

(Gerv also says he's available to help with further debugging)

Colin Watson (cjwatson)
Changed in grub:
importance: Undecided → High
Revision history for this message
Colin Watson (cjwatson) wrote :

Here's a very tentative untested patch.

Changed in grub:
assignee: nobody → kamion
Colin Watson (cjwatson)
Changed in grub:
status: Confirmed → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote :

grub (0.97-20ubuntu6) feisty; urgency=low

  * Migrate root=/dev/evms/[hs]d[a-z][0-9]* to UUIDs, since systems upgraded
    from dapper to edgy may find themselves with such a root= option by
    mistake (LP: #102148).

 -- Colin Watson <email address hidden> Tue, 10 Apr 2007 13:37:42 +0100

Changed in grub:
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

Note that this has to be installed before you reboot to the new kernel or it won't work; you'll have to fix root= by hand if you've already rebooted. This should fix upgrades from edgy->feisty for afflicted systems, though, which is the main thing.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.