GRUB2.02 hide a single menu entry.
I have an embedded Linux system that uses GRUB2.02. I have added a custom grub.cfg file which lists four menu entries. These entries are, 'Boot base Linux system', 'Boot upgraded Linux system', 'Action: Restore To Factory Defaults', and 'Action: Upgrade System From Network'. The actions are handled through systemd unit services called in kernel command line.
I would like to add one more menu entry but this entry is hidden from users during boot. The purpose of this last menu entry is if an API triggers a 'network upgrade', then the default grub menu entry is changed to this hidden entry id and the system is rebooted and the network upgrade is handled from there on out by the system services booted from that hidden menu entry. I've looked around the web and on the grub2.02 manual but could not find any specific commands to hide a grub menu entry id. Does anybody know a way to hide a grub menu entry id from users during boot? Code:
set default=ulinux Currently I only have a grub.cfg file and have noting else like /etc/default/grub or /etc/grub.d. If passing a command option to /etc/default/grub file, would allow a specific grub menu entry ID to be hidden, then this would be a viable option. Any help, feedback, or suggestions would be greatly appreciated Cheers! |
Quote:
Could you use the same method to swap (and change names) grub.cfg with a grub.network (containing only the network upgrade boot option) before initiating a reboot and then swapping them back again after the network upgrade? |
Thanks hydrurga. Your proposed option definitely came to mind. I can have the API calls that trigger the system reboot to also switch a grub-network.cfg file to grub.cfg before reboot. Then once network upgrade is complete, have the grub.cfg's switched back by the same service that is handling the network upgrades. This should work fine.
I guess I was just wanting to see if I was missing any GRUB command options. Closing issue. |
Quote:
|
All times are GMT -5. The time now is 02:33 PM. |