Grub installer for Ubuntu 7.10 adds other OS entry only for Ubuntu 7.04, and not Windows, in a triple-boot configuration

Bug #139041 reported by Geza Kovacs
This bug report is a duplicate of:  Bug #10824: Windows XP not detected by GRUB. Edit Remove
8
Affects Status Importance Assigned to Milestone
ubiquity
New
Undecided
Unassigned
grub-installer (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: grub-installer

I just installed Ubuntu 7.10 on a separate partition (/dev/sda8) on a machine that already runs Ubuntu 7.04 on /dev/sda6 and Windows XP Media Center Edition on /dev/sda1. However, the grub menu only shows Ubuntu 7.04 under the "Other OS" category, not Windows. Also, during the grub installation phase, when the installer prompts the user to install GRUB to the MBR, it only listed Ubuntu 7.04, not Windows, under the "Other Operating Systems have been found" section. The relevant section of /boot/grub/menu.lst follows:

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sde6.
title Ubuntu, kernel 2.6.20-16-generic (on /dev/sde6)
root (hd0,5)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=e664517b-a99f-4c96-a394-d01be4d9a2e6 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sde6.
title Ubuntu, kernel 2.6.20-16-generic (recovery mode) (on /dev/sde6)
root (hd0,5)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=e664517b-a99f-4c96-a394-d01be4d9a2e6 ro single
initrd /boot/initrd.img-2.6.20-16-generic
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sde6.
title Ubuntu, memtest86+ (on /dev/sde6)
root (hd0,5)
kernel /boot/memtest86+.bin
savedefault
boot

However, when I run os-prober as a standalone command, following installation, it detects all 3 operating systems correctly, therefore I assume it was an issue with the grub-installer, not os-prober.

geza@ubuntu:~$ sudo os-prober
/dev/sda1:Windows XP Media Center Edition:Windows:chain
/dev/sda6:Ubuntu 7.04 (7.04):Ubuntu:linux
/dev/sda8:Ubuntu gutsy (development branch) (7.10):Ubuntu1:linux

Also, another issue is that, while the mount and os-prober commands identify my first hard drive (the drive to which I installed Ubuntu, and the only drive I have), as /dev/sda, as shown below and above:

geza@ubuntu:~$ mount
/dev/sda8 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.22-11-generic/volatile type tmpfs (rw)
/dev/sda5 on /home type ext3 (rw)
securityfs on /sys/kernel/security type securityfs (rw)

However, in the /etc/fstab (below) and grub menu.lst (shown at top), the hard drive is listed as /dev/sde rather than /dev/sda. It was also listed as /dev/sde during the partitioning portion of the installer, during the "the following partitions will be formatted: /dev/sde8" phase:

geza@ubuntu:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sde8
UUID=db9189d2-f08d-41b9-89c7-32e59029eb5d / ext3 defaults,errors=remount-ro 0 1
# /dev/sde5
UUID=bb944b99-fd78-4d83-9dd9-68b5d0bbd180 /home ext3 defaults 0 2
# /dev/sde7
UUID=2263a204-a3b4-4f36-8e0d-87fc49100fd9 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto,exec 0 0

Also, if you need my partitioning layout, it is as follows (/dev/sda5 is /home, /dev/sda6 is Ubuntu 7.04, /dev/sda8 is Ubuntu 7.10):

geza@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xcab10bee

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 8958 71955103+ 7 HPFS/NTFS
/dev/sda2 8959 30401 172240897+ 5 Extended
/dev/sda5 11575 30401 151227877+ 83 Linux
/dev/sda6 8959 10101 9181084+ 83 Linux
/dev/sda7 11444 11574 1052226 82 Linux swap / Solaris
/dev/sda8 10102 11443 10779583+ 83 Linux

Partition table entries are not in disk order

Revision history for this message
Geza Kovacs (gezakovacs) wrote :

My /boot/grub/menu.lst in Ubuntu 7.10, which lists only Ubuntu 7.04 not Windows under "Other OS", is attached

Revision history for this message
Geza Kovacs (gezakovacs) wrote :

Also, this bug breaks the grub-install command, as entering:

geza@ubuntu:~$ sudo grub-install /dev/sda

returns:

/dev/sda does not have any corresponding BIOS drive.

While entering:

geza@ubuntu:~$ sudo grub-install /dev/sde

returns:

/dev/sda8 does not have any corresponding BIOS drive.

However, judging from the error message, it appears that /dev/sde is mapped, for some reason, to the root device, /dev/sda8. Is this a bug or is it supposed to be a new feature?

Revision history for this message
Geza Kovacs (gezakovacs) wrote :

Also, for some reason, when entering:

sudo grub-install '(hd0)'

The following error is returned:

/dev/sda8 does not have any corresponding BIOS drive.

However, given that (hd0) is supposed to be /dev/sda (first hard drive, MBR), and /dev/sda8 is supposed to be (hd0,7), this appears to be a bug, as grub-install is attempting to install to a partition (specifically, the root partition), rather than to the MBR, when it is asked to install to '(hd0)'. In Ubuntu 7.04, however, the behavior is normal, as grub-install installs to the MBR with the command grub-install '(hd0)' and grub-install /dev/sda

Revision history for this message
Hasse Hagen Johansen (hasse-launchpad) wrote :

This also affects when trying to do a dualboot install with Windows XP & the new 7.10 beta. Windows is not add'ed to the grub menu. I would also believe the windows migration wizard would have launched? So somehow it seems the installer didn't detect windows?

Revision history for this message
Evan (ev) wrote :

Hasse,
Can you open up a different report for the migration bug? Please only do this if the partition that Windows was on was not scheduled to be deleted.

Thanks!

Revision history for this message
Khaoz (giulianisanches) wrote :

After a fresh install of ubuntu 7.10 i changed the menu.lst to boot on windows xp. After run an update grub.lst restore the defaults wihout windows.

Revision history for this message
Geza Kovacs (gezakovacs) wrote :

Khaoz, that problem is probably because you put the Windows XP entry inside the Debian Automagic Kernels section. Put it either before the ### BEGIN DEBIAN AUTOMAGIC KERNELS LIST or after the ### END DEBIAN AUTOMAGIC KERNELS LIST and it should remain there after an update-grub. If you have any other issues, open up a different bug; this but report is about the installer not update-grub.

Revision history for this message
Khaoz (giulianisanches) wrote :

Ty Geza. Sry for post about update-grub here.
And just to let you know i also got the same issue with installer. ;)

