error: no such partition. grub-pc fails to detect mdraid partitions

Bug #987354 reported by TJ
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
grub2 (Debian)
New
Unknown
grub2 (Ubuntu)
Invalid
High
Unassigned

Bug Description

After upgrading Oneiric to Precise on a 32-bit server that has md-raid mirrored boot drives using:

do-release-upgrade -d

On reboot GRUB2 totally fails to find its 2nd stage files. It reports:

error: no such partition

This also happens when entering the rescue command-line and trying to do operations such as:

grub> ls
error: no such partition

Initial inspection of the grub environment indicates the UUIDs and grub prefix are as they were prior to the update.

It is not possible to do anything with GRUB2 that requires it to find/load second stage files - which puts most of its command-line tools out of reach.

TJ (tj)
Changed in grub2 (Ubuntu):
assignee: nobody → TJ (intuitivenipple)
status: New → In Progress
TJ (tj)
summary: - [Oneiric -> Precise upgrade] error: no such partition
+ error: no such partition. grub-pc fails to detect mdraid partitions
TJ (tj)
description: updated
Revision history for this message
TJ (tj) wrote :

This is caused when the existing GRUB configuration is incorrect and GRUB only 'knows' about one disk in the MD RAID set.

In this instance there is a RAID-1 mirror array of two disks on the first two IDE PATA controller ports (both as masters).

When the system boots BIOS does not know anything about software RAID devices so it reads the grub bootloader files from one drive. If that drive hasn't been updated by 'update-grub' then it will have older binary files on it.

When the GRUB package changes enough that the Application Binary Interface (ABI) changes it means that the older binaries cannot load grub's support libraries since the entry points and function signatures have changed.

A work-around to get the system booted is to enter the BIOS set-up and change the order of the disks in the DM RAID array so the disk with the updated master boot record is read first. This is easy to figure out if it is a 2-disk mirror.

Once the system is started do:

dpkg-reconfigure grub-pc

and ensure all disks the system might boot from are selected.

Changed in grub2 (Ubuntu):
assignee: TJ (intuitivenipple) → nobody
status: In Progress → Confirmed
Changed in grub2 (Debian):
status: Unknown → New
Changed in grub2 (Ubuntu):
importance: Undecided → High
Revision history for this message
Phillip Susi (psusi) wrote : Re: [Bug 987354] Re: error: no such partition. grub-pc fails to detect mdraid partitions

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/23/2012 12:21 PM, TJ wrote:
> When the system boots BIOS does not know anything about software RAID
> devices so it reads the grub bootloader files from one drive. If that
> drive hasn't been updated by 'update-grub' then it will have older
> binary files on it.

If that is the case, then this is a misconfiguration, not a bug. If you run dpkg-reconfigure grub-pc, both disks should be configured to have grub installed.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPlgyYAAoJEJrBOlT6nu75eyQIAIiFZpA4fyd45emvvi2a3hxO
0AJvP8N80+X5S2KcH4EJdo1kW0rLBUOTTwAlwpwG4+gYDMP4hUNMlvgjUStjnTT/
QMMcLJkCaQ1VMFvWJAuMSjtUbVQouXj1UbmXc8bvZSFPH+Jn3rvuPsmqtOEiQfRe
r85/D43BaQkYhcH0T+amR27+/+muepHDmrfenjF5yrFgKkrMpjWrAxOudCnp93Qu
P1Kr6HfJDs60w1dkkTfMNQ1pbrAZKI6Dn5BuTOMXqRCcO2wyav2d6/pj7AJvi+RX
fMBY7/6+pyt3DPscyIlj20frs1p+6g8ruLMeMpdh6r8k02BOPppzyMgGd9UbVyM=
=Slsa
-----END PGP SIGNATURE-----

Revision history for this message
Alex (d-f0rce) wrote :

This also happens without md-raid. I have a normal Ubuntu installation on sdb. I just upgraded and got the same error. Grub is unable to find the partitions.

Revision history for this message
Phillip Susi (psusi) wrote :

And if you run dpkg-reconfigure grub-pc, is your boot drive(s) selected?

Revision history for this message
Christian Weiske (cweiske) wrote :

Same problem: Booting from sdb gives me "error: on such partition". Runing "dpkg-reconfigure grub-pc" shows my boot drive selected.

Revision history for this message
Phillip Susi (psusi) wrote :

I think you are having a different issue than TJ, so you should file a new bug report. Since TJ's issue is a misconfiguration, I'm closing this bug report.

Changed in grub2 (Ubuntu):
status: Confirmed → Invalid
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.