Migrate Pi users away from u-boot in impish
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Undecided
|
Dave Jones | ||
Impish |
Fix Released
|
Undecided
|
Dave Jones |
Bug Description
Currently we have a different boot sequence on the Pi depending on which release is used:
* Focal images (and prior) all use u-boot
* Groovy images (and onwards) don't
* However, upgraders from Focal to Groovy aren't forced off u-boot; their boot configuration remains untouched
We should update user's boot configuration to migrate them off u-boot if they're still on it prior to upgrade to impish. This should be added as a quirk to do-release-upgrade. The primary complexity is that the Focal boot configuration is split into three files which should be merged. Logic from pibootctl's parser can be used for a lot of this.
The specific changes required (for those that wish to perform the changes manually):
* Find "include syscfg.txt" and "include usercfg.txt" and include the content of those files directly in "config.txt" instead.
* Remove/comment out all kernel=uboot_rpi_* lines referring to u-boot (in all conditional sections), and add a kernel=vmlinuz line to the [all] conditional section (adding that section if it's not found).
* Add an "initramfs initrd.img followkernel" line to the [all] conditional section (using the section added by the prior step if required).
* Remove any "device_
This switches the sequence from the current one (Pi's native bootloader loads u-boot, which then loads the Linux kernel and the initrd, before passing control to the kernel), to the new one (Pi's native bootloader loads the Linux kernel and the initrd, then passes control to the kernel).
The inlining of the split configuration files deals with a subtle edge case of the early versions of pibootctl being used to set the kernel and/or initrd, and writing those settings into syscfg.txt where they would override our changes. Releases after Focal removed the split (on new images), so this also helps keep the configuration layout consistent.
Related branches
- Brian Murray: Needs Fixing
-
Diff: 467 lines (+379/-34)3 files modifiedDistUpgrade/DistUpgradeQuirks.py (+137/-1)
debian/changelog (+7/-0)
tests/test_quirks.py (+235/-33)
Changed in ubuntu-release-upgrader (Ubuntu): | |
assignee: | nobody → Dave Jones (waveform) |
Changed in ubuntu-release-upgrader (Ubuntu): | |
milestone: | none → ubuntu-21.10-beta |
tags: | added: fr-1505 |
description: | updated |
This bug was fixed in the package ubuntu- release- upgrader - 1:21.10.7
--------------- release- upgrader (1:21.10.7) impish; urgency=medium
ubuntu-
[ Dave Jones ] DistUpgradeQuir ks.py: Add quirk to merge raspi boot config
* DistUpgrade/
into one file, and remove u-boot references (LP: #1936401)
[ Brian Murray ]
* Run pre-build.sh: updating mirrors, demotions, and translations.
-- Brian Murray <email address hidden> Tue, 24 Aug 2021 11:17:22 -0700