Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Include custom .cfg menu entries #4

Open
Natetronn opened this issue Oct 12, 2022 · 1 comment
Open

Feature Request: Include custom .cfg menu entries #4

Natetronn opened this issue Oct 12, 2022 · 1 comment

Comments

@Natetronn
Copy link

I have a custom.cfg for custom menu entries, which also calls other custom cfgs, which have their own menu entries.

grub-custom-cfgs

For example, in custom.cfg I have the following, which calls liveiso.cfg and gpu-switcher.cfg:

menuentry 'Live ISOs' --class iso {
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root XXXXXX-XXXXXXXXX-XXXXXXXXXXXXXXX
	configfile /@/boot/grub/liveiso.cfg
}
menuentry 'GPU Switcher' --class nvidia {
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root XXXXXX-XXXXXXXXX-XXXXXXXXXXXXXXX
	configfile /@/boot/grub/gpu-switcher.cfg
}

There is also one for btrfs snapshots that's generated on its own (although that's not custom.)

Anyway, if I may, I'd like to request other .cfg file menu entries show up in the grub-reboot-picker as well, please.

@Natetronn
Copy link
Author

Natetronn commented Oct 12, 2022

Here are the items in grub.cfg that make the magic happen for custom configs and snapshots:

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/41_snapshots-btrfs ###
submenu 'Manjaro Linux snapshots' {
    configfile "${prefix}/grub-btrfs.cfg"
}
### END /etc/grub.d/41_snapshots-btrfs ###

I do get the Majnaro Linux snapshots submenu entry in grub-reboot-picker, however, I don't get whatever is located in grub-btrfs.cfg or any of the custom.cfg entries.

I prefer using custom entries, over os-prober (it's turned off), since it allows me to customize the icons, menu order and have entries for various tools and ISOs and such.

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

No branches or pull requests

1 participant