linuxboot / linuxboot/heads

Heads became grub centric

Open
#1,918 4 comments 0 reactions 0 assignees View on GitHub

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 /boot is an ext4-formatted /dev/sda1 with 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/sda1 with the "Change the /boot device" option.
This setup worked perfectly with an older build from #1723, not sure what's changed...
/dev/sda2 is a LUKS2-encrypted btrfs root, I don't need Heads to touch it

image


Ah, I see. mount_possible_boot_device is hardcoded to look for files starting with grub.
But why..?
I get the ease of use part of this, but I feel Heads should respect whatever I set as /boot and not try probing every partition for grub files (that aren't even there).

Originally posted by @pcm720 in https://github.com/linuxboot/heads/issues/1908#issuecomment-2692407117

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.