ubuntu從wubi遷移到硬盤(適用於8.04 到 11.04)

This HOWTO describes how to migrate a Wubi install to partition. The partition(s) must be created already - this is not covered in this guide. The examples shown below assume the target partition is/dev/sda5 and the swap partition (if required) is /dev/sda6.

Automatic migration
The migration supports Wubi installs from 8.04 to 11.04, with Grub2 or grub-legacy. 
First download the attached file wubi-move-2.0.sh.tar.gz to your Downloads directory, right-click and choose "Extract here". 
The rest of the migration is run from the terminal. See How to migrate in pictures

To migrate to /dev/sda5 without swap

Code:
sudo bash wubi-move-2.0.sh /dev/sda5
To migrate to /dev/sda5 with swap on /dev/sda6
Code:
sudo bash wubi-move-2.0.sh /dev/sda5 /dev/sda6
If you don't want to install the grub bootloader, use the --no-bootloader option. You can boot from the Wubi install's grub menu temporarily and manually install the grub bootloader later.
Code:
sudo bash wubi-move-2.0.sh --no-bootloader /dev/sda5 /dev/sda6
To migrate from the root.disk when running from a live CD/USB (see 'Known issues with script' #2):
Code:
sudo bash wubi-move-2.0.sh --root-disk=/media/win/ubuntu/disks/root.disk /dev/sda5 /dev/sda6
For full usage instructions and notes:
Code:
bash wubi-move-2.0.sh --help
bash wubi-move-2.0.sh --notes

The code is now hosted on GitHub. You can keep track of new development or contribute. See https://github.com/bcbc/Wubi-move

Known issues with script:
1. Running "update-grub" in the chroot doesn't pick up other linux installations on the same drive (same running the script or manual commands listed above). This is unlikely an issue for wubi users. Run sudo update-grub after booting the new install for the first time.
2. When migrating from a live CD (using the --root-disk= option), the architecture of the live environment (32 or 64 bit) must match the architecture of Ubuntu being migrated. I recommend using the same release as well. So if your Wubi install is 10.10 64-bit, you should use the ubuntu-10.10-desktop-amd64.iso for your live environment. The script does not check this.
3. Mounted partitions are excluded from the copy when under /media or /host. Other mountpoints are not excluded automatically. This will be fixed in the next script release, but, in the meantime, if you have a 'custom mountpoint' please unmount prior to migrating.
4. Only the current kernel's initrd.img is updated on the migrated install; if you require others you can update them with "sudo update-initramfs -u -k <kernel version>".

Other known issues:
1. If you have updated packages grub-pc or grub-common there is a bug in Grub that can result in the migrated install not showing up in the Wubi grub menu. This only affects you if you are not installing the Grub2 bootloader. The fix is described under the Permanent Fix of the Wubi megathread.
2. Many older BIOSes cannot address more than 137GB from the start of the disk. If you try migrating to a partition that falls outside of this, then Grub2 will fail to load it's boot files. Even if only a part of the partition falls outside this range there is a possibility of grub failure in the future. Therefore, either confirm your BIOS is unaffected prior to partitioning, or ensure your target partition falls within this limit.
3. The process that Wubi uses to boot (wubildr.mbr) cannot read ext4 partitions. It reads partitions in BIOS order looking for the wubildr file, so if finds an ext4 partiton before it finds the wubildr file - it will hang up. So, make sure you install the grub2 bootloader if you migrate to a partition lower than the one containing wubildr i.e. if Windows is on /dev/sda2 and you migrate to /dev/sda1

 

原文地址:http://ubuntuforums.org/showthread.php?t=1519354

工具地址: https://github.com/bcbc/Wubi-move/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章