This page is for discussion related to Wubi development in the Intrepid cycle.
Further improve the user experience when using Wubi.
At the moment unclean shutdowns result in ntfs being flagged as dirty which in turns prevents us from mounting it. The user is then forced to clean the filesystem from within Windows, by booting and rebooting cleanly and sometimes by running chkdsk /r. It is important to be able to do consistency checks, fix most common problems and if it is safe to do so, reset the dirty flag and mount normally from within Linux.
This involves replacing the lupin-sysctl hacks to ensure that the host filesystem can be honor the sync mount option, so that nested fs journal does not get lost.
Colin King provided a patch (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/204133/comments/35 ) to add sync support to ntfs-3g
- Evaluate whether the patch is robust, remove lupin-sysctl, and mount root with appropriate parameters (passed via menu.lst?)
- Evaluate whether it is worth syncing the nested filesystem as well for extra resilience, preliminary tests from Colin imply that this brings a performance hit of about 50%.
It should be possible to improve on the stock loop module. See:
Colin King seems to like the dm-loop approach, although he mentioned that dm-loop will give better performance only if it has direct access to the block device - in the Wubi case it won't, so the difference is debatable. More testing is required to confirm this.
Remounting of loopfiles
Hibernation with swap files
It seems that this feature is already planned for Intrepid because other projects also require it (confirm). At the moment suspend-to-disk works when swap is on file, but resuming does not.
D-I support (i.e. same hooks as lupin-casper)
- initrd-preseed needs to be able to take UUID and path; possibly file-preseed as well but we really need the former
- iso-scan needs to be able to take UUID and path
- sync this with lupin-casper
- lupin-casper should drop initrd-override
- casper-premount.sh should be native to lupin-casper
HD-media like installation from HD (target empty partitions?)
- Depends on fixing bugs in partman that cause partition tables to be marked dirty
- Any partition table changes require the disk to be entirely unused during partitioning, which is infeasible in Ubiquity
- Consider supporting this only for d-i
Better build scripts
- nsis is available in the repositories so that wine is not strictly required for building (still handy for quick tests)
Consider Wubi Frontend Rewrite
Current nsis code is difficult to maintain. But there is a trade-off in terms of size increase.
- Python + PyGTK (would bring the installer to 4.5+MB)
- Python + Venster (would bring the installer to 2.5+MB)
- C++ with MFC/Win32 API
Add support for resizable virtual disks. This can be done via:
- Use 4GB contiguous (zeroed) + nGB sparse
- qcow2 type of images
MyDocuments and Host bookamarks
Add bookmarks for MyDocuments and Host drive
- Evan does not want to add this to m-a. He's afraid users would get horribly confused when they removed their NTFS partition and all of their documents suddenly disappeared. Since it's specific to Wubi, Evan thinks it should be done there.
- It was agreed that bookmarks are a preferred solution over symlinks or bindmounts.
One complication of having a MyDocuments bookmark is that it does not necessarily lie in the /host volume, so that the partition might not be mounted and/or mounted with r/o permissions.
- Add bittorrent support to the download manager:
- Try first to use bittorrent
- If that fails, use http with automatic country mirror selection
- Add automatic proxy support
Windows GUI Chnages
- Add "Use existing ISO" button during download, to use a pre-downloaded ISO (at the moment ISO and wubi.exe can be placed in the same folder, but it is not too obvious).
- Keep the accessibility page in sync with the gfxboot one
- In umountfs unmount items in /proc/mounts in reverse order stopping at /.
- Don suggested using lazy unmount (-l) but it should not be required given the above, also lazy unmounts do not help with /host since that contains / which is never unmounted.
- Keep the -f option, but either fix its behaviour within umount when handling bindmounts (now umount -f bindmount will unmount the underlying device) or keep using WEAKMOUNTPOINTS
Replace 7z with bsdtar to extract ISO content
- bsdtar (can extract ISO image as if it were a tar file)
- Rely on existing Ubuntu CD or USB stick; alternatively, offer to burn an existing CD or USB stick
- All from Ubuntu; Windows need not be involved
First stage (within Ubuntu)
- Ubiquity derivative with a simpler UI; partitioning options are more restricted, and many questions need not be asked;
- Language, keyboard, user questions are unnecessary because all the answers are in place on the source filesystem already; migration-assistant is unnecessary
- Simpler partitioner, No advanced partitioner. Autopartitioning alternatives:
- Resize nominated partition
- Select free space
Install into existing partition? -> general feature
Ask the user if they have an existing ISO if they want to use. Use BitTorrent to download a new ISO if they do not.
- Asks whether the user prefers to use a USB key (warn about wiping it) or burn a CD
- Modifies a known bit on the disk to notify gfxboot-theme-ubuntu that it should show the migrate option (TBD).
- As an alternative to using a CD/USB for the second stage, it might be possible to use a D-I based initrd with local preseeding, that would avoid issues with burning a CD (bad medium) and booting off CD/USB (BIOS, people ejecting the media). In this case in stage 1 we create a preseed file, download d-i initrd/kernel in /boot, and replace menu.lst. All the user has to do is selecting "Ubuntu" at next reboot, then d-i kicks in in non-interactive mode. The first stage ubiquity interface and the second stage tasks are the same as in the CD/USB approach.
Second Stage (after reboot)
- mount partitions and clear if necessary (i.e. normal bottom half of partman)
- copy - potential checksumming will depend on method of copying:
- dd + resize filesystem (only if we have a sane method of dding a sparse file)
partimage (backup suite that can skip zeros) http://www.partimage.org/Partimage-manual_Introduction
- file-level copy as usual in ubiquity
- dd + resize filesystem (only if we have a sane method of dding a sparse file)
- regenerate fstab from scratch
- regenerate menu.lst
- install grub package and do usual grub installation
- remove lupin-support package
- regenerate initramfs
Third stage (post-install)
- Notify the user that they can remove Wubi from the Windows side.
Ubiquity Partitioning Page Mockup
Following is a draft to enhance the usability of the Ubiquity partitioning page to be used both in Ubiquity and Wubi migration tool. (in case of Wubi migration, the options resize/delete options will be limited to feasible situations).
You currently have Ubuntu installed in a Windows partition. [*] Copy your existing installation into a dedicated partition [ ] Install Ubuntu from scratch Install into: [*] Available free space in hard disk #1 (sda, 8GB) [ ] Available free space in hard disk #2 (sdb, 6GB) [ ] Empty partition #2 of hard disk #1 (sda2, 26GB) [ ] Empty partition #5 of hard disk #1 (sda5, 12GB) [ ] Advanced Mode Free up space for the new installation: [Resize an existing partition] [Delete an existing disk/partition]
The install-into list only contains safe items, I.E. items that do not contain any file and are large enough. For instance, if disk #1 is in use, and the user wants to dedicate the full disk #1 to the installation, he will have to click on "Delete an existing disk/partition", delete disk #1 and then select "Free space in hard disk #1" which will appear in the install-into list.
This is safer and clearer than merging the two operations into a single action such as "Install into disk #1", as in current ubiquity dialog. In particular, with the above suggestion, it is not possible to accidentally overwrite/delete any file unless the user explicitly selects "Delete an existing disk/partition" or (s)he uses the "Advanced Mode".
If there is no available free space or empty partition the Install-into list will instead display a message such as "No free space is available. You will need to free up some space first in order to continue the installation. A minimum of 4GB are required."
Resize partition dialog:
Squeeze [partition #1] in [disk #1] to 5GB [ =====|========= ] and free up 10GB ----------------------------------------------------- Partition Info: /dev/sda1 Total size: 15GB In use: 4GB Label: mytarget Filesystem: NTFS Files: WINDOWS, temp, Program Files, RECYCLER ----------------------------------------------------- [Resize Partition] [Cancel]
Delete partition dialog:
Delete: [partition #1 | all partitions] in [disk #1] and free up 15GB ----------------------------------------------------- Partition Info: /dev/sda1 Total size: 15GB In use: 4GB Label: mytarget Filesystem: NTFS Files: WINDOWS, temp, Program Files, RECYCLER ----------------------------------------------------- [Delete Partition] [Cancel]
Advanced Mode (same as ubiquity):
- Overwrite an existing disk/partition #skip disk/partitions where wubi is installed
- Create multiple mountpoints
Porting Wubi to other platforms
- Support installing inside a folder (no loopfile). Handy for Lubi and Mac ports.
- very important that this be separated such that it imposes zero cost on most Ubuntu users
- lubi (wubi for linux)
- mubi (wubi for mac)
Porting Wubi To Debian
Requires porting upstream all the changes to initramfs-tools, grub & co, sysvinit scripts, casper/d-i initrd hooks, lupin-support.
- ... and almost certainly most of Ubuntu's d-i customisations! This is a large project (which should be done anyway, but will take a while and contains some elements which are likely to be contentious).
- console-setup needs to become the default in Debian
- localechooser encoding support needs to be fixed
- Investigate the opportunity of a tighter integration with the win32-loader project (at the moment it does netinstallation only).
- Support for \"large\" distros such as Ubuntu Studio or Ubuntu Education Edition (support separate add-on CD directly? or leave it as post-installation task? shall we automate such tasks somehow?)
- support DVD
- Bootable USB device with ISO with casper-rw
- Grub2 (as recommended by bean123)
- grub is still unsupported in Ubuntu anyway, and it won't be critical to have grub4dos unsupported too
- we should move over eventually, but consensus is \"not yet\"
- Built-in CD burner (need to evaluate CD burning libraries)
- Online resizing (in particular squeezing of ntfs partition while it is mounted and even hosting /)
- native ntfs installations (last time I checked szaka mentioned it was 2 years away)
- fallocate in ntfs/vfat (we can generate the virtual disk images via the windows frontend)