-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Common: Keep other version files under /boot
when install kernel
#5076
base: main
Are you sure you want to change the base?
Conversation
Indeed. The whole thing is very fragile, even on ext4/symlinks. On fat32 this is even worse. This is due to the way we do "bootscripts" that expect a certain, fixed, filename, the "one true kernel/initrd/dtb" that will be booted. We need to convene and start moving to generating bootscript/extlinux.conf/etc, something like |
Seems to me this is mostly about #4886 so @amazingfate ? |
Well, what I'm going to do is:
But I have no idea about how to let use choose menu. There is no keyboard, instand we only have button. What it can do is just, unpressed -> |
It's not about being able to choose, instead, not having hardcoded |
If I remember correctly, grub also code Create a file named
Then in
|
IMO there are two basic steps to this: Given our mix of u-boot scripts, extlinux, efi, grub across the various boards/architectures there won't be one solution to the "how to choose which kernel to boot" problem, as each boot method varies in how it does this. However we shouldn't build a dozen different solutions either. We need to standardize this as much as possible, then integrate with the booting mechanisms. At the heart of the issue here IMO is what is the future of armbianEnv.txt? There is a lot of functionality that this provides (besides various boot parameters, the whole overlay mechanism is tied to this currently). But armbianEnv.txt in it's current form is really incompatible with extlinux, and likely efi/grub as it was designed for the u-boot script world. I think we are trying to move away from customized u-boot scripts to more modern booting methods so how do we continue to support the functionality provided by armbianEnv.ext while moving to modern boot methods? In my limited thinking about the problem, we need a 'tool' like update-grub/extlinux-update that understands armbianEnv.txt (or some replacement) and merges that information into the format that the various boot methods understand (extlinux.conf, boot.scr, etc) |
Nope, here's how it does it: https://sources.debian.org/src/grub2/2.06-3~deb11u5/util/grub.d/10_linux.in/
So you don't have to tell GRUB mkconfig which kernel to boot. It has its own internal logic, run in userspace, to select against which kernel/initrd/dtb it will run against. The part about the dtb is important here, it conflicts with what Armbian's linux-dtb currently produces (grub wants a file there and Armbian linux-dtb puts a directory with the same name). |
Yes, the (many) families that use overlay "fixups" (which are actually fragments of bootscripts) are tied to bootscripts. I've the intention of getting rid of those completely (by templating the overlay and outputting pre-fixed-up dtbos). There's a whole bag of pending work on overlays before we can dream of any non-bootscript capability.
You nailed it. armbianEnv.txt could still be the "source of truth", but then be processed into 3/4 different outputs. One for bootscript, one for extlinux, one for efi.
I mentioned Digging into
|
Can we merge this first ? The |
I agree that this can be merged now while the full solution is being designed. However I think the priority at this point in the release process for 20.05 is not to make invasive changes in this area. We need to get a release out on the new build framework first before we start making fundamental changes to the booting process across boards/families. |
Let's get an RC out first. If these initiatives prove to fix more than they break, we can move faster, otherwise, 23.08. |
f9b30e4
to
4515f8a
Compare
`initrd.img-${version}` will be remove by command `update-initramfs -d -k "${version}"`, so we don't need to care about it.
…filesystem Just for keeping them
4515f8a
to
809b8cd
Compare
🧹 PR Cleanup Quest 🧹 Is the issue that this PR tries to solve still present today? @hzyitc |
Description
When we try to install a new kernel. All files under
/boot
will be removed.This PR will keep them until the special version kernel was removed.
How Has This Been Tested?
Need to be tested on other devices.
Checklist: