wubi-move-to-partition in Karmic

Bug #456549 reported by CeesSluis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Wubi
Fix Released
Medium
Unassigned

Bug Description

The Wubi Guide (https://wiki.ubuntu.com/WubiGuide) contains a script called wubi-move-to-partition (Copyright (C) 2008 Agostino Russo).

I used this script in Ubuntu Karmic 9.10 beta but 2 issues occurred:

First I got a GRUB Error 2. Recovering grub2 with a LiveCD solved this.

The script output was:
wubi-move-to-partition: 153: grub: not found

Because Ubuntu Karmic 9.10 use grub2?

Second there were no UUID in /etc/fstab
The script output was:
Editing fstab...
wubi-move-to-partition: 151: vol_id: not found
wubi-move-to-partition: 151: vol_id: not found

The script uses vol_id but vol_id is not available in Ubuntu Karmic 9.10 (blkid?).

Ubuntu did start and /etc/fstab could be edited. So I'm fine but this script should be upgraded for 9.10?

Revision history for this message
Agostino Russo (ago) wrote :

Yes that is a bit old, I will provide an updated version when I have some time

Revision history for this message
Johan van Dijk (johanvandijk) wrote :

Instead of "vol_id --uuid $dev" you could use "blkid -s UUID -o value $dev"

Revision history for this message
Johan van Dijk (johanvandijk) wrote :

I have updated the script, I changed all occurrences of vol_id commands to blkid commands.
I don't know how to make a patch, diff or something else you might need, so here's the complete file.

Revision history for this message
Agostino Russo (ago) wrote :

Thanks a lot Johan!
I will test it in the coming days and update the wiki

Changed in wubi:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
arielon (ari-arielon) wrote :

Used the "wubi-move-to-partition" in #3. I'm still having

wubi-move-to-partition: 153: grub: not found

Ubuntu 9.10

Revision history for this message
bcbc (bcbc) wrote :

I've had a go at fixing this. I've made a number of changes, mostly cosmetic. e.g. added options, comments, suppressing command output in favour of script messages etc.

It won't run with grub-legacy, and I've removed the device map logic. It will run update-grub on the target partition only. Installing the grub2 bootloader is option (defaults to no) - instead the wubi grub menu is updated to verify the install prior to installing the bootloader. Probably the default should be to install it, but that can always be changed.

I've tested it using an external drive... without any probs. The only issue I have unresolved is when I run update-grub in chroot from wubi I get some exceptions about finding /host. I thought chmod -x on the 10_lupin script would fix that, but it didn't.

Revision history for this message
bcbc (bcbc) wrote :

I've fixed the /host issue by creating an empty /host on the target.
I've set it up so hibernation will work on (provided supplied swap partition is big enough)
I also added a check to ensure the swap partition supplied is of type "swap"
I added back the create_swap procedure(left out by accident)

Only issue I've found is that the update-grub in chroot detects the ubuntu os on my internal drive, but not the ubuntu os'es on my external. This can be fixed by running update-grub after booting the first time (unlikely to be an issue for normal wubi user's)

I have yet to test this script on a single drive due to space issues.

Revision history for this message
bcbc (bcbc) wrote :

This version is better tested - on a single internal hard drive more typical of wubi installs - and works on 10.04 and 9.10.

Usage:
  sudo bash wubi-move [options] target_partition [swap_partition]
e.g.
  sudo bash wubi-move /dev/sda5 /dev/sda6

or for usage description
  bash wubi-move -h

It installs the grub2 bootloader by default, but you can either bypass it through the --no-bootloader option or when prompted.

I've removed the verbose option from the rsync command, so there is no direct feedback during the copy phase - it takes about 5 minutes on my machine on a small install.

Apologies to Agostino if I messed up the copyright. I'm new to this and the script is totally based on his.

Revision history for this message
bcbc (bcbc) wrote :

Latest version - minor fixes.

Revision history for this message
bcbc (bcbc) wrote :

I've created a howto with the latest script at http://ubuntuforums.org/showthread.php?t=1519354

Revision history for this message
bcbc (bcbc) wrote :

Please update the wubi guide to remove the wubi-move-to-partition script as it doesn't work. It's better to have nothing there than to have a broken script.

The script I have has worked successfully for a number of people, it just doesn't support grub-legacy (but it checks for grub-legacy and won't attempt a conversion).

But until such time as a decision is made to a suitable fix, it is better to remove the old one from the wubi guide.

Revision history for this message
bcbc (bcbc) wrote :

The Wubi Guide is updated to specify that the wubi-move-to-partition is only for release 8.04 and earlier. There is a link to the Howto guide and new script (that now supports grub-legacy).

Changed in wubi:
status: Confirmed → Fix Released
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.