How to patch a disk image - ntai/WCE-Installation GitHub Wiki

Essentially, you need to install to a disk, fix the installed Ubuntu, and create the image file from the disk.

Here is the steps.

1 - Install the image to a disk

You must have only one disk, and not mounted.

$ sudo ./install-ubuntu.py --batch-install wce-2012-05-31.partclone.lzo

In this steps, the disk is /dev/sdg

2 - Mount the disk

$ sudo mount /dev/sdg1 /mnt/wce_install_target

3 - Edit the /usr/local/bin/access-world-computer-exchange

$ sudo emacs /mnt/wce_install_target/usr/local/bin/access-world-computer-exchange

Here, I'm using emacs but use any text editor you like. Find the line "wget_command", and replace the second '?' to '&'

wget_command = 'wget -O /dev/null "%s?uuid=%s?timestamp=%s"' % (access_url, computer_uuid, timestamp_str)

then,

wget_command = 'wget -O /dev/null "%s?uuid=%s&timestamp=%s"' % (access_url, computer_uuid, timestamp_str)

Save the file and exit.

4 - Unmount the disk

$ sudo umount /mnt/wce_install_target/

5 - Create the install image

sudo ./install-ubuntu.py --create-install-image wce-2012-05-31b.partclone.lzo