#StackBounty: #apt #package-management #upgrade #python No answer for ModuleNotFoundError: No module named 'apt_pkg' in Ubuntu …

Bounty: 50

I ran the following :

~$ sudo add-apt-repository "deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-8.0"

sudo: unable to resolve host root
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 12, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

To solve this I took numerous chances as said in askubuntu.com

sudo apt-get install python-apt
sudo: unable to resolve host root
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-apt is already the newest version (1.1.0~beta1ubuntu0.16.04.9).
The following packages were automatically installed and are no longer required:
  gksu libgksu2-0 pencil2d snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 393 not upgraded.


~$ sudo apt-get install python3-apt --reinstall
sudo: unable to resolve host root
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gksu libgksu2-0 pencil2d snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 393 not upgraded.
Need to get 0 B/147 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 208998 files and directories currently installed.)
Preparing to unpack .../python3-apt_1.1.0~beta1ubuntu0.16.04.9_i386.deb ...
Unpacking python3-apt (1.1.0~beta1ubuntu0.16.04.9) over (1.1.0~beta1ubuntu0.16.04.9) ...
Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.9) ...


$ sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so
ln: failed to create symbolic link 'apt_pkg.cpython-34m-x86_64-linux-gnu.so': File exists


$ sudo cp apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so
cp: cannot stat 'apt_pkg.cpython-36m-x86_64-linux-gnu.so': No such file or directory

$ sudo apt-get install --reinstall python3-apt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gksu libgksu2-0 pencil2d snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 393 not upgraded.
Need to get 0 B/147 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 208998 files and directories currently installed.)
Preparing to unpack .../python3-apt_1.1.0~beta1ubuntu0.16.04.9_i386.deb ...
Unpacking python3-apt (1.1.0~beta1ubuntu0.16.04.9) over (1.1.0~beta1ubuntu0.16.04.9) ...
Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.9) ...

$ sudo update-alternatives  --set python3  /usr/bin/python3.7

I tried each of these commands separately. Still I got :

$ sudo add-apt-repository "deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-8.0"
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 12, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

To be frank I am fed up with this error and I’m sure that none of the above commands and commands given in other questions of askubuntu.com didn’t answer my need. As a last hope, I posted this question. Please Answer me.


Get this bounty!!!

#StackBounty: #apt #package-management #upgrade #python No answer for ModuleNotFoundError: No module named 'apt_pkg' in Ubuntu …

Bounty: 50

I ran the following :

~$ sudo add-apt-repository "deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-8.0"

sudo: unable to resolve host root
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 12, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

To solve this I took numerous chances as said in askubuntu.com

sudo apt-get install python-apt
sudo: unable to resolve host root
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-apt is already the newest version (1.1.0~beta1ubuntu0.16.04.9).
The following packages were automatically installed and are no longer required:
  gksu libgksu2-0 pencil2d snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 393 not upgraded.


~$ sudo apt-get install python3-apt --reinstall
sudo: unable to resolve host root
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gksu libgksu2-0 pencil2d snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 393 not upgraded.
Need to get 0 B/147 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 208998 files and directories currently installed.)
Preparing to unpack .../python3-apt_1.1.0~beta1ubuntu0.16.04.9_i386.deb ...
Unpacking python3-apt (1.1.0~beta1ubuntu0.16.04.9) over (1.1.0~beta1ubuntu0.16.04.9) ...
Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.9) ...


$ sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so
ln: failed to create symbolic link 'apt_pkg.cpython-34m-x86_64-linux-gnu.so': File exists


$ sudo cp apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so
cp: cannot stat 'apt_pkg.cpython-36m-x86_64-linux-gnu.so': No such file or directory

$ sudo apt-get install --reinstall python3-apt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gksu libgksu2-0 pencil2d snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 393 not upgraded.
Need to get 0 B/147 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 208998 files and directories currently installed.)
Preparing to unpack .../python3-apt_1.1.0~beta1ubuntu0.16.04.9_i386.deb ...
Unpacking python3-apt (1.1.0~beta1ubuntu0.16.04.9) over (1.1.0~beta1ubuntu0.16.04.9) ...
Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.9) ...

$ sudo update-alternatives  --set python3  /usr/bin/python3.7

I tried each of these commands separately. Still I got :

$ sudo add-apt-repository "deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-8.0"
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 12, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

To be frank I am fed up with this error and I’m sure that none of the above commands and commands given in other questions of askubuntu.com didn’t answer my need. As a last hope, I posted this question. Please Answer me.


Get this bounty!!!

#StackBounty: #upgrade #amazon-ec2 #aws AWS EC2 Ubuntu 16.04.7 LTS Upgrade problems

Bounty: 50

I have an AWS EC2 instance that I am running a website on and I am running into issues while upgrading it.

Here are the steps I have tried:

$ sudo apt update
$ sudo apt upgrade

enter image description here

After the first part everything looked good and than I proceeded:

sudo do-release-upgrade

And then we error out:

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/bionic", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeController.py", line 2072, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeController.py", line 1981, in fullUpgrade
    if not self.askDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeController.py", line 1153, in askDistUpgrade
    changes = self.calcDistUpgrade()
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeController.py", line 1120, in calcDistUpgrade
    if not self.cache.installTasks(self.tasks):
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeCache.py", line 856, in installTasks
    pkg.mark_install()
  File "/usr/lib/python3/dist-packages/apt/package.py", line 1356, in mark_install
    fixer.resolve(True)
SystemError: E:Unable to correct problems, you have held broken packages.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/problem_report.py", line 497, in add_to_existing
    self.write(f)
  File "/usr/lib/python3/dist-packages/problem_report.py", line 450, in write
    block = f.read(1048576)
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/bionic", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeController.py", line 2072, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeController.py", line 1981, in fullUpgrade
    if not self.askDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeController.py", line 1153, in askDistUpgrade
    changes = self.calcDistUpgrade()
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeController.py", line 1120, in calcDistUpgrade
    if not self.cache.installTasks(self.tasks):
  File "/tmp/ubuntu-release-upgrader-_29ga8ky/DistUpgrade/DistUpgradeCache.py", line 856, in installTasks
    pkg.mark_install()
  File "/usr/lib/python3/dist-packages/apt/package.py", line 1356, in mark_install
    fixer.resolve(True)
SystemError: E:Unable to correct problems, you have held broken packages.
=== Command terminated with exit status 1 (Thu Oct 22 03:03:11 2020) ===


Get this bounty!!!

#StackBounty: #boot #grub2 #upgrade #kernel #20.04 ZFS doesn't allow me to follow kernels with updates

Bounty: 150

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


Get this bounty!!!

#StackBounty: #boot #grub2 #upgrade #kernel #20.04 ZFS doesn't allow me to follow kernels with updates

Bounty: 150

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


Get this bounty!!!

#StackBounty: #boot #grub2 #upgrade #kernel #20.04 ZFS doesn't allow me to follow kernels with updates

Bounty: 150

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


Get this bounty!!!

#StackBounty: #boot #grub2 #upgrade #kernel #20.04 ZFS doesn't allow me to follow kernels with updates

Bounty: 150

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


Get this bounty!!!

#StackBounty: #boot #grub2 #upgrade #kernel #20.04 ZFS doesn't allow me to follow kernels with updates

Bounty: 150

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


Get this bounty!!!

#StackBounty: #boot #grub2 #upgrade #kernel #20.04 ZFS doesn't allow me to follow kernels with updates

Bounty: 150

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


Get this bounty!!!

#StackBounty: #boot #grub2 #upgrade #kernel #20.04 ZFS doesn't allow me to follow kernels with updates

Bounty: 150

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


Get this bounty!!!