2020-04-01 16:49:01 |
Joseph Salisbury |
bug |
|
|
added bug |
2020-04-01 16:49:27 |
Joseph Salisbury |
bug task added |
|
grub2 (Ubuntu) |
|
2020-04-01 16:49:42 |
Joseph Salisbury |
bug |
|
|
added subscriber Dexuan Cui |
2020-04-21 21:53:07 |
Launchpad Janitor |
grub2 (Ubuntu): status |
New |
Confirmed |
|
2020-04-21 21:53:07 |
Launchpad Janitor |
linux-azure (Ubuntu): status |
New |
Confirmed |
|
2020-04-21 22:07:58 |
David Baird |
bug |
|
|
added subscriber David Baird |
2020-05-04 04:41:18 |
David Baird |
information type |
Public |
Public Security |
|
2020-05-04 04:41:39 |
David Baird |
information type |
Public Security |
Public |
|
2020-05-11 21:56:23 |
Dan Streetman |
bug |
|
|
added subscriber Dan Streetman |
2020-05-12 00:28:37 |
Dan Streetman |
bug |
|
|
added subscriber Steve Langasek |
2020-05-12 01:20:06 |
Steve Langasek |
grub2 (Ubuntu): status |
Confirmed |
Won't Fix |
|
2020-05-13 15:42:04 |
Jay Vosburgh |
bug |
|
|
added subscriber Jay Vosburgh |
2020-05-19 19:21:19 |
Steve Langasek |
bug task added |
|
livecd-rootfs (Ubuntu) |
|
2020-05-19 19:30:06 |
Steve Langasek |
livecd-rootfs (Ubuntu): status |
New |
Triaged |
|
2020-05-19 19:30:08 |
Steve Langasek |
livecd-rootfs (Ubuntu): importance |
Undecided |
High |
|
2020-05-22 23:40:05 |
Brian Murray |
tags |
|
rls-gg-incoming |
|
2020-06-04 15:11:24 |
Dimitri John Ledkov |
bug task added |
|
cloud-images |
|
2020-06-04 15:12:33 |
Brian Murray |
tags |
rls-gg-incoming |
|
|
2020-06-04 17:30:29 |
Marcelo Cerri |
linux-azure (Ubuntu): status |
Confirmed |
Invalid |
|
2020-06-04 20:30:06 |
Robert C Jennings |
bug |
|
|
added subscriber Robert C Jennings |
2020-06-05 12:23:03 |
Francis Ginther |
tags |
|
id-5ed9564743f05c6beebe77ad |
|
2020-06-12 15:36:25 |
Éric St-Jean |
cloud-images: status |
New |
Confirmed |
|
2020-06-30 06:57:54 |
Eric Heydrick |
bug |
|
|
added subscriber Eric Heydrick |
2020-09-01 20:56:57 |
Brian Murray |
nominated for series |
|
Ubuntu Focal |
|
2020-09-01 20:56:57 |
Brian Murray |
bug task added |
|
grub2 (Ubuntu Focal) |
|
2020-09-01 20:56:57 |
Brian Murray |
bug task added |
|
livecd-rootfs (Ubuntu Focal) |
|
2020-09-01 20:56:57 |
Brian Murray |
bug task added |
|
linux-azure (Ubuntu Focal) |
|
2020-09-01 20:57:49 |
Brian Murray |
linux-azure (Ubuntu Focal): status |
New |
Invalid |
|
2020-09-02 03:20:59 |
Kyle Rarey |
bug |
|
|
added subscriber Kyle Rarey |
2020-11-28 22:39:00 |
Launchpad Janitor |
grub2 (Ubuntu Focal): status |
New |
Confirmed |
|
2020-11-28 22:39:00 |
Launchpad Janitor |
livecd-rootfs (Ubuntu Focal): status |
New |
Confirmed |
|
2021-02-18 21:51:35 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~patviafore/livecd-rootfs/+git/livecd-rootfs/+merge/397376 |
|
2021-02-19 15:38:43 |
Pat Viafore |
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://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6/. As soon as a reboot was performed, a panic with the v5.6 kernel occured because the rootfs can not be found.
It turns out by default, initramfs does not get loaded:
/boot/grub/grub.cfg:
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3d2737e8-
b95a-42bf-bac1-bb6fb4cda87f' {
…
if [ "${initrdfail}" = 1 ]; then
linux /boot/vmlinuz-5.6.0-050600-generic root=PARTUUID=bc3d472f-401e-4774-affa-df1acba65a73 ro console=tty1 console=ttyS0 earlyprintk=ttyS0 ignore_loglevel sysrq_always_enabled unknown_nmi_panic
initrd /boot/initrd.img-5.6.0-050600-generic
else
linux /boot/vmlinuz-5.6.0-050600-generic root=PARTUUID=bc3d472f-401e-4774-affa-df1acba65a73 ro console=tty1 console=ttyS0 earlyprintk=ttyS0 ignore_loglevel sysrq_always_enabled unknown_nmi_panic panic=-1
#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/success/panic/success” pattern repeats forever…
The linux-azure kernels are not affected since they have the vmbus driver and storage drivers built-in (i.e. “=y”):
/boot/config-5.3.0-1013-azure:CONFIG_HYPERV_STORAGE=y
/boot/config-5.3.0-1013-azure:CONFIG_HYPERV=y
/boot/config-5.4.0-1006-azure:CONFIG_HYPERV_STORAGE=y
/boot/config-5.4.0-1006-azure:CONFIG_HYPERV=y
/boot/config-5.6.0-050600-generic:CONFIG_HYPERV_STORAGE=m
/boot/config-5.6.0-050600-generic:CONFIG_HYPERV=m
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://cdimage.ubuntu.com/daily-live/pending/ and don’t see the strange grub issue. |
[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://cloud-images.ubuntu.com/releases/focal/release/.
For example, using http://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img :
qemu-system-x86_64 -cpu host -machine type=q35,accel=kvm -m 2048 -nographic -snapshot -netdev id=net00,type=user,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=net00 -drive if=virtio,format=qcow2,file=ubuntu-20.04-server-cloudimg-amd64.img -drive if=virtio,format=raw,file=seed.img
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_boot_fallback_triggered=0.
[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://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6/. As soon as a reboot was performed, a panic with the v5.6 kernel occured because the rootfs can not be found.
It turns out by default, initramfs does not get loaded:
/boot/grub/grub.cfg:
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3d2737e8-
b95a-42bf-bac1-bb6fb4cda87f' {
…
if [ "${initrdfail}" = 1 ]; then
linux /boot/vmlinuz-5.6.0-050600-generic root=PARTUUID=bc3d472f-401e-4774-affa-df1acba65a73 ro console=tty1 console=ttyS0 earlyprintk=ttyS0 ignore_loglevel sysrq_always_enabled unknown_nmi_panic
initrd /boot/initrd.img-5.6.0-050600-generic
else
linux /boot/vmlinuz-5.6.0-050600-generic root=PARTUUID=bc3d472f-401e-4774-affa-df1acba65a73 ro console=tty1 console=ttyS0 earlyprintk=ttyS0 ignore_loglevel sysrq_always_enabled unknown_nmi_panic panic=-1
#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/success/panic/success” pattern repeats forever…
The linux-azure kernels are not affected since they have the vmbus driver and storage drivers built-in (i.e. “=y”):
/boot/config-5.3.0-1013-azure:CONFIG_HYPERV_STORAGE=y
/boot/config-5.3.0-1013-azure:CONFIG_HYPERV=y
/boot/config-5.4.0-1006-azure:CONFIG_HYPERV_STORAGE=y
/boot/config-5.4.0-1006-azure:CONFIG_HYPERV=y
/boot/config-5.6.0-050600-generic:CONFIG_HYPERV_STORAGE=m
/boot/config-5.6.0-050600-generic:CONFIG_HYPERV=m
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://cdimage.ubuntu.com/daily-live/pending/ and don’t see the strange grub issue. |
|
2021-02-19 15:40:44 |
Pat Viafore |
bug |
|
|
added subscriber Ubuntu Sponsors Team |
2021-02-22 20:12:26 |
Mathew Hodson |
bug task deleted |
grub2 (Ubuntu Focal) |
|
|
2021-02-22 20:12:32 |
Mathew Hodson |
bug task deleted |
grub2 (Ubuntu) |
|
|
2021-02-22 20:12:38 |
Mathew Hodson |
bug task deleted |
linux-azure (Ubuntu Focal) |
|
|
2021-02-22 20:12:43 |
Mathew Hodson |
bug task deleted |
linux-azure (Ubuntu) |
|
|
2021-02-22 20:19:53 |
Mathew Hodson |
livecd-rootfs (Ubuntu Focal): importance |
Undecided |
Medium |
|
2021-02-22 20:26:41 |
Mathew Hodson |
livecd-rootfs (Ubuntu): status |
Triaged |
Fix Released |
|
2021-03-04 13:59:24 |
Łukasz Zemczak |
livecd-rootfs (Ubuntu Focal): status |
Confirmed |
Fix Committed |
|
2021-03-04 13:59:27 |
Łukasz Zemczak |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2021-03-04 13:59:31 |
Łukasz Zemczak |
bug |
|
|
added subscriber SRU Verification |
2021-03-04 13:59:39 |
Łukasz Zemczak |
tags |
id-5ed9564743f05c6beebe77ad |
id-5ed9564743f05c6beebe77ad verification-needed verification-needed-focal |
|
2021-03-04 14:20:39 |
Łukasz Zemczak |
removed subscriber Ubuntu Sponsors Team |
|
|
|
2021-03-10 21:31:57 |
Pat Viafore |
tags |
id-5ed9564743f05c6beebe77ad verification-needed verification-needed-focal |
id-5ed9564743f05c6beebe77ad verification-done-focal verification-needed |
|
2021-03-11 09:43:55 |
Launchpad Janitor |
livecd-rootfs (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2021-03-11 09:44:01 |
Łukasz Zemczak |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2021-12-08 23:40:35 |
Éric St-Jean |
cloud-images: status |
Confirmed |
Fix Released |
|