Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

  • Launchpad Entry: lupin

  • Packages affected: ubiquity, wubi, lubi, initramfs-tools


Merge lupin project capabilities within the official initrd and the LiveCD initrd/installer.

Release Note

Lupin is a project that allows to install and boot Ubuntu (or any Debian based distro) from within a loopmounted file. The main advantage is that the installation can be performed without having to burn a CD-Rom, and without having to modify existing partitions. This implies that Ubuntu can be installed/uninstalled as an ordinary program.


See InstallerForWindows


At the moment the Lupin initrd incorporates functionalities to accomplish both installation and normal booting duties, such functionality will need to be split into standard initrd patches and LiveCD patches.

Normal Booting

The following is an unordered list of lupin initrd tasks and how they should be moved upstream:

  • Lupin at the moment uses a heuristic algorithm to discover the host device. This code was written to overcome difficulties with mapping windows drives to linux/grub devices. The code has to be moved to the front-end so that the host device is passed as an optional kernel argument
  • Lupin takes care of Installing ntfs-3g: this code will be removed assuming that the following blueprint is implemented:

  • Lupin detects whether to perform a normal boot or an installation: This code will be irrelevant once 2 separate initrds are used, one for installation and one for booting.
  • Lupin modifies the init.d scripts to patch bug 78375: a proper fix should be handled upstream (probably using new patch that supports the -x argument in killall5) therefore the current lupin code will become irrelevant

  • Lupin "clones" itself by replacing /etc/initramfs-tools on the target system, this allows to be able to upgrade the kernel and generate new initrds which are capable of booting from loopmounted file. The code becomes irrelevant once lupin is merged upstream.
  • If a kernel parameter specifying a host devices is used, Lupin mounts the host device (generally using ntfs-3g) then sets the root device variable to the virtual disk within the host device. This is implemented within local-top hook, and the code will need to be merged upstream.
  • After the system.virtual.disk is mounted to /root, the host device is mount-moved to /root/media/host, which in turn is available as /media/host once booted
  • The /boot folder on the target system is replaced by a symlink to the windows boot folder (available under /media/host/wubi/boot)
  • Lupin modifies update-grub so that the path to the boot folder is correct under windows and so that "find --set-root" is used by grldr. The latest point is taken care of by mapping the host device to linux/grub devices within the front-end. As to the first issue I need to think about it.


Need to be able to boot either from HD and (then use ISO or CD-Rom) or from CD-Rom. A user might boot from HD without using any CD at all (hd-media style). But we also assume that the user may reboot with the CD-Rom inserted, and that might happen also when using the windows-installer to perform a loopmount installation. As we know, that does not necessarily imply that the CD-Rom is actually booted. Moreover we assume that a user might want to use the windows installer to overcome BIOS problems and launch the LiveCD as opposed to perform a loopmount installation. Therefore the installation process should be the same whether the initrd is loaded from hard disk (HD booting) or whether the Live CD is booted. The same initrd is therefore used in both cases. This also means that we should rely on heuristics and not on kernel parameters.

  • Once booted the initrd scans all partitions for signs of a (virgin) ubuntu installation folder (containing preseed, and virtual disks). If one is found loop-installation is assumed otherwise LiveCD mode is assumed. Currently we test whether preseed is available and whether the system.virtual.disk is mountable (might be safer to test whether its first nK are zeroed).
  • in loop-installation the host device is mounted, and the preseed file is imported (and deleted?)
  • in loop-installation mode we check whether the ubuntu installation folder contains the desired ISO (specified in preseed?) otherwise CD-rom devices are scanned.
  • loop-installation functionality (partitioning, fstab creation, and so on) is ported into ubiquity. Ubiquity would probably need to boot in a streamlined mode without loading the full desktop (non interactive, with visual feedback).
  • Migration assistant functionality now within Lupin would also be taken care of by ubiquity (need to fix os-prober since the host device containing user settings will be mounted in most cases).
  • LiveCD mode should be accessible using the CD or an ISO on the HD.

Development Process

  • Add a new launchpad branch containing the new lupin code
  • Send patches upstream, and as soon as patches are accepted the equivalent code is removed from the new lupin branch
  • Ultimately the lupin branch should disappear

Test/Demo Plan

  • Lupin is currently implemented as a stand-alone product shipped with the Wubi and Lubi installers, most bug reports will apply to the new installation method

Outstanding Issues

  • Ntfs-3g must be preinstalled (uninstalling that will make new initrds unbootable when using NTFS as the host partition)
  • The boot folder is a windows folder (in order to be able to upgrade kernel)
  • At the moment Raid/IDE/Sata modules are included directly in the initrd
  • Hard reboots seem to be tolerated worse than usual (ntfs corruption might result in the ext3 journaling becoming corrupted and hence recovery might be problematic)


LupinMerge (last edited 2008-08-06 16:21:40 by localhost)