[lucid] grub2 detect archlinux wrongly

Bug #518826 reported by Pavol Klačanský
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: grub2

Hallo, I have archlinux and ubuntu detected it, but it is wrong

Ubuntu detection (not works)
menuentry "Arch (on /dev/sda6)" {
 insmod ext2
 set root=(hd0,6)
 search --no-floppy --fs-uuid --set 04c91239-3832-4229-87c1-1492a3401756
 linux /boot/vmlinuz26 root=/dev/sda6

}

I have to add one line "initrd /boot/kernel26.img}" and it works

ProblemType: Bug
Architecture: amd64
Date: Mon Feb 8 14:48:34 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Package: grub2 (not installed)
ProcEnviron:
 LANG=sk_SK.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-12.17-generic
SourcePackage: grub2
Uname: Linux 2.6.32-12-generic x86_64

Related branches

Revision history for this message
Casey J Peter (caseyjp1) wrote :

adding the initrd line to grub.cfg is a dirty hack, and really shouldn't be done as that file is 'read-only' for a reason, but other than messing with the additional menu items which in itself is a confusing mess, it is the ONLY way to boot arch properly that I've discovered.

Without the addition of the initrd line of the original poster, Arch starts its boot but kernel panics with vfs issues.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

I know it, but I don't have entry twice (if I used my custom script).

Revision history for this message
Mandeep (mandeep) wrote :

Bump.
I am on Karmic and when i do update-grub from ubuntu with an arch linux installation....the grub entry for root says /dev/sda3 instead of /dev/sda8.

grub.cfg looks like

set root=(hd0,7)
.....
linux /vmlinuz26 root=/dev/sda3

changin git to root=/dev/sda8 helps me...and boots archlinux.

Revision history for this message
Nicola Rosati (supernaicol) wrote :

I can confirm this bug (as it affects me too). I think the file to be patched shold be /etc/grub.d/30_os-prober, because that's the script that search for other OSes (my Windows os is correctly recognized) every time you give an update-grub, and it seems that it doesn't get along with initrds.
I tried to give an outlook at the file too, but it's really beyond my skills!
Hope this get some attention...

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 518826] Re: [lucid] grub2 detect archlinux wrongly

The way this works is that update-grub runs the os-prober command, and
then also runs the linux-boot-prober command on any partitions that look
like they contain Linux. /etc/grub.d/30_os-prober takes the output of
those commands and turns them into grub.cfg fragments. I think this is
much more likely to be a problem with linux-boot-prober than a problem
on the grub side.

I don't have Arch Linux installed myself, so I'll need help to debug
this. First, please show me the output of 'sudo os-prober'. In that
output, there should be a line something like this:

  /dev/sda7:Ubuntu 9.10 (9.10):Ubuntu:linux

... but for Arch Linux instead of Ubuntu, and probably with a different
device name at the start of the line. If there is such a line, could
you please run 'sudo linux-boot-prober /dev/sda7', but replace /dev/sda7
with the device at the start of the line, and show me that output as
well?

 status incomplete

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Casey J Peter (caseyjp1) wrote :

Here, as requested are the two outputs:

From sudo os-prober:

sudo os-prober
/dev/sda1:Ubuntu 9.10 (9.10):Ubuntu:linux
/dev/sda9::Arch:linux

And from sudo linux-boot-prober:

sudo linux-boot-prober /dev/sda9
/dev/sda9:/dev/sda9::/boot/vmlinuz26::root=/dev/sda9

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

Thanks. Now the next step. What boot loader is installed and
configured on the Arch Linux filesystem? Could you please attach its
configuration file?

Revision history for this message
Casey J Peter (caseyjp1) wrote :

On my system, I hates ta' tell you this, but none. I set up arch on "/" and a "/home" partitions (sda9 and sda8) using a common swap partition I use for both ubuntu karmic and my test partition holding lucid.

As the arch partition is more for learning its system and experimenting with different desktop environments, I purposefully set it up without a separate /boot partition OR a boot loader, relying on my primary grub setup with Ubuntu.

I have seen other reports of users with arch in the forums having the same issue, with the work around being to manually configure grub.cfg with the statement: initrd /boot/kernel26.img on the line following the main arch menu entry.

For the specific purpose of using Lucid to test the latest grub2, it currently manages the other systems at this point, though Karmic does have a boot manager set up (grub 2 same version as lucid's) as a fallback in case there are problems with the lucid beta. (but being the same version of grub2, it also has the same exact issue with the Arch install.)

If you need anything, just let me know and I'll gladly help as I can.

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

It would be nice to know whether the original reporter of this bug
(pavolzetor) also doesn't have a boot loader on the Arch Linux
filesystem.

Is there a regular naming scheme for Arch Linux initrds? Where would I
find the code that generates them?

affects: grub2 (Ubuntu) → os-prober (Ubuntu)
Revision history for this message
Colin Watson (cjwatson) wrote :

Never mind; I found their GRUB configuration patch, which answers my question.

  http://repos.archlinux.org/wsvn/packages/grub2/trunk/grubconfig.archlinux.patch

Changed in os-prober (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package os-prober - 1.37

---------------
os-prober (1.37) unstable; urgency=low

  [ Frans Pop ]
  * 90linux-distro: also allow for lib32 and lib64 directories when looking
    for ld*.so*. With thanks to Maximilian Gerhard. Closes: #574407.

  [ Colin Watson ]
  * Detect Windows Server 2008 and Windows Server 2008 R2, thanks to
    Thorsten. LP: #544117
  * Detect Arch Linux initrds: http://wiki.archlinux.org/index.php/GRUB2 and
    http://repos.archlinux.org/wsvn/packages/grub2/trunk/grubconfig.archlinux.patch
    indicate that /boot/vmlinuz26 is associated with /boot/kernel26.img.
    LP: #518826
 -- Colin Watson <email address hidden> Tue, 13 Apr 2010 21:09:12 +0100

Changed in os-prober (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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