Heads became grub centric
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 1.6k
- Forks
- 211
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 6
Description
Can't seem to boot the main OS for some reason, is just doesn't see any files in my boot partition and refuses to sign anything.
It just prints this to stdout and then fails with "Failed to update checksums/sign default config":
sha256sum: /tmp/kexec/kexec_hashes.txt: No such file or directory /etc/functions: line 1010: /tmp/kexec/kexec_tree.txt: No such file or directory diff: can't stat '/tmp/kexec/kexec_tree.txt.user': No such file or directory Unable to locate /boot files on any mounted disk mount: can't find /boot in /proc/mounts
I've tried reflashing multiple times and resetting everything to no avail.
My/bootis an ext4-formatted/dev/sda1with kexec_menu.txt, initramfs-linux.img and vmlinuz-linux, I can mount it manually just fine. It also gets mounted by Heads if I set the boot device to/dev/sda1with the "Change the /boot device" option.
This setup worked perfectly with an older build from#1723, not sure what's changed...
/dev/sda2is a LUKS2-encrypted btrfs root, I don't need Heads to touch it
Ah, I see.
mount_possible_boot_deviceis hardcoded to look for files starting withgrub.
But why..?
I get the ease of use part of this, but I feel Heads should respect whatever I set as/bootand not try probing every partition forgrubfiles (that aren't even there).
Originally posted by @pcm720 in https://github.com/linuxboot/heads/issues/1908#issuecomment-2692407117
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading /etc/functions around line 1010 and inspect mount_possible_boot_device, especially its grub-file probing and handling of the configured /boot device. Reproduce the failure with the reported ext4 /dev/sda1 setup, then verify that the selected /boot device is respected and the checksum/signing flow completes without requiring grub files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100