[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
** Changed in: subiquity Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/curtin/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
** Tags added: cscc -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/curtin/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
This bug is believed to be fixed in curtin in version 19.1. If this is still a problem for you, please make a comment and set the state back to New Thank you. ** Changed in: curtin Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/curtin/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
This bug is fixed with commit 08bf6ff7 to curtin on branch master. To view that commit see the following URL: https://git.launchpad.net/curtin/commit/?id=08bf6ff7 ** Changed in: curtin Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/curtin/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
** Merge proposal linked: https://code.launchpad.net/~xnox/curtin/+git/curtin/+merge/365739 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/curtin/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
** Description changed: + + On Ubuntu/Debian like systems /etc/kernel-img.conf should be created by the "installer". It is currently done by base-installer/live-installer/ubiquity but not curtin, but it should be. At the moment we require kernel-img.conf and we do not have the correct per-arch built-in defaults for its settings in all of our kernels. It is not a config file, nor is it created by livecd-rootfs (after all our squashfs might be containers, and never live to install kernels and bootloaders). + + One day we might fix our kernels to not require kernel-img.conf, but + until then curtin should be generating the right one. Making a merge + proposal to fix this in curtin by mimicking what base-installer did. + + == + Symlinks are not managed correctly. Last installed and configured kernel, prior to purging -5- was -6-, yet symlinks were not updated to -6- when that happened. root@devac03:~# apt-get remove --purge linux-headers-4.3.0-5 linux-headers-4.3.0-5-generic linux-image-4.3.0-5-generic linux-image-extra-4.3.0-5-generic Reading package lists... Done - Building dependency tree + Building dependency tree Reading state information... Done The following packages will be REMOVED: - linux-headers-4.3.0-5* linux-headers-4.3.0-5-generic* linux-image-4.3.0-5-generic* - linux-image-extra-4.3.0-5-generic* + linux-headers-4.3.0-5* linux-headers-4.3.0-5-generic* linux-image-4.3.0-5-generic* + linux-image-extra-4.3.0-5-generic* 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded. After this operation, 131 MB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 92073 files and directories currently installed.) Removing linux-headers-4.3.0-5-generic (4.3.0-5.16) ... Removing linux-headers-4.3.0-5 (4.3.0-5.16) ... Removing linux-image-extra-4.3.0-5-generic (4.3.0-5.16) ... run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.3.0-5-generic /boot/vmlinuz-4.3.0-5-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.3.0-5-generic /boot/vmlinuz-4.3.0-5-generic update-initramfs: Generating /boot/initrd.img-4.3.0-5-generic Using config file '/etc/zipl.conf' Building bootmap in '/boot/' Building menu 'zipl-automatic-menu' Adding #1: IPL section 'ubuntu' (default) Preparing boot device: dasda (0200). Done. run-parts: executing /etc/kernel/postinst.d/pm-utils 4.3.0-5-generic /boot/vmlinuz-4.3.0-5-generic run-parts: executing /etc/kernel/postinst.d/zz-zipl 4.3.0-5-generic /boot/vmlinuz-4.3.0-5-generic Using config file '/etc/zipl.conf' Building bootmap in '/boot/' Building menu 'zipl-automatic-menu' Adding #1: IPL section 'ubuntu' (default) Preparing boot device: dasda (0200). Done. Purging configuration files for linux-image-extra-4.3.0-5-generic (4.3.0-5.16) ... Removing linux-image-4.3.0-5-generic (4.3.0-5.16) ... WARN: Proceeding with removing running kernel image. Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.3.0-5-generic /boot/vmlinuz-4.3.0-5-generic update-initramfs: Deleting /boot/initrd.img-4.3.0-5-generic run-parts: executing /etc/kernel/postrm.d/zz-zipl 4.3.0-5-generic /boot/vmlinuz-4.3.0-5-generic Using config file '/etc/zipl.conf' Error: Image file '/boot/vmlinuz' in section 'ubuntu': No such file or directory run-parts: /etc/kernel/postrm.d/zz-zipl exited with return code 1 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.3.0-5-generic.postrm line 328. dpkg: error processing package linux-image-4.3.0-5-generic (--purge): - subprocess installed post-removal script returned error exit status 1 + subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: - linux-image-4.3.0-5-generic + linux-image-4.3.0-5-generic E: Sub-process /usr/bin/dpkg returned an error code (1) root@devac03:~# ls -latr /boot total 24208 drwx-- 2 root root16384 Dec 9 16:38 lost+found lrwxrwxrwx 1 root root 26 Jan 6 16:23 initrd.img -> initrd.img-4.3.0-5-generic lrwxrwxrwx 1 root root 23 Jan 6 16:24 vmlinuz -> vmlinuz-4.3.0-5-generic -rw--- 1 root root 13026048 Jan 11 21:36 vmlinuz-4.3.0-6-generic -rw--- 1 root root 2446124 Jan 11 21:36 System.map-4.3.0-6-generic -rw-r--r-- 1 root root63422 Jan 11 21:36 config-4.3.0-6-generic -rw-r--r-- 1 root root 517933 Jan 11 21:36 abi-4.3.0-6-generic drwxr-xr-x 22 root root 4096 Jan 14 13:03 .. -rw-r--r-- 1 root root 8574889 Jan 14 13:03 initrd.img-4.3.0-6-generic -rw--- 1 root root69632 Jan 14 13:41 bootmap drwxr-xr-x 3 root root 4096 Jan 14 13:41 . root@devac03:~# dpkg -l | grep 4.3.0 ii iproute 1:4.3.0-1ubuntu1 all transitional dummy package for iproute2 ii iproute2 4.3.0-1ubuntu1
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
** Merge proposal linked: https://code.launchpad.net/~xnox/curtin/+git/curtin/+merge/346539 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/curtin/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
** Also affects: curtin Importance: Undecided Status: New ** Changed in: livecd-rootfs (Ubuntu) Status: New => Invalid ** Changed in: curtin Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/curtin/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
I think last time it was fixed by fixing base-installer. http://launchpadlibrarian.net/235185956/base-installer_1.158ubuntu1_1.158ubuntu2.diff.gz but this time around, we need to decide who/what/where should write out kernel-img.conf. because we do not have kernel-common by default. ** Also affects: base-installer (Ubuntu) Importance: Undecided Status: New ** Changed in: linux (Ubuntu) Status: Confirmed => Invalid ** Changed in: zipl-installer (Ubuntu) Status: Confirmed => Fix Released ** Changed in: subiquity Status: New => Confirmed ** Changed in: base-installer (Ubuntu) Status: New => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/subiquity/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
** Also affects: subiquity Importance: Undecided Status: New ** Tags added: rls-dd-incoming -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/subiquity/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
It seems that we're hitting this issue again with the subiquity installer. The installer fails at the "installing kernel" stage, when zipl is called. These are the last lines of the installer log (retrieving the full log is not trivial because of LP: #1823797): Setting up linux-image-5.0.0-8-generic (5.0.0-8.9) ... I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.0.0-8-generic I: /initrd.img.old is now a symlink to boot/initrd.img-5.0.0-8-generic I: /vmlinuz is now a symlink to boot/vmlinuz-5.0.0-8-generic I: /initrd.img is now a symlink to boot/initrd.img-5.0.0-8-generic Not invoking zipl: initrd doesn't exist yet /etc/kernel/postinst.d/zz-zipl: Not invoking zipl: initrd doesn't exist yet Setting up linux-generic (5.0.0.8.9) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-5.0.0-8-generic Not invoking zipl: initrd doesn't exist yet /etc/kernel/postinst.d/zz-zipl: Not invoking zipl: initrd doesn't exist yet Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/target', 'zipl'] Error: Image file '/boot/vmlinuz' in section 'ubuntu': No such file or directory The qcow2 disk image can be mounted like this: $ sudo modprobe nbd max_part=8 $ sudo qemu-nbd --connect=/dev/nbd0 /path/to/CE-install-test.qcow2 $ sudo mount /dev/nbd0p1 /mnt/guest and it contains the expected target filesystem, but the vmlinuz and initrd.img symlink are in / instead of being in /boot, where zipl expects them: lrwxrwxrwx 1 root root31 Apr 9 08:11 initrd.img -> boot/initrd.img-5.0.0-8-generic lrwxrwxrwx 1 root root28 Apr 9 08:11 vmlinuz -> boot/vmlinuz-5.0.0-8-generic Moving the symlinks in /boot and chrooting in the target partition makes zipl work: $ for i in sys dev proc; do sudo mount -o bind /$i /mnt/guest/$i; done $ sudo chroot /mnt/guest/ groups: cannot find name for group ID 129 root@s1lp04:/# rm initrd.img* vmlinuz* root@s1lp04:/# cd /boot/ root@s1lp04:/boot# ln -s vmlinuz-5.0.0-8-generic vmlinuz root@s1lp04:/boot# ln -s initrd.img-5.0.0-8-generic initrd.img root@s1lp04:/boot# cd .. root@s1lp04:/# zipl -V Using config file '/etc/zipl.conf' Warning: Could not remove temporary file : No such file or directoryfree(): double free detected in tcache 2 Aborted (It still errors, but we go past the "No such file or directory" error, and this error is probably related to the chroot.) It seems that the location of the vmlinuz and initrd symlinks can be configured with the /etc/kernel-img.conf file. On the host system we have: $ cat /etc/kernel-img.conf # Kernel image management overrides # See kernel-img.conf(5) for details do_symlinks = yes do_bootloader = yes do_initrd = yes link_in_boot = yes and the symlinks are indeed created in /boot. In the (subiquity installed, non functional) guest system the /etc/kernel-img.conf is missing. The package responsible of installing kernel-img.conf is kernel-common, but it is *not* installed in the host system, so the file is probably (supposed to be) copied from the installer system. My supposition is that this step is missing in the subiquity installer. I am reopening this and setting it as Confirmed as it was verified together by me and cpaelzer. Dimitri: do you remember how this was fixed with the debian-installer? ** Changed in: linux (Ubuntu) Status: Invalid => Confirmed ** Changed in: zipl-installer (Ubuntu) Status: Invalid => Confirmed ** Changed in: livecd-rootfs (Ubuntu) Status: Invalid => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/subiquity/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
** Changed in: linux (Ubuntu) Status: Confirmed => Invalid ** Changed in: linux (Ubuntu) Importance: Critical => Undecided ** Changed in: livecd-rootfs (Ubuntu) Status: New => Invalid ** Changed in: zipl-installer (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1534162] Re: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs
Aha # cat /etc/kernel-img.conf # Kernel image management overrides # See kernel-img.conf(5) for details do_symlinks = yes link_in_boot = yes -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534162 Title: symlinks managed by kernel postinst are different from zipl-installer and livefs-rootfs To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1534162/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs