6

I installed ubuntu 20.04 sometime in june.

by now I'm updated to ubuntu 20.04.1 LTS

there's been a few kernel updates. end everytime I run updates Zsys tries to put new kernel version as the first option.

And I'd like nothing more but to use the new kernels.

but they simply won't boot.

when I say won't boot, I mean some kinda freeze happens during the boot process I can't drop to TTY/boot command line and I don't get any error messages (maybe I'm not hitting the right key)

I just have my motherboard logo and that's it.

the ubuntu logo and spinner don't show up and it could stay like this indefinitely if I did nothing.

luckily i still have my old grub entry and with grub customizer I've been keeping it at the top of the list.

but I want to solve this issue now before ubuntu decides I've been hoarding an old kernel for too long.

is there something in particular I'm supposed to do to boot a new kernel with ZFS?

I'm guessing it has nothing to do with the specific kernel version and more to do with zfs being a block that's not yet intricately tied into the rest of the OS. and where ubuntu is able to automatically update the kernel references everywhere else it doesn't yet automatically update a variable inside ZFS that points to the kernel version, or something like that?

I don't know.

Anyways :

t@tsu:~$ dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+'
ii  linux-image-5.4.0-40-generic                                5.4.0-40.44                                                 amd64        Signed kernel image generic
ii  linux-image-5.4.0-45-generic                                5.4.0-45.49                                                 amd64        Signed kernel image generic
ii  linux-image-5.4.0-47-generic                                5.4.0-47.51                                                 amd64        Signed kernel image generic

5.4.0-40 boots and is the one my ubuntu 20.04 installed with

5.4.0-45 does not boot and was installed by updates not by me

5.4.0-47 does not boot and was installed by updates not by me

Ideally I'd like to boot 5.4.0-47

EDIT :

On kernel installs I do get an error :

Setting up linux-modules-5.4.48-050448-generic (5.4.48-050448.202006220832) ...
Setting up linux-image-unsigned-5.4.48-050448-generic (5.4.48-050448.202006220832) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.4.0-47-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.4.0-47-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.48-050448-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.4.48-050448-generic
Processing triggers for linux-image-unsigned-5.4.48-050448-generic (5.4.48-050448.202006220832) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.48-050448-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.48-050448-generic
I: The initramfs will attempt to resume from /dev/sda2
I: (UUID=53c19176-f03e-4c40-a6ed-3a2627160647)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...

and a ton of these :

Warning: Couldn't find any valid initrd for dataset rpool/ROOT/ubuntu_38tazy@autozsys_7lfyl1.

and here's update-grub :

(doesn't look optimal)

https://pastebin.com/8y6x36u4

  • Hi. ZFS is integrated into the Ubuntu kernels, so I don't really know why this is an issue for you. I'm running a server with ZFS, and I'm on 5.4.0-47 with no problems. So just saying I think maybe the problem is something else than ZFS. Good luck, hope someone else can chime in. – Artur Meinild Sep 22 at 9:05
  • I can add that I haven't installed Zsys. I don't really know why this is necessary for a private system, afaik Zsys is more geared towards enterprise-level ZFS setups. I believe zfsutils-linux is all you need to manage your ZFS setup (and I also added zfs-auto-snapshot for daily/weekly snapshots). – Artur Meinild Sep 22 at 9:11
  • And final input, my kernel updates are also automatically installed with unattended-upgrades. I think you should investigate more Q&A's about why an updated kernel won't boot in general. – Artur Meinild Sep 22 at 9:38
  • 2
    Per unix.stackexchange.com/questions/585386/…, try running update-initramfs -c -k all – user96931 Sep 30 at 17:03
  • 1
    @user96931 I'll try that when I get home tonight thanks! – tatsu Oct 1 at 6:59
0
+150

Looking at your logs I was wondering if Ubuntu has been able to generate the boot files properly, and I was thinking if you have enough space in /boot. Is /boot a partition or is a directory under root fs?. Many default Ubuntu installations had small /boot partitions that got full and create problems. Are you using encryption?.

Another idea is, those Kernels that fail are attempted to install by the updates; can you install one of those kernels manually with apt install?.

Cheers

| improve this answer | |
  • i'll check the boot partition size, that's a possibility. No I don't have encryption. and yes, I did try manual kernel installs, as per the comments above. – tatsu Oct 6 at 6:58
-1

Just thoughts and maybe worth trying out.

ZFS isn't build in the standard linux kernel, so you have to build it as a module which has to be rebuild for each kernel version. I don't belive that ubuntu comes with zfs modules integrated (maybe it did at some point). Try reinstalling them on your working kernel, this should build modules for the new kernel as well as create a new initrd image.

List the zfs packages you have installed:

apt list zfs*

use apt reinstall to reinstall them.

apt packages that you might need for zfs:

zfs-dkms
zfs-initramfs
| improve this answer | |
  • You just have to install the package zfsutils-linux, then ZFS is loaded and you can use it right away. – Artur Meinild Oct 5 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.