bedrocklinux / bedrocklinux-userland

This tracks development for the things such as scripts and (defaults for) config files for Bedrock Linux
https://bedrocklinux.org
GNU General Public License v2.0
616 stars 69 forks source link

Artix, Grub, File not found error #224

Closed juancarlospaco closed 3 years ago

juancarlospaco commented 3 years ago

I am using Artix + Bedrock, everything works nice so far, but the Grub prints errors and displays without themes, and waits for pressing ENTER key to continue instead of booting unattended that kinda annoying, this used to work with themes and without errors before Bedrock was installed, PC is fresh installed, no themes installed just the default builtin that Artix provides, the files do exist on disk.

photo_2021-04-21_12-22-57

$ ls /usr/share/grub/themes/artix/
background.png   highlight_e.png  icons     menu_c.png  slider_c.png  slider_s.png  userpass.png
highlight_c.png  highlight_w.png  logo.png  menu_e.png  slider_n.png  theme.txt     u_vga16_16.pf2
$

Maybe allow access to /usr/share/grub/themes/*.* recursively by default ?. Even read-only access is Ok. :slightly_smiling_face:

paradigm commented 3 years ago

Maybe allow access to /usr/share/grub/themes/*.* recursively by default ?.

If we share it in general so all processes see the same things at that path and a user installs multiple instances of grub's themes from different distros (for whatever reason), the corresponding package managers could end up fighting over the contents of that directory. We probably have to do something more creative.

From GRUB's point of view at boot time, the root directory is the bedrock stratum. We have full control over this stratum; no worry about package managers fighting. We just need to get /bedrock/strata/bedrock/usr/share/grub to see the contents of /bedrock/strata/<bootloader-stratum>/usr/share/grub.

I don't know how to dynamically figure out which stratum provides the bootloader, as functionally it's just the last one two overwrite /boot. However, maybe we don't have to: we can make it configurable in bedrock.conf, and default to the hijacked stratum, which will be correct at least at first. I can look into adding that functionality when time allows.

Try running

ln -s /bedrock/strata/artix/usr/share/grub /bedrock/strata/bedrock/usr/share/grub

as root, then reboot and let me know if that fixes it for you. If it does resolve the issue, do note that you will have to update this symlink if you ever change your bootloader, at least until I add this functionality to Bedrock's code base directly.

juancarlospaco commented 3 years ago

Fixed!, the ln -s works.

paradigm commented 3 years ago

Excellent! I'll see if I can automate this in a future release so it doesn't bite anyone else.