Score:0

After upgrading from 18.04 to 20.04, grub does not boot to latest kernel (and ZFS is broken)

cn flag

On a remote server (only access via ssh after booted), I am having troubles after upgrading from 18.04LTS to 20.04.3LTS:

  • system reboot on old rescue kernel:

  • and zfs is not working anymore (so all my lxd containers are away for now...)

    $ uname -r 4.19.62-mod-std-ipv6-64-rescue

    $ zpool info The ZFS modules are not loaded. Try running '/sbin/modprobe zfs' as root to load them.

    $ /sbin/modprobe zfs
      modprobe: FATAL: Module zfs not found in directory /lib/modules/4.19.62-mod-std-ipv6-64-rescue
    

The new kernel is present in /boot:

ll /boot/
total 75287
drwxr-xr-x  5 root root     1024 févr.  6 21:36 ./
drwxr-xr-x 23 root root     4096 févr.  4 06:52 ../
-rw-r--r--  1 root root   237940 janv. 13 18:00 config-5.4.0-97-generic
drwxr-xr-x  2 root root     1024 nov.  24  2018 efi/
drwxr-xr-x  6 root root     1024 févr.  6 21:36 grub/
lrwxrwxrwx  1 root root       27 févr.  6 21:05 initrd.img -> initrd.img-5.4.0-97-generic
-rw-r--r--  1 root root 58416425 févr.  6 21:36 initrd.img-5.4.0-97-generic
lrwxrwxrwx  1 root root       27 févr.  6 21:13 initrd.img.old -> initrd.img-5.4.0-97-generic
drwx------  2 root root    12288 nov.  28  2019 lost+found/
-rw-------  1 root root  4757200 janv. 13 18:00 System.map-5.4.0-97-generic
lrwxrwxrwx  1 root root       24 févr.  6 21:05 vmlinuz -> vmlinuz-5.4.0-97-generic
-rw-------  1 root root 13660416 janv. 13 18:04 vmlinuz-5.4.0-97-generic
lrwxrwxrwx  1 root root       24 févr.  6 21:13 vmlinuz.old -> vmlinuz-5.4.0-97-generic

/etc/default/grub says GRUB_DEFAULT=0

Running update-grub says:

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-97-generic
Found initrd image: /boot/initrd.img-5.4.0-97-generic
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.
Some pools couldn't be imported and will be ignored:
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.
Found Ubuntu 20.04.3 LTS (20.04) on /dev/sda2
done

Where does this "rescue" kernel come from ? and how can I boot to latest kernel (hopefully with ZFS ??) ?

cn flag
The problem was due to my hosting company (Kimsufi). The machine was set to netboot on a custom kernel and not from disk...
freezed avatar
cn flag
How did you install a ZFS root on Kimsifi?
cn flag
In fact it's not a ZFS root. Root is on ext4, but I made a partition that I added to my zfs pool after the installation. This partition (most of the disk) is used by lxd to handle its containers.
freezed avatar
cn flag
Ah ah… I had a workaround to set up a zfs root on SYS… not finished yet but I hope it works (-;
Score:0
cn flag

Finally working. The problem was not an Ubuntu one: my hosted server (Kimsufi) was set to netboot on a custom kernel and not on disk. Kimsufi support helped me sort this out.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.