Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am on Ubuntu 10.10 and installed it through wubi. But the script exited at copying var/tmp. I do not have the exact error message but it said that some files were deleted before they could be transfered. I was confused so I restarted the computer. Now the computer still books into wubi but I cannot reuse the script as it says that the partition I am moving to is in use.

sudo ./wubi-move-to-partition /dev/sda7 /dev/sda6
Sanity checks...
Volume /dev/sda7 is in use. Aborting

What do I do now?

share|improve this question
add comment

2 Answers

Possible reason

Looks like it stopped after migrate_files ( function in that script ) and now it refuses to do it again because it checks if partition is formatted - you can see part of script that checks it here

    if mount -t auto "$dev" $target 2> /dev/null; then
    if [ $(ls -1 $target | wc -l) -gt 1 ] || \
    [ "$(ls -1 $target)" != "lost+found" ]; then    
        echo "Volume $dev is in use. Aborting"
        umount $target || true        
        exit 1
    fi
    umount $target
fi

if it find folder lost+found, which is usually on ext filesystems, it prints out Volume is in use and exits.

and possible solution

So, if you still can boot into wubi, delete filesystem from that partition by running gparted, select partition /dev/sda7, delete it. Then make new unformatted partition on same spot ( right click on unallocated, new, choose filesystem unformatted ). And run script again

possible solution if script will stop again

if it will stop again after copying files from /var/tmp, check what is there and you can exclude it from copying by adding --exclude /var/tmp/folder_that_dont_like_to_be_copied parameter to this part of script after --exclude=/sys/*

migrate_files(){
    echo "Migrating files..."
    rsync -av --exclude=/host --exclude=/mnt/* --exclude=/home/*/.gvfs --exclude=/media/*/* --exclude=/tmp/* --exclude=/proc/* --exclude=/sys/* / $target
}
share|improve this answer
add comment

Don't use this script on 10.10. It doesn't work anymore. Look at the wubi guide for a link to the latest migration script.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.