is more generic and even if setting the root is superfluous in the case of Wubi the setup above might be useful where the grub menu is used directly without going through the embedded menu.lst. The disadvantage is that using find --relative requires upgrading the grub package (which will probably be required anyway because of other patches).
On second thought, using:
find --set-root --relative= /ubuntu/ disks /ubuntu/ disks/boot/ grub/menu. lst
is more generic and even if setting the root is superfluous in the case of Wubi the setup above might be useful where the grub menu is used directly without going through the embedded menu.lst. The disadvantage is that using find --relative requires upgrading the grub package (which will probably be required anyway because of other patches).
--- grub-installer 2008-04-28 16:21:48.519362000 +0100
+++ grub-installer.new 2008-04-28 16:26:37.285702000 +0100
@@ -857,7 +857,7 @@
fi
if db_get grub-installer/ bootdev_ directory && [ "$RET" ]; then s:).*:) $RET:" $ROOT/boot/ grub/$menu_ file grub/$menu_ file:" $ROOT/boot/ grub/$menu_ file
need_update_ grub=1
- sed -i "/^# groot=/
+ sed -i "s:^# groot=:# groot=find --set-root --relative=$RET $RET/boot/
fi
A variation of the above involves looking for a UUID file as opposed to looking for menu.lst as suggested by Colin.