0

So, I've tried to move my wubi installation between disks and followed this: Move WUBI installation of Ubuntu to a different partition in Windows

However once I start applying the edits to the grub, I am unable to boot.

I've switched set root=(hd0,msdos2) to root=(hd0,msdos1) Deleted the line - search --no-floppy xxx and switched linux /boot/vmlinuz-xxxx root=UUID= xxxxx ... to linux /boot/vmlinuz-xxx root=/dev/sda1 ...

Once I boot up it doesn't find a command list and states error not found. If required, I can grab a picture of it to show how the grub looks. I'm terribly inexperienced with Ubuntu, especially at this degree. Any help is much appreciated.

Miko
  • 179
  • 1
  • 1
  • 6

1 Answers1

0

When it boots, hold Shift to get the grub menu. Then press C to get to a Grub command prompt enter the following (be careful; no typos; nothing here will harm anything so just start again if necessary):

search -s -f -n /ubuntu/disks/root.disk
probe --set=diskuuid -u $root
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /vmlinuz root=UUID=$diskuuid loop=/ubuntu/disks/root.disk ro quiet splash
initrd /initrd.img
boot

What does the above do? 1.) Finds the root.disk (file) and sets $root to the partition it found it on. 2) Gets the UUID of the partition. 3) Creates a loop device (fake partition) from the root.disk on loop0. 4) Sets root to the loop device. 5) identifies the kernel off the loop device while setting the host partition from the UUID. 6) identifies the initial ram disk off the loop device. 7) boots the Wubi install

Once you have booted Wubi, run

sudo update-grub

After that it will boot normally.

Edit:

I seem to recall that the Grub probe command wasn't added until after 12.04. If it doesn't work, then substitute #2 with the following:

echo $root

Now note what it says e.g. /dev/sda2 and then change #5 to directly reference the partition, not the UUID with e.g.:

linux /vmlinuz root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
bcbc
  • 6,026