lupin merge progress

Colin Watson cjwatson at
Tue Jul 31 10:41:05 BST 2007

On Mon, Jul 30, 2007 at 10:47:47PM +0100, ago wrote:
> Looks much neater now than my implementation.

Glad to hear it.

> 1) The partman-auto-loop preseeding requires a disk+partition number.
> But the preseed file is generated from within windows (at least when
> setup.exe is used), and I do not know any good way to map a windows
> drive to a linux device from within windows (some windows expert out
> there might correct me on this). A workaround might be to also allow
> to preseed some other data to be used to find out the host partition
> and the loop file via heuristics.

OK; I noticed that some bits of lupin do this by looking for a named
file on the filesystem, so maybe we can do that? A bit fiddly, but it's

> 2) The hosting filesystem will be mostly mounted ro in normal
> circumstances, which means that it should be remounted rw, e.g. by
> using a /host entry in fstab and by modifying
> /etc/init.d/


> I am not sure whether you can change the fstype when remounting, in
> which case ntfs-3g has to be installed but it does not need to be
> within the initrd (which can use ntfs).

Changing the driver would involve unmounting and mounting again, rather
than just mount -o remount. I think it's much more straightforward just
to put ntfs-3g in the initramfs and use it right from the start, really.

> 3) Once grub is up, you should be aware of an issue with paths inside
> menu.lst, since menu.lst is used by grub4dos (where the kernel will be
> in c:/ubuntu/boot/vmlinuz) but menu.lst is generated within ubuntu
> where the path to the same file looks different (/boot/vmlinuz). At
> the moment this is taken care by
> lupin/devel/src/lupin-target/etc/init.d/cpkernel but there is probably
> a more elegant way to cope with it.

OK. I think it may well make sense for lupin to continue to exist to
take care of differences that are specific to running Linux inside a
Windows filesystem (as opposed to just loop-mounting in general).

> > Comments welcome! Is it possible to update lupin to make use of this, as
> > we discussed a while back?
> I can do that but if lupin.postinst is taken care of and initrd can
> take a loop argument, there will not be much left of lupin...

I have nothing against lupin, but that was the general idea. :-) To the
extent that lupin consisted of patches and workarounds for parts of the
installer that could be applied in a generally safe way, I wanted to
merge those, and I fully expected that lupin would get a lot smaller as
a result. If there's not a lot left, that's good, because it will make
it easier to see the parts that are left.

(I'd like to see the alternate-iso parts of lupin made into a proper
udeb, by the way. That's necessary if those parts are going to stick
around for things like grub menu.lst munging.)

> What is left, on top of the above, is:
> A) fix sendsigs to avoid killing userspace filesystems (I have noticed
> you have already submitted a patch)

Right. If I can figure out a way to test that adequately, I may well
upload it in advance of Phillip's NTFS work.

The only tricky bit is extracting the pid of the ntfs-3g process (which
should be done in the initramfs and then propagated to
/var/run/sendsigs.omit for use at shutdown). I was hoping not to have to
parse ps output for this, but that might be the most straightforward

> B) disable hibernation/suspend on loopmounted installations (mjg59
> might be able to fix suspend issues, but hibernation should not be
> feasible), see lupin/devel/src/lupin-target/DEBIAN/postinst

(Source packages don't customarily have upper-case DEBIAN directories,
by the way; those are normally constructed on the fly by programs called
from debian/rules.)

The conventional places to put that kind of thing would probably be in a
/usr/lib/finish-install.d script in lupin-udeb and a cloned-and-hacked
version of that in ubiquity/scripts/

> C) modify sysctl to make the filesystem more robust in case of hard
> reboots (those can damage the journal of the nested filesystem). The
> settings used at the moment (as suggested by szaka, ntfs-3g author)
> are:
> vm.dirty_background_ratio=0
> vm.dirty_ratio=0
> vm.dirty_expire_centisecs=1
> vm.dirty_writeback_centisecs=1

lupin shouldn't modify /etc/sysctl.conf for this; that's a conffile and
scripts may not modify it because that may result in conffile prompts on
later upgrades. It would probably be better for there to be a
properly-packaged lupin.deb shipping an init script that does that.

> D) Patch os-prober and m-a. See
> lupin/devel/src/alternate-iso/overlay/var/lib/dpkg/info/load-cdrom.postinst

I've applied the os-prober change upstream. Evan, could you look at the
migration-assistant changes? It looks like some of them may be
generally-applicable and some may need further thought as to how to
merge them properly, but I've only glanced over the sed expressions and
not checked the code it's patching.


Colin Watson                                       [cjwatson at]

More information about the Ubuntu-installer mailing list