root fails to boot. Reply-To: In-Reply-To: <20151017170320.gj22...@einval.com> X-attached: unknown Fcc: =debian/boot
Following up on this particular thread... On Sat, Oct 17, 2015 at 06:03:20PM +0100, Steve McIntyre wrote: >retitle 801961 base-installer: needs to install queued packages before >linux-image >severity 801961 important >thanks > >ACK, and thanks for the logs. They *do* show a problem as well. In the >first installation, I can see > >Oct 16 21:37:38 apt-install: Queueing package xfsprogs for later installation >... >Oct 16 21:41:25 in-target: Setting up linux-base (4.0) ... >Oct 16 21:41:25 in-target: Setting up linux-image-4.2.0-1-amd64 (4.2.1-2) ... >Oct 16 21:41:27 in-target: update-initramfs: Generating >/boot/initrd.img-4.2.0-1-amd64 >Oct 16 21:41:32 in-target: Warning: /sbin/fsck.xfs doesn't exist, can't >install to initramfs, ignoring. >Oct 16 21:41:46 in-target: Setting up linux-image-amd64 (4.2+68) ... >... >Oct 16 21:41:58 in-target: Preparing to unpack .../xfsprogs_4.2.0_amd64.deb ... >Oct 16 21:41:58 in-target: Unpacking xfsprogs (4.2.0) ... >Oct 16 21:41:58 in-target: Setting up libreadline5:amd64 (5.2+dfsg-3)... >Oct 16 21:41:59 in-target: Setting up xfsprogs (4.2.0) ... > >which means there's an ordering problem here - update-initramfs is >being run before we've had a chance to install xfsprogs and so it's >failing there. It looks like we need to explicitly add some sequencing >for the package installations here to fix that. If we just made sure >xfsprogs was installed first, that would help! > >For now, there should a simple workaround here - re-run the package >installation step for linux-image-* and it'll get xfsprogs on the >second pass. Following through on this, I can see that the ordering is determined right at the end of base-installer/debian/bootstrap-base.postinst : waypoint 1 check_target waypoint 1 get_mirror_info waypoint 100 install_base_system waypoint 1 pre_install_hooks waypoint 1 setup_dev waypoint 1 configure_apt_preferences waypoint 1 configure_apt waypoint 3 apt_update waypoint 5 post_install_hooks waypoint 1 pick_kernel waypoint 20 install_kernel waypoint 10 install_extra waypoint 0 final_apt_preferences waypoint 0 cleanup install_kernel and install_extra are the two functions in question. It *seems* like simply changing the order of those two calls may fix this bug, and I've just done a successful (simple!) test installation with that change made. However, this is also a key part of the installer and I'm worried that changing this may break installation of other packages, e.g. if there are any that queue things via apt-install but need the kernel to be installed first. Checking through current d-i, I can see lots of callers to apt-install: ./arcboot-installer/debian/arcboot-installer.postinst:#if ! apt-install arcboot; then ./arcboot-installer/debian/arcboot-installer.postinst:apt-install arcboot ./babelbox/preseed_early:apt-install alsa-base || true ./babelbox/preseed_early:apt-install alsa-utils || true ./base-installer/library.sh: log-output -t base-installer apt-install $OPTS $PKG || \ ./base-installer/library.sh: if ! log-output -t base-installer apt-install "$rd_generator"; then ./base-installer/library.sh: if ! log-output -t base-installer apt-install busybox; then ./base-installer/library.sh: log-output -t base-installer apt-install "$package" || true ./base-installer/library.sh: # avoid apt-install installing things; apt is not configured yet ./base-installer/library.sh: log-output -t base-installer apt-install "$KERNEL" || kernel_install_failed=$? ./base-installer/library.sh: log-output -t base-installer apt-install "$KERNEL" || kernel_install_failed=$? ./base-installer/library.sh: log-output -t base-installer apt-install "$KERNEL" || kernel_install_failed=$? ./console-setup/debian/console-setup-udeb.base-installer: apt-install console-setup || true ./console-setup/debian/console-setup-udeb.base-installer: apt-install keyboard-configuration || true ./elilo-installer/debian/elilo-installer.postinst:if ! apt-install elilo ; then ./flash-kernel/debian/flash-kernel-installer.postinst.in: if ! apt-install "$package"; then ./flash-kernel/debian/flash-kernel-installer.postinst.in: if ! apt-install "$package"; then ./flash-kernel/debian/flash-kernel-installer.postinst.in:if ! apt-install flash-kernel; then ./grub-installer/debian/grub-installer/usr/bin/grub-installer: apt-install $grub_package || exit_code=$? ./grub-installer/debian/grub-installer/usr/bin/grub-installer: apt-install dmsetup ./grub-installer/debian/grub-installer/usr/bin/grub-installer: apt-install grub-common ./grub-installer/debian/grub-installer/usr/bin/grub-installer: apt-install $grub_package || exit_code=$? ./grub-installer/debian/grub-installer/usr/bin/grub-installer: if apt-install --no-recommends grub-legacy ; then ./grub-installer/grub-installer: apt-install $grub_package || exit_code=$? ./grub-installer/grub-installer: apt-install dmsetup ./grub-installer/grub-installer: apt-install grub-common ./grub-installer/grub-installer: apt-install $grub_package || exit_code=$? ./grub-installer/grub-installer: if apt-install --no-recommends grub-legacy ; then ./hw-detect/hw-detect.post-base-installer.d/60install-mouseemu: apt-install mouseemu || true ./hw-detect/hw-detect.post-base-installer.d/60install-mouseemu: apt-install mouseemu || true ./hw-detect/hw-detect.post-base-installer.d/60install-mouseemu: if apt-install laptop-detect && \ ./hw-detect/hw-detect.pre-pkgsel.d/20install-hwpackages:apt-install discover || true ./hw-detect/hw-detect.sh: apt-install libc6-sparcv9b || true ./hw-detect/hw-detect.sh: apt-install libc6-i686 || true ./hw-detect/hw-detect.sh: apt-install eject || true ./hw-detect/hw-detect.sh: apt-install pbbuttonsd || true ./hw-detect/hw-detect.sh: apt-install pciutils || true ./hw-detect/hw-detect.sh: apt-install pcmciautils || true ./hw-detect/hw-detect.sh: apt-install usbutils || true ./hw-detect/hw-detect.sh:apt-install udev || true ./installation-report/pre-pkgsel.d/50save-logs:apt-install --no-recommends installation-report || true ./kbd-chooser/post-base-installer.d/20kbd-chooser: apt-install console-setup kbd || true ;; ./kbd-chooser/post-base-installer.d/20kbd-chooser: apt-install keyboard-configuration || true ;; ./kickseed/handlers/auth.sh: apt-install nis || true ./lilo-installer/debian/lilo-installer/DEBIAN/postinst:if ! apt-install lilo ; then ./lilo-installer/debian/postinst:if ! apt-install lilo ; then ./localechooser/finish-install.d/05localechooser: apt-install libfribidi0 || true ./localechooser/post-base-installer.d/05localechooser: apt-install locales || true ./lvmcfg/lvmcfg.sh:[ $1 -gt 0 ] && apt-install lvm2 ./mdcfg/mdcfg.sh:apt-install mdadm ./netcfg/autoconfig.c: di_exec_shell_log("apt-install rdnssd"); ./netcfg/netcfg-static.c: di_exec_shell("apt-install iw wireless-tools"); ./netcfg/netcfg.c: di_exec_shell_log("apt-install iw wireless-tools"); ./netcfg/netcfg.c: di_exec_shell_log("apt-install wpasupplicant"); ./network-console/debian/network-console.postinst:apt-install openssh-server || true ./nobootloader/debian/postinst: if apt-install mkvmlinuz; then ./partman-auto-raid/auto-raidcfg:apt-install mdadm || true ./partman-base/debian/partman-base/usr/lib/post-base-installer.d/60dmraid: apt-install dmraid ./partman-base/post-base-installer.d/60dmraid: apt-install dmraid ./partman-basicfilesystems/finish.d/aptinstall_basicfilesystems: apt-install dosfstools || true ./partman-basicfilesystems/finish.d/aptinstall_basicfilesystems: apt-install e2fsprogs || true ./partman-btrfs/finish.d/aptinstall_btrfs: apt-install btrfs-tools || true ./partman-crypto/debian/partman-crypto/lib/partman/finish.d/70crypto_aptinstall: apt-install cryptsetup || true ./partman-crypto/finish.d/crypto_aptinstall: apt-install cryptsetup || true ./partman-ext3/finish.d/aptinstall_ext3: apt-install e2fsprogs || true ./partman-iscsi/finish.d/iscsi_settings: apt-install open-iscsi || true ./partman-jfs/finish.d/aptinstall_jfs: apt-install jfsutils || true ./partman-lvm/debian/partman-lvm/lib/partman/finish.d/70aptinstall_lvm: apt-install lvm2 || true ./partman-lvm/finish.d/aptinstall_lvm: apt-install lvm2 || true ./partman-md/post-base-installer.d/60partman-md: apt-install mdadm ./partman-multipath/post-base-installer.d/60multipath:apt-install multipath-tools-boot || true ./partman-nbd/finish.d/partman-nbd: apt-install nbd-client || true ./partman-ufs/finish.d/aptinstall_ufs: apt-install ufsutils || true ./partman-xfs/finish.d/aptinstall_xfs: apt-install xfsprogs || true ./partman-zfs/finish.d/aptinstall_zfs: apt-install zfsutils || true ./partman-zfs/post-base-installer.d/60partman-zfs: apt-install zfs-initramfs ./pkgsel/pre-pkgsel.d/10laptop-detect: apt-install laptop-detect || true ./pkgsel/pre-pkgsel.d/90popcon:if apt-install --no-recommends popularity-contest; then ./quik-installer/debian/postinst:if ! apt-install quik yaboot powerpc-utils; then ./s390-sysconfig-writer/debian/s390-sysconfig-writer.post-base-installer:apt-install sysconfig-hardware || true ./sibyl-installer/debian/postinst:if ! apt-install sibyl ; then ./silo-installer/debian/silo-installer.postinst:if ! apt-install silo; then ./user-setup/user-setup-apply: apt-install sudo 2>/dev/null || $log $chroot $ROOT apt-get -q -y install sudo || true ./yaboot-installer/debian/postinst:if ! apt-install $PACKAGES; then Some things like bootloaders here are probably going to care about being installed after the kernel (maybe), but well-behaved such packages should also be triggered by further kernel package installations anyway I'd hope. Filesystem tools shouldn't care. Not sure about others here - anybody? So we have a few ways to go, I think: 1. Make the change and test / wait for people to scream?!? 2. Split up the apt-install delayed queue, add a separate queue for things like fs tools to be installed before kernel 3. Excplicitly add an extra call to update the initramfs late in installation, to make sure that all necessary tools are installed 4. Any others? -- Steve McIntyre, Cambridge, UK. st...@einval.com Welcome my son, welcome to the machine.