Revision history for this message
Michael Doube (michael-doube) wrote :

This is still an issue in Hardy alpha-2: Win XP installed on /dev/sda1, Gutsy installed on /dev/sda2, fresh install of Hardy alpha-2 to /dev/sda5 writes a menu.lst that doesn't include XP. The ntfs partition is recognised but the installer doesn't give an option to configure XP to boot. It can be fixed by adding a few lines to menu.lst after Hardy is installed, but this is a pain - why not (during installation) just find all the OS's on a system and allow the user to select the ones they want to appear in the Grub boot list? I'm sure this used to happen either in earlier versions of Ubuntu or Fedora.

Revision history for this message
Michael Doube (michael-doube) wrote :

Installed Hardy Alpha 3 to /dev/sda5 (then updated yesterday) and got the attached menu.lst.
Partitioning scheme is:

WinXP: /dev/sda1 * 1 1185 9518481 7 HPFS/NTFS
Gutsy: /dev/sda2 1186 2460 10241437+ 83 Linux
/home: /dev/sda3 2461 18182 126286965 83 Linux
            /dev/sda4 18183 19457 10241437+ 5 Extended
Hardy: /dev/sda5 18183 18947 6144831 83 Linux
            /dev/sda6 18948 19457 4096543+ 82 Linux swap / Solaris

The automatically-generated Grub menu is a total mess and notably, there is no Windows option (but I can choose to attempt to boot Gutsy or Hardy from /dev/sda1...)
This seems like a pretty nasty regression to me.

Revision history for this message
Michael Doube (michael-doube) wrote :

There are some really old bugs regarding grub config so I'm going to mark this as a duplicate and see what happens...

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.