ublue-os / isogenerator-old

An action to generate custom ISOs of OCI images
Apache License 2.0
31 stars 15 forks source link

Enable GRUB menu auto hide #71

Open tunix opened 1 year ago

tunix commented 1 year ago

If we installed our systems using the official Fedora Silverblue or Workstation images, then GRUB wouldn't show up everytime you boot but only when the system has some issue booting up or that it's restarted abnormally. This is usually not the case when you install a system from an image that's built with the isogenerator.

To fix this, I had the following script running in my pipeline:

grub2-editenv - set menu_auto_hide=1
grub2-mkconfig -o /usr/etc/grub2-efi.cfg

I just sycn'd my repo with startingpoint and moved this script to work as a post script and now the pipeline fails with the following error:

-- Running [post] scripts defined in recipe.yml --
Running [post]: autorun.sh
[autorun.sh] Running [post]: /tmp/scripts/post/grub_auto_hide.sh
grub2-editenv: error: cannot open `/boot/grub2/grubenv.new': No such file or directory.
/usr/sbin/grub2-probe: error: failed to get canonical path of `overlay'.
error building at STEP "RUN chmod +x /tmp/scripts/build.sh &&     /tmp/scripts/build.sh &&     rm -rf /tmp/* /var/* &&     ostree container commit": error while running runtime: exit status 1
time="2023-06-03T13:23:48Z" level=error msg="exit status 1"
Error: Error: buildah exited with code 1

I think it'd be nice to add a flag to auto hide or not but I don't know how this can easily be managed from the startingpoint repo.

EyeCantCU commented 1 year ago

It would likely have to go into a post install script here in installer/kickstart. I am planning on running another ISO build for my image later today so I can investigate when I do