initramfs does not get loaded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
Fix Released
|
Undecided
|
Unassigned | ||
livecd-rootfs (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
Generic cloud images will boot without initramfs, fail, and then fall back, resulting in a double boot performance hit
[Test Case]
Load up cloud images from http://
For example, using http://
qemu-system-x86_64 -cpu host -machine type=q35,accel=kvm -m 2048 -nographic -snapshot -netdev id=net00,
Note: seed.img is created using cloud-localds and a cloud-init file containing ssh keys.
Observe the double boot.
On a fixed system, there should only be one boot, and /boot/grub/grubenv should show initrdless_
[Regression Potential]
Cloud images (both generic and cloud-specific) images perform a double boot. To mitigate the regression potential, testing will occur for all cloud-specific kernels as well as all generic cloud images.
[Original Description]
A Gen-1 Ubuntu 19.10 VM on Azure was created and upgraded to Ubuntu 20.04 by “do-release-upgrade –d”.
Then the latest Ubuntu v5.6 kernel was installed from https:/
It turns out by default, initramfs does not get loaded:
/boot/grub/
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_
b95a-42bf-
…
if [ "${initrdfail}" = 1 ]; then
linux /boot/vmlinuz-
initrd /boot/initrd.
else
linux /boot/vmlinuz-
#Dexuan: here the initrd line is missing!
fi
initrdfail
}
As we can see, Ubuntu only uses the initrd.img if initrdfail=1. Normally, initrdfail = 0, so when we boot the v5.6 kernel for the first time, we must hit the “fail to mount rootfs” panic and the kernel will automatically reboot….
Also, the “initrdfail” here marks initrdfail=1, so when the kernel boots for the 2nd time, the kernel should successfully boot up. Next, when the kernel boots for the 3rd time, it panics again since the userspace program resets initrdfail to 0, and next time when the kernel boots, it can boot up successfully -- this “panic/
The linux-azure kernels are not affected since they have the vmbus driver and storage drivers built-in (i.e. “=y”):
/boot/config-
/boot/config-
/boot/config-
/boot/config-
/boot/config-
/boot/config-
The v5.6 kernel uses =m rather than =y, so is affected here.
It looks the setting may be intentional, but we should not assume a customer kernel must have the necessary vmbus/storage drivers built-in.
This issue only happens to the Ubuntu Marketplace image (19.10 and maybe 19.04 as well?) on Azure.
We installed a Ubuntu 20.04 VM from the .iso file from http://
Related branches
- Robert C Jennings (community): Approve
- Ubuntu Core Development Team: Pending requested
-
Diff: 158 lines (+62/-24)5 files modifieddebian/changelog (+8/-0)
live-build/functions (+48/-0)
live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary (+1/-10)
live-build/ubuntu-cpc/hooks.d/base/disk-image.binary (+5/-11)
live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary (+0/-3)
Changed in livecd-rootfs (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: rls-gg-incoming |
tags: | removed: rls-gg-incoming |
tags: | added: id-5ed9564743f05c6beebe77ad |
Changed in cloud-images: | |
status: | New → Confirmed |
Changed in linux-azure (Ubuntu Focal): | |
status: | New → Invalid |
description: | updated |
no longer affects: | grub2 (Ubuntu Focal) |
no longer affects: | grub2 (Ubuntu) |
no longer affects: | linux-azure (Ubuntu Focal) |
no longer affects: | linux-azure (Ubuntu) |
Changed in livecd-rootfs (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in cloud-images: | |
status: | Confirmed → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.