grub-install loses OS in extended partition

Bug #745800 reported by Chad A Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: grub2

If the current (ubuntu) system is in a primary partition, grub-install does not install an entry for another (ubuntu) system in an extended partition.

TEST CASE:
Install (k)ubuntu, use the entire disk. This puts the root onto a primary partition and the swap into an extended partition by default.
Install another (k)ubuntu, choose the option to automatically resize existing partitions. By default, this shrinks the primary partition (about 50%) and puts another logical partition into the extended partition for the new root filesystem. grub is then updated and after rebooting, grub will show both systems.
Boot into the new system, the one in the logical partition, and run: sudo grub-install /dev/sda and reboot. The grub menu has not changed.
Now boot into the system on the primary partition and run: sudo grub-instal /dev/sda and reboot. The system from the logical partition has disappeared from the grub menu.

This also affects the 'rescue' mode from the alternate CD, which is where I found this problem. I.e. if you choose the root filesystem to be the primary parititon and try to reinstall grub, you will still not have access to the system on the logical partition. However, if you choose the system on the logical partition as the root file system and then update grub, you will then have access again to both systems.

This is grub-pc-1.99~rc1-6ubuntu1
I install kubuntu (both of them) from the natty-desktop-amd64.iso from 2011-03-29.1
I used the rescue mode from natty-alternate-amd64.iso from 2011-03-29.1

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: grub-pc 1.99~rc1-6ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
Uname: Linux 2.6.38-7-generic x86_64
Architecture: amd64
Date: Wed Mar 30 17:42:03 2011
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Beta 1 amd64 (20110329.1)
ProcEnviron:
 LANGUAGE=
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

On IRC, I suggested:

<cjwatson> if you mean bug 745800, I'm speculating that that might be the understood and non-Mac-specific but rather hard bug 733240
<cjwatson> the way to find out is by mounting and unmounting the filesystem it fails to find, then running 'sudo update-grub' again and seeing if the other OS now appears in /boot/grub/grub.cfg

Revision history for this message
Chad A Davis (chadadavis) wrote :

Yes, this does appear to be the result of bug 733240. Rebooting got the filesystems clean again and os-prober found the OS in the extended partition.
I'll mark this as a duplicate.
The reason for the unclean unmounting was from the rescue CD, however, after changing the root filesystem multiple times. This is a separate issue. I did originall also install grub from withing both OSes, not just from the rescue mode alone. So the filesystems were left uncleanly mounted, somehow.

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.