Skip to content

Conversation

@N-Parsons
Copy link
Contributor

The current release fails to find my kernel due to my use of btrfs.

On my system, "/boot" is within a subvolume named "@" (a fairly standard approach to btrfs filesystem layout) and GRUB mounts the btrfs partition at the top level, meaning that it sees the boot directory at "/@/boot"; the result is that grep -Eo 'BOOT_IMAGE=[^ ]+ returns "/@/boot/vmlinuz...". Once the system has booted however, the boot directory is found simply at "/boot", rather than "/@/boot", so the script currently reports that the kernel can't be found when running in live mode. This PR resolves this issue.

While not the case on my system (and usually advised against as being unnecessary) some users may use a separate btrfs subvolume for their "/boot" directory (eg. "@boot"), so I've written my patch to also be able to handle these, relying on the existing code used to prepend "/boot".

Some other btrfs configurations are possible (eg. putting the root filesystem directly at the top level), but these should already be catered for by the existing code.

@speed47
Copy link
Owner

speed47 commented Aug 8, 2018

Thanks for the PR!
The script enforces POSIX sh to ensure maximum compatibility, including BSDs, but your change introduces bashisms, could you ensure your PR passes the shellcheck -s sh spectre-meltdown-checker.sh ?

@N-Parsons N-Parsons force-pushed the btrfs-boot branch 2 times, most recently from 9033ab5 to e2748c6 Compare August 9, 2018 09:16
- /boot may be within a named root subvolume (eg. "/@/boot")
- /boot may be in its own subvolume (eg. "/@boot")
@N-Parsons
Copy link
Contributor Author

Sorry about that, @speed47 - the issues should now be resolved.

@speed47 speed47 merged commit d3481d9 into speed47:master Aug 9, 2018
@speed47
Copy link
Owner

speed47 commented Aug 9, 2018

Thanks!

@N-Parsons N-Parsons deleted the btrfs-boot branch August 9, 2018 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants