Comment 9 for bug 888281

Revision history for this message
bcbc (bcbc) wrote :

I've just tested the patch on a FAT32 wubi install and it worked as intended.

In order to test it, I manually edited the /usr/share/grub/grub-mkconfig_lib file during the installation (patch wasn't installed), used 'diff' to confirm it matched the patch, and then copied it to /target/usr/share/grub/grub_mkconfig_lib (/target/usr is the mount point for /dev/loop4 which is for the usr.disk virtual disk). And root.disk was mounted as /dev/loop2 on /target.

The grub.cfg that was generated during the install is attached, and it shows that usr.disk will be mounted on loop4 by grub and root.disk is mounted as loop2:
insmod part_msdos
insmod fat
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 2dab-fe25
loopback loop4 /ubuntu/disks/usr.disk
set root=(loop4)
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod fat
  set root='(hd1,msdos5)'
  search --no-floppy --fs-uuid --set=root 2dab-fe25
  loopback loop2 /ubuntu/disks/root.disk
  set root=(loop2)
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
...

After rebooting and selecting the Wubi install, there was no error or return to the menu. Then running "sudo update-grub" resulted in grub.cfg changing the loop device for usr.disk to loop1 and root.disk to loop0 (as expected):
insmod part_msdos
insmod fat
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 2dab-fe25
loopback loop1 /ubuntu/disks/usr.disk
set root=(loop1)
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod fat
  set root='(hd1,msdos5)'
  search --no-floppy --fs-uuid --set=root 2dab-fe25
  loopback loop0 /ubuntu/disks/root.disk
  set root=(loop0)
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi