ubuntu feisty netboot / alternatives install with lvm bug 105623

Ubuntu LP Bug 105623 has to do with the lvm device nodes taking a while to show up when doing a network / alternatives install with ubuntu. It appears that lvm waits to sync with udev and udev doesn’t do anything. Eventually lvm times out and makes the device nodes, but it’s something like three minutes later. This happens for every logical volume. If you’re dealing with many logical volumes, this is annoying. If you deal with many logical volumes every day, this is impossible.

Ubuntu splits devmapper into two packages: dmsetup and libdevmapper. The installer (debian-installer) uses udebs and anna instead of debs and apt (because their more lightweight). If you check out the different between dmsetup-udeb_1.02.08-1ubuntu10_amd64.udeb and dmsetup-udeb_1.02.18-1ubuntu6_amd64.udeb in which this bug is supposed to be fixed, a udev rule has been added (/etc/udev/rules.d/65-dmsetup.rules). I tried backporting these packages to my edgy install (this fix is only in gutsy as of this writing) as I didn’t think anyone else was going to. On the plus side I’ve learned a bit about d-i, but it’s taken quite a bit of time as there doesn’t appear to be much in the way of official documentation.

I ended up taking this file and building it into the feisty netboot initrd. However, it didn’t appear to fix anything. Upon closer examination it runs “dmsetup export” which isn’t in my feisty documentation, so I think it’s something new. I couldn’t find a sane way to backport all of libdevmapper without redoing the repository, which would mean resigning the release files and adding keys to the keyring in the initrd, or removing the keyring from the initrd. I wanted to avoid manging my mirror as much as possible. However /etc/udev/rules.d/25-dmsetup.rules on a functional feisty box appears to do something, so I built that into the initrd, and the problems were fixed (LVM creation is once again immediate).

Note that initially I was using preseed/run to download/run a script (before the udebs are unpacked) to install this file but I didn’t feel like udev was reading it as I didn’t have udevcontrol to send udev the read_rules command. While playing around and running udevd with –verbose, it looked like it would periodically recheck for rules, but I’m not going to take the time to test this. All I’m saying is that wgetting 25-dmsetup.rules to /etc/udev/rules.d with -P would probably work and be easier than recreating the initrd.

Of course, this “works for me”, YMMV. For the trusting, my patched feisty initrd is here.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.