grub-install wrapper inconsistencies
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lupin (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: lupin-support
When wubi is not installed to the same partition as Windows, the grub-install command acts differently. It appears that the wrapper to grub-install that has been provided with lupin-support doesn't recognize a wubi install if the partition is different. Since the grub-install wrapper is invisible to a user and not documented (in any form available to wubi users that I am aware of), this can result in problems.
My tests were performed on the same wubi 10.04 install (root.disk) on two separate machines. On one it was installed on the same partition as windows xp. On the other it was installed on an external usb drive. This is a summary of what I found.
Same partition as windows:
grub-install /dev/sda # appears to work, but doesn't (MBR unchanged)
grub-install /dev/sda2 # recreates the wubildr file on windows partition
grub-install --root-
Different partition than windows:
grub-install /dev/sdb # works (grub in MBR points to partition #256)
grub-install /dev/sda2 # does not work (had to mount this separately, since it's not in /host)
grub-install /dev/sdb8 # does not work (this is the actual wubi partition)
grub-install --root-
Here is some terminal output showing the above. I haven't included the --root-directory commands but I've done this test a number of times.
Wubi installed to same partition as windows
=======
bcbc@ubuntu:~$ grub-install -v
error: cannot open `/dev/sda' while attempting to get disk size.
loop: can't open device /dev/loop0: Permission denied
grub-install (GNU GRUB 1.98-1ubuntu6)
bcbc@ubuntu:~$
bcbc@ubuntu:~$ ls -l /host/wubildr
-rwxrwxrwx 1 root root 88171 2010-07-06 11:15 /host/wubildr
bcbc@ubuntu:~$ sudo grub-install /dev/sda2
[sudo] password for bcbc:
Installation finished. No error reported.
bcbc@ubuntu:~$ ls -l /host/wubildr
-rwxrwxrwx 1 root root 88171 2010-07-11 17:02 /host/wubildr
bcbc@ubuntu:~$
bcbc@ubuntu:~$ sudo grub-install /dev/sda
Installation finished. No error reported.
bcbc@ubuntu:~$ cd Downloads/
bcbc@ubuntu:
boot_info_
RESULTS1.txt RESULTS3.txt RESULTS.txt wubi-notes2.txt
bcbc@ubuntu:
Identifying MBRs...
Computing Partition Table of /dev/sda...
Searching sda1 for information...
Searching sda2 for information...
Searching sda2/Wubi for information...
Searching sda3 for information...
Searching sda5 for information...
Searching sda6 for information...
Finished. The results are in the file RESULTS5.txt located in /home/bcbc/
bcbc@ubuntu:
=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #5 for /boot/grub.
(No change)
Wubi installed to different partition (on external usb drive)
=======
bcbc@ubuntu:~$ grub-install -v
loop: can't open device /dev/loop0: Permission denied
grub-install (GNU GRUB 1.98-1ubuntu6)
bcbc@ubuntu:~$
bcbc@ubuntu:~$ ls /host/
Pictures Ubuntu Forums - [wubi] Wubi help_files
Recycled Ubuntu Forums - [wubi] Wubi help.html
System Volume Information wubi-move-
ubuntu wubi notes.txt
bcbc@ubuntu:~$ sudo mount | grep 'sda2'
[sudo] password for bcbc:
bcbc@ubuntu:~$ sudo mount /dev/sda2 /mnt
bcbc@ubuntu:~$ ls -l /mnt/wubildr
-rwxrwxrwx 1 root root 80467 2010-04-26 20:38 /mnt/wubildr
bcbc@ubuntu:~$ sudo grub-install /dev/sda2
/usr/sbin/
/usr/sbin/
/usr/sbin/
bcbc@ubuntu:~$
bcbc@ubuntu:~$ sudo grub-install /dev/sdb8
/usr/sbin/
/usr/sbin/
/usr/sbin/
bcbc@ubuntu:~$
bcbc@ubuntu:~$ sudo grub-install /dev/sdb
Installation finished. No error reported.
bcbc@ubuntu:~$ cd Downloads/
bcbc@ubuntu:
Identifying MBRs...
Computing Partition Table of /dev/sda...
Computing Partition Table of /dev/sdb...
Searching sda1 for information...
Searching sda2 for information...
Searching sda3 for information...
Searching sda4 for information...
Searching sda5 for information...
Searching sda6 for information...
Searching sdb1 for information...
Searching sdb2 for information...
Searching sdb5 for information...
Searching sdb6 for information...
Searching sdb7 for information...
Searching sdb8 for information...
Searching sdb8/Wubi for information...
Searching sdb9 for information...
Searching sdb10 for information...
Searching sdb11 for information...
Searching sdb3 for information...
Finished. The results are in the file RESULTS4.txt located in /home/bcbc/
bcbc@ubuntu:
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
partition #256 for /boot/grub.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: lupin-support 0.29
ProcVersionSign
Uname: Linux 2.6.32-23-generic i686
Architecture: i386
Date: Sun Jul 11 17:17:23 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
PackageArchitec
ProcEnviron:
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: lupin
Thanks for your report. In the buggy situation, could you please run:
sudo sh -x /usr/bin/ grub-mkimage --test
... and post the output to this bug?