A modified pop_os 20.04 fails to boot

Asked by xanmoo

Hello,
As a test, a pop-os_20.04_amd64_nvidia_23.iso file was modified as follow in the chroot env:
apt update
apt upgrade

The modified iso was created with no other modification. In the chroot env during the upgrade step, some warnings were sent:

W: missing /lib/modules/5.4.0-65-generic
W: Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/5.4.0-65-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
cat: /var/tmp/mkinitramfs_XVaagc/lib/modules/5.4.0-65-generic/modules.builtin: No such file or directory
find: '/var/tmp/mkinitramfs_XVaagc/lib/modules/5.4.0-65-generic/kernel': No such file or directory
cryptsetup: ERROR: Couldn't resolve device /dev/sdb1
cryptsetup: WARNING: Couldn't determine root device
cryptsetup: ERROR: Couldn't resolve device /dev/sda2
I: The initramfs will attempt to resume from /dev/sda2
I: Set the RESUME variable to override this.
depmod: WARNING: could not open modules.order at /var/tmp/mkinitramfs_XVaagc/lib/modules/5.4.0-65-generic: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_XVaagc/lib/modules/5.4.0-65-generic: No such file or directory
kernelstub.Config : INFO Looking for configuration...
kernelstub : WARNING Live mode is enabled!
Kernelstub is running in live environment mode. This usually means that you are running a live disk, and kernelstub should not run. We are thus exiting with 0.
If you are not running a live disk, please run `sudo kernelstub` to disable live mode.

When burn on a usb key with the disk tool in ubuntu 18.04 or boot from virtualbox yields the following message:

Loading /casper_pop-os-20.04_amd64_nvidia_debug_41/vmlinuz.efi failed
bad file number
boot:

Previously, modifying a ubuntu dde20.04 iso succeeded.

Is there something to do (in the chroot env to generate a bootable iso?

Thank for your help.

Question information

Language:
English Edit question
Status:
Answered
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

You'll have to do a couple of things.

[1]

Make sure you actually have the kernel files in /boot

Execute `ls -l /boot`.
You should see initrd* and vmlinuz* files (actual files not broken symlinks).

If you need to install these files follow the instructions here:

Question 688169, "Why can't I see Kernel 5.3.0-18 files on the Kernels tab for Ubuntu 19.10?"
(https://answers.launchpad.net/cubic/+question/688169)

(I always recommend installing the files for the kernel version shown above Cubic's Terminal widow, top right. But if you aren't installing drivers, you should be able to install any kernel you want).

[2]

Pop!_OS does two incorrect things, and they should really fix it.

However, we can work around them...

1)
The Pop!_OS developers have hard-coded the file name "initrd.gz" regardless if "initrd" is actually compressed using gzip compression.

For more information, See Bug #1895770, "Pop!_OS expects the initramfs bootstrap file to be explicitly named initrd.gz."

Use the following steps to work around this issue. You need to explicitly use gzip compression for initrd for the kernel version from step [1].

Question 693009, "How to change the extension of the initrd file?"
(https://answers.launchpad.net/cubic/+question/693009)

Make sure you select the kernel using this updated intrd file on Cubic's Options page, Kernel tab.

2)
The Pop!_OS installer has also hard coded the file name "vmlinuz.efi".
This is because Pop!_OS is using the Elementary installer, which is beta software that is not recommended for production use.

Note that the *.efi extension doesn't have any significance, since EFI is already supported by the standard vmlinuz format.
For more information, see bug #1898749, "Pop!_OS expects vmlinuz on the iso to have the *.efi extension."
Aslo, see question 692829, "Pop!_OS 20.04 (13) Respin Issue." (https://answers.launchpad.net/cubic/+question/692829)

Nevertheless, you do not have to do anything to work-around this issue.

Cubic automatically creates a link named "vmlinuz.efi" to the actual vmlinuz file, specifically to work around this this problem. (Cubic creates the symlink this whenever it detects the Distributor ID contains the word "Pop").

TLDR:

To summarize, you need to do two things:

[1] Install the Linux kernel files.
    https://answers.launchpad.net/cubic/+question/688169
    Then select this kernel on Cubic's Kernel tab.

[2] Recreate initrd for this kernel using gzip compression.
    https://answers.launchpad.net/cubic/+question/693009

Revision history for this message
xanmoo (jeanpatrick-pommier) said :
#2

Thank you so much !

Can you help with this problem?

Provide an answer of your own, or ask xanmoo for more information if necessary.

To post a message you must log in.