/wubiuefi-edit-folder

change WUBI installed folder name (C:\ubuntu) to others (e.g: C:\ubuntu_1710)

Primary LanguageShell

wubiuefi-edit-folder

You can change WUBI installed folder name (C:\ubuntu) to others (e.g: C:\ubuntu_2004)

First, run the below script on 'Ubuntu'

$ wget https://github.com/yomun/wubiuefi-edit-folder/raw/master/wubi-edit-folder-name.sh
$ sudo bash wubi-edit-folder-name.sh

*** If you want to use others folder name, please change the script
*** NEW_FOLDER_NAME="ubuntu_2004"

--------------------- Windows ---------------------

Reboot Machine, goto Windows

  1. Change the folder name from C:\ubuntu to C:\ubuntu_2004

  2. Copy C:\winboot\* (5 files, generated by above script) & replace to C:\ubuntu_2004\winboot\*
    C:\wubildr & C:\wubildr.mbr also want to change..

--------------------- Ubuntu 17.10 ---------------------

Reboot Machine, goto GRUB 2

  1. Choose 'ubuntu' & press 'e' (Edit Mode)
    change the path from /ubuntu/disks/root.disk to /ubuntu_2004/disks/root.disk (2 places)

    loopback loop0 /ubuntu_2004/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-4.13.9-041309-generic root=UUID=123ABC loop=/ubuntu_2004/disks/root.disk ...
    initrd /boot/initrd.img-4.13.9-041309-generic

    ctrl+x, run it..

  2. Change the path from /ubuntu/ to /ubuntu_2004/ at /etc/fstab
    $ sudo gedit /etc/fstab

    /host/ubuntu_2004/disks/root.disk / ext4 loop,errors=remount-ro 0 1
    /host/ubuntu_2004/disks/swap.disk none swap loop,sw 0 0

  3. Update Grub 2
    $ sudo update-grub