linux 学习笔记: 更换wubi image
将用dd生成的*。disk文件, copy 到 /ubuntu/disks/, rename to root.disk
boot to wubi, in grub menu, don't use the old menu, go into the command shell of grub
insmod part_msdos # support fat file system
insmod ntfs # support ntfs
set root='(hd0,msdos1)' # if not sure, use ls to check current disks, and find out which disk contains the /ubuntu/disks
search --no-floppy --fs-uuid --set=root 5A34xxx # if the last step of set root is correct, this step is not necessary, but if we use the search command to double confirm,
# make sure the UUID is correct (use 'ls' command to check and confirm)
loopback loop0 /ubuntu/disks/root.disk # by the way, if in this step, you wanna boot to other *.disk file, like root_old.disk, it's ok and possibled, I've tested OK.
set root=(loop0)
linux /boot/vmlinuz-x.x.x.x-generic root=UUID=5A34xxx loop=/ubuntu/disks/root.disk ro splash vt.handoff=7
initrd /boot/initrd.img-3.x.x.x.-generic
# finally run boot
boot
After boot successful, remember to modify the /boot/grub/grub.cfg file to make the changes of grub perminently, and make a backup of grub.cfg to make sure it won't lost.
I tried to use sudo update-grub to auto generate the grub.cfg, but failed, don't know why.
BTW, the grub.cfg is read-only, before change it, use chmod 777 to remove the readonly attributes
浙公网安备 33010602011771号