Bug#574336: pkgsel: Only run update-initramfs once during installation?
Package: pkgsel Version: 0.25 Tags:patch When checking the Ubuntu changes to pkgsel, I noticed this change: - Divert update-initramfs and call it just once at the end (with bind-mounted /dev, /proc, and /sys, and a preceding update-dev). This seem like a good optimization for the installation time to bring over to Debian, making sure update-initramfs is only executed twice during the installation instead of several times more (once when the kernel is installed by base-insatller, and once after pkgsel is done). Is there any reason not to include it? This patch relative to the current svn version would implement it. It is ripped directly from the Ubuntu patch. Index: debian/postinst === --- debian/postinst (revision 62670) +++ debian/postinst (working copy) @@ -6,7 +6,7 @@ export LANG=C REMOUNT_CD= -DIVERTS='/usr/bin/scrollkeeper-update /usr/bin/scrollkeeper-rebuilddb /usr/bin/fc-cache' +DIVERTS='/usr/bin/scrollkeeper-update /usr/bin/scrollkeeper-rebuilddb /usr/bin/fc-cache /usr/sbin/update-initramfs' log() { logger -t pkgsel $@ @@ -163,7 +163,22 @@ chroot /target fc-cache -f -v /target/var/log/fontconfig.log 21 \ || true fi +if [ -x /target/usr/sbin/update-initramfs ]; then + # get UUIDs for any devices formatted after partitioning + update-dev + # make UUIDs etc. available in the target system + mount -o bind /dev /target/dev + mount -o bind /sys /target/sys + mount -o bind /proc /target/proc + + chroot /target /usr/sbin/update-initramfs -u || true + + umount /target/proc + umount /target/sys + umount /target/dev +fi + db_progress STEP 30 db_progress STOP Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#574336: pkgsel: Only run update-initramfs once during installation?
On Wednesday 17 March 2010, Petter Reinholdtsen wrote: This seem like a good optimization for the installation time to bring over to Debian, making sure update-initramfs is only executed twice during the installation instead of several times more In exactly which scenario would it be executed more than twice? I don't much like the patch either. Why doesn't it just use in-target to run update-initramfs? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#574336: pkgsel: Only run update-initramfs once during installation?
[Frans Pop] In exactly which scenario would it be executed more than twice? I expect it to run the triggers several times, once for each block of packages passed from apt to dpkg, but have not verified that this is the case. I had a look in the installation log for Debian Edu based on Squeeze, and here it is called four times: r...@tjener:~# grep -C1 update-init /var/log/installer/syslog Mar 14 06:03:00 in-target: Setter opp initramfs-tools (0.93.4) ... Mar 14 06:03:00 in-target: update-initramfs: deferring update (trigger activated) Mar 14 06:03:00 in-target: Behandler utløsere for initramfs-tools ... -- Mar 14 06:03:12 in-target: Running depmod. Mar 14 06:03:12 in-target: Running update-initramfs. Mar 14 06:03:12 in-target: update-initramfs: Generating /boot/initrd.img-2.6.32-trunk-686 Mar 14 06:03:22 in-target: Examining /etc/kernel/postinst.d. -- Mar 14 07:11:44 in-target: update-alternatives: using /usr/lib/usplash/debian-edu-usplash.so to provide /usr/lib/usplash/usplash-artwork.so (usplash-artwork.so) in auto mode. Mar 14 07:11:44 in-target: update-initramfs: deferring update (trigger activated) Mar 14 07:11:44 in-target: Setter opp debian-edu-doc-en (1.3~20100223~5.0.4+edu0) ... -- Mar 14 07:13:51 in-target: Setter opp usplash (0.5.19-3) ... Mar 14 07:13:52 in-target: update-initramfs: deferring update (trigger activated) Mar 14 07:13:52 in-target: Setter opp util-linux-locales (2.16.2-0) ... -- Mar 14 07:15:18 in-target: Behandler utløsere for initramfs-tools ... Mar 14 07:15:18 in-target: update-initramfs: Generating /boot/initrd.img-2.6.32-trunk-686 Mar 14 07:15:28 debian-edu-fsautoresize: overfull /usr, resizing to 6596198 -- Mar 14 07:46:15 in-target: KILLALL=false Mar 14 07:46:15 in-target: update-initramfs: deferring update (trigger activated) Mar 14 07:46:16 in-target: Setting up libklibc (1.5.15-1) ... -- Mar 14 07:46:16 in-target: Setting up initramfs-tools (0.93.4) ... Mar 14 07:46:16 in-target: update-initramfs: deferring update (trigger activated) Mar 14 07:46:16 in-target: Setting up syslinux-common (2:3.85+dfsg-1) ... -- Mar 14 07:46:34 in-target: Setting up dmsetup (2:1.02.39-1) ... Mar 14 07:46:34 in-target: update-initramfs: deferring update (trigger activated) Mar 14 07:46:34 in-target: Setting up cryptsetup (2:1.1.0~rc2-1) ... Mar 14 07:46:34 in-target: update-initramfs: deferring update (trigger activated) Mar 14 07:46:34 in-target: Setting up libavahi-common-data (0.6.25-3) ... -- Mar 14 07:47:36 debian-edu-fsautoresize: overfull /var, resizing to 3216998 Mar 14 07:47:37 in-target: Running update-initramfs. Mar 14 07:47:37 in-target: update-initramfs: Generating /boot/initrd.img-2.6.32-trunk-486 Mar 14 07:47:46 in-target: cryptsetup: WARNING: could not determine root device from /etc/fstab -- Mar 14 07:48:03 in-target: update-alternatives: using /usr/lib/usplash/debian-edu-usplash.so to provide /usr/lib/usplash/usplash-artwork.so (usplash-artwork.so) in auto mode. Mar 14 07:48:03 in-target: update-initramfs: deferring update (trigger activated) Mar 14 07:48:03 in-target: Setting up firmware-linux-free (2.6.32-5) ... -- Mar 14 07:48:08 in-target: Setting up usplash (0.5.19-3) ... Mar 14 07:48:08 in-target: update-initramfs: deferring update (trigger activated) Mar 14 07:48:09 in-target: Setting up tasksel-data (2.81) ... -- Mar 14 07:48:09 in-target: Processing triggers for initramfs-tools ... Mar 14 07:48:09 in-target: update-initramfs: Generating /boot/initrd.img-2.6.32-trunk-486 Mar 14 07:48:18 in-target: cryptsetup: WARNING: could not determine root device from /etc/fstab r...@tjener:~# grep -C1 update-init /var/log/installer/syslog|grep Gener Mar 14 06:03:12 in-target: update-initramfs: Generating /boot/initrd.img-2.6.32-trunk-686 Mar 14 07:15:18 in-target: update-initramfs: Generating /boot/initrd.img-2.6.32-trunk-686 Mar 14 07:47:37 in-target: update-initramfs: Generating /boot/initrd.img-2.6.32-trunk-486 Mar 14 07:48:09 in-target: update-initramfs: Generating /boot/initrd.img-2.6.32-trunk-486 r...@tjener:~# It is possible some of these are from setting up the LTSP chroot environment. I don't much like the patch either. Why doesn't it just use in-target to run update-initramfs? I did wonder about that too. I expected in-target to handle /proc/ and friends, but do not know why Ubuntu choose to do this outside in-target and did not test if they are needed or not. Decided to pass on the patch untouched for review. :) Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#574336: pkgsel: Only run update-initramfs once during installation?
On Wednesday 17 March 2010, Petter Reinholdtsen wrote: It is possible some of these are from setting up the LTSP chroot environment. Something looks very broken in this example. Why is initramfs-tools getting set up twice for the same version? Why is dmsetup getting installed if it is not being used during partitioning (in which case it should already have been installed _before_ initramfs-tools gets installed the first time)? After that the only remaining cause for an extra run is usplash. If debian-edu wants that installed by default, then the correct solution IMO is to include it on the first CD and ensure it gets installed during post-base-installer.d and not during pkgsel. The problem here IMO is a badly structured installation, not a missing feature in pkgsel. Cheers, FJP -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#574336: pkgsel: Only run update-initramfs once during installation?
[Frans Pop] Something looks very broken in this example. Why is initramfs-tools getting set up twice for the same version? No idea. This what made me suspect the cause might be the LTSP chroot. Why is dmsetup getting installed if it is not being used during partitioning (in which case it should already have been installed _before_ initramfs-tools gets installed the first time)? It is a dependency of lvm2. I asked 'aptitude why dmsetup' on the machine in question. :) After that the only remaining cause for an extra run is usplash. If debian-edu wants that installed by default, then the correct solution IMO is to include it on the first CD and ensure it gets installed during post-base-installer.d and not during pkgsel. There is not enouch room on the CD for that. :) The problem here IMO is a badly structured installation, not a missing feature in pkgsel. Oh, well. My goal for this request was a faster installation. I assume we share that goal, and do not see the point of arguing further for making sure update-initramfs is called as few times as possible. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#574336: pkgsel: Only run update-initramfs once during installation?
On Wednesday 17 March 2010, Petter Reinholdtsen wrote: No idea. This what made me suspect the cause might be the LTSP chroot. Ah. I failed to really comprehend that earlier. Yes, I guess that could be and that would of course make it separate from base system installation Why is dmsetup getting installed if it is not being used during partitioning (in which case it should already have been installed _before_ initramfs-tools gets installed the first time)? It is a dependency of lvm2. I asked 'aptitude why dmsetup' on the machine in question. :) The same goes for LVM2 though. That should really be installed as a result of partitioning, not as an extra package. Or is that installed in the LTSP chroot as well? If it is the LTSP chroot that is the cause, then I think pkgsel really is the wrong place to address this. Oh, well. My goal for this request was a faster installation. I assume we share that goal, and do not see the point of arguing further for making sure update-initramfs is called as few times as possible. Sure. But that does not mean we should blindly complicate D-I code without checking the validity of the use case. P.S. I've been wondering if we shouldn't consider postponing kernel installation until after APT is configured. In some ways it is more logical to group it with bootloader installation than with base system installation. It could also make sense for firmware installation (see my comments in #574158). Not something to change lightly though. Added complication is consistent handling of Recommends. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org