lupin merge progress

ago agostino.russo at
Thu Aug 23 01:11:48 BST 2007

I have uploaded some code to

That includes some casper addons to allow for 2 optional boot
paramters: find_iso and find_preseed. The first will scan all block
devices and will try to use the first match to be mounted as /cdrom,
the second does look for a preseed_file on block devices and it passes
it on as preseed/file. It also resolves the issue of having to map
windows drives to linux devices: it uses the same find_path algorithm
to heuristically find a linux device where some particular file
resides, this is used to find the device containing the user settings
to be imported by m-a, and the device on which to create the
loopinstallation files.

The second piece is a simple init.d script (based on gdm) to
automatically launch Ubiquity in a barebone X session when the cd is
started with the boot option '--automatic'. Ubiquity could of course
also be started within a full gnome desktop. The issue is that if we
are in automatic mode that's likely because users will first run the
windows wizard, which will install "stuff" and reboot. If they reboot
into a desktop environment, almost everyone will be lead to believe
that the installation is completed when it actually did not even start
and that might be a bit confusing.

Note that I could not test much the above code, which might not even
work. In fact at the moment find_iso creates a problem when trying to
mount squashfs when /cdrom is itself on a loop device... The error is
"attempt to access beyond end of device". Looks like nested loop
mounts do not go down well (they do work in feisty).

I also found a solution for the path problem of menu.lst. The issue
was that when /boot is bindmounted to /host/boot, the menu.lst file is
generated using linux paths (/boot/vmlinuz) but the file is used by
grub4dos in windows where the paths are different
(/ubuntu/disks/boot/vmlinuz). In wubi I used a bad hack to remap via
sed at each reboot and so far I could not think of any elegant way to
handle that. Then it occurred to me that dealing with the issue from
within grub4dos is far more manageable. A groot_prefix parameter is
all is needed. So if you have groot=(hd0,0),
groot_prefix=/ubuntu/disks, root /boot/vmlinuz, the kernel loaded will
be (hd0,0)/ubuntu/disks/boot/vmlinuz. The only restriction is that you
have to name the host folder in the same way as the linux bindmounted
folder: /*/boot <-> /boot. I have contacted the grub4dos devs, they
have not replied yet, but they are usually very responsive. This was
probably the main issue left for lupin. I do not think at this point
that there is any need for a separate lupin package.

Things that are still on my todo list:

1) fstab + remounting issues:

/etc/fstab should probably look something like the following:

/dev/sdX /host defaults ntfs 0 1
/host/ubuntu/disks/root.disk / ext3 loop 0 2
/host/ubuntu/disks/boot /boot auto bind 0 3
/host/ubuntu/disks/swap.disk none swap sw 0 0

In the above:

A) /host has to be handled by /etc/init.d/ before /
B) / has to be remounted rw, which is an issue when the loop device is
originally created on a r/o filesystem.
C) swap has to be presented as a swap file and not as a loop device,
which might interfere with the correct functioning of swap.

2) bind-mount boot folder during installation + grub installation

3) sysctl settings to improve fs robustness in case of hard reboot. I
still think that sysctl.conf should simply be set during installation
and not be handled in a separate package which creates an initr.d
script to call sysctl. The suggested parameters are:


4) Hibernation/suspend. mjg59 was supposed to look for ways to suspend
when fuse is used as root. So suspend might be feasible after all
(need to chase up mjg59), there is little hope for hibernation, so
that might have to be disabled. The same reasoning as above applies.

5) Make sure that windows line endings (CR+LF) are also supported in
preseed. People may edit the preseed file from within windows before

6) Add needed hd/fs modules to live CD initrd

7) Image files should be contiguous to avoid performance issues. In
wubi we used a windows api command to preallocate the space without
having to zero the full file, one way to replicate that within linux
might be by using the seek option in dd and then writing the last

8) What to do when the loopinstallation folder is not vergin? My vote
is for ending the installation immediately, if a user wants to
overwrite an existing installation s/he has to uninstall and reinstall
explicitly. This might be annoying if the user is repeating the
installation because the previous one was interrupted, but it's worth
to be on the safe side.

9) Not sure how the killall5 bug is going

Hope it helps,


More information about the Ubuntu-installer mailing list