[FFe request] Enable booting initrd-less with fallback

Bug #1754586 reported by Chris Glass
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The proposed change allows users to enable "initrd-less" boot for kernels that support it, by setting the GRUB_FORCE_PARTUUID configuration variable in /etc/default/grub.

In case the user sets the variable today, the initrd line will not be written, and some kernels will boot this way (faster, usually, since there is no IO involved to lift the initrd from disk. This is particularly relevant to cloud images for example).

This change allows the GRUB_FORCE_PARTUUID to be set more agressively, by providing a fallback mechanism: should the initrd-less boot fail, grub will try booting the same kernel with an initrd. To achieve this we set a flag in grubenv, that is then cleaned very early in the userspace boot process.

The rest of the behavior does not change.

Users not using initrd-less boots are unaffected by this change.
Users currently using initrd-less boots will still boot - and get a new fallback in case the kernel they boot does not support initrd-less booting (when upgrading or changing kernel flavor for example).

Testing done:

- Booting with and without initrd on a kernel that supports it (in this particular case the -gcp kernel)
- Booting with and without initrd on a kernel that does *not* support it (ensuring the fallback works)
- Tried to test the case where userspace sets "next boot" but it looks like the feature allowing to do so regressed. This is independent of this FFe and will be the subject of another bugreport (it's mentioned here since tangentially relevant).

Revision history for this message
Chris Glass (tribaal) wrote :

It seems like I cannot link the branch for some reason.

It can be found here: https://code.launchpad.net/~ubuntu-core-dev/grub/+git/ubuntu/+ref/feature/initrd-less-boot-with-fallback

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I am generally fine with this addition. How will it be announced/made clear to the users that this is what will be happening by default if you try an initrd-less boot? Are there any plans for that?

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Anyway, to have the formalities out of the way, FFe approved.

Changed in grub2 (Ubuntu):
status: New → Triaged
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Landed in grub2 2.02+dfsg1-5ubuntu5.

Changed in grub2 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.