Wubi uses two distinct techniques. The disk image technique downloads a preinstalled disk image file that has been compressed. Then it uncompresses this as the
root.disk and then uses
resize2fs to make it whatever size you want. Then it remains to create the user account at login which it does with a preseed file:
d-i clock-setup/utc boolean false
d-i time/zone string $(timezone)
d-i passwd/user-fullname string $(user_full_name)
d-i passwd/username string $(username)
d-i passwd/user-password-crypted password $(password)
d-i user-setup/encrypt-home boolean false
d-i netcfg/get_hostname string ubuntu
d-i debian-installer/locale string $(locale)
d-i keyboard-configuration/layoutcode string $(keyboard_layout)
d-i keyboard-configuration/variantcode string $(keyboard_variant)
$(xxx) are replaced by the Wubi installer - most are fairly straightforward, but my attempts to get the password correct failed (easily reset later).
Then it remains to boot the install with the preseed file:
loopback loop0 /ubuntu/disks/root.disk
search --set=diskroot -f -n /ubuntu/disks/root.disk
probe --set=diskuuid -u $diskroot
linux /vmlinuz root=UUID=$diskuuid loop=/ubuntu/disks/root.disk preseed/file=/ubuntu/install/preseed.cfg wubi-diskimage ro quiet splash
Anyway that's the easiest way to get Wubi manually installed. I recently did it on a Virtual machine running EFI firmware.
The other technique is to get
ubiquity (the desktop installer) to install directly to the
root.disk. This requires a preseed file as well. Wubi kicks off the installer via
grub4dos, then uses the kernel extracted from the ISO to boot the ISO (which has been saved to disk). Then it preseeds the installer. This is a lot more complex than using the pre-installed disk image.