Page 2 of 4
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 10:57 am
by siamhie
asqwerth wrote: Tue Dec 03, 2024 10:46 am
@siamhie you said:
I would like to know more on this custom.cfg file you mention. Would I edit my grub.cfg file to my liking and save it as custom.cfg in the boot directory?
Then save the 41_custom file as 09_custom in the /etc/grub.d/ directory?
My suggested way will NOT give you ONLY 3 entries on the on-screen boot menu, since the grub.cfg entries will come after whatever is in custom.cfg. However, you will have your favourite custom entries right at the top.
Seems you responded just as I was typing a new comment. I did look at the contents of 41_custom and had a question.
Code: Select all
#!/bin/sh
cat <<EOF
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
EOF
Does this also get added to my custom.cfg file at the end?
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 11:01 am
by asqwerth
No. The custom.cfg is a pretty clean file with just the boot entries you want. Don't change 41_custom and just let it do its thing.
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 2:31 pm
by siamhie
asqwerth wrote: Tue Dec 03, 2024 11:01 am
No. The custom.cfg is a pretty clean file with just the boot entries you want. Don't change 41_custom and just let it do its thing.
Ok, so just run my usual sudo update-grub from terminal then? (I will monitor the output of what displays on the screen)
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 3:27 pm
by asqwerth
No update grub needed. Just edit the custom.cfg and reboot. That's it.
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 4:25 pm
by fehlix
siamhie wrote: Tue Dec 03, 2024 10:57 am
Does this also get added to my custom.cfg file at the end?
Perhaps post the custom.cfg you have created under /boot/grub/custom.cfg as text code-block.
This is to avoid any potential typos within that file, may stop to show the added entries,
and you might wonder what's going on.
E.g this way:
Open terminal as normal user and run:
Code: Select all
xclip -selection clipboard -i /boot/grub/custom.cfg
This would send the content of custom.cfg into the "clipboard".
Now within the editor of a reply post, click on [</>] code-block icon,
to get the code-block tags inserted - thos guys: [
code][/code]
The cursor is now located between the code block tags.
Press
Ctrl+v to paste the custom.cfg from the clipboard.
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 4:32 pm
by siamhie
fehlix wrote: Tue Dec 03, 2024 4:25 pm
siamhie wrote: Tue Dec 03, 2024 10:57 am
Does this also get added to my custom.cfg file at the end?
Perhaps post the custom.cfg you have created under /boot/grub/custom.cfg as text code-block.
This is to avoid any potential typos within that file, may stop to show the added entries,
and you might wonder what's going on.
E.g this way:
Open terminal as normal user and run:
Code: Select all
xclip -selection clipboard -i /boot/grub/custom.cfg
This would send the content of custom.cfg into the "clipboard".
Now within the editor of a reply post, click on [</>] code-block icon,
to get the code-block tags inserted - thos guys: [
code][/code]
The cursor is now located between the code block tags.
Press
Ctrl+v to paste the custom.cfg from the clipboard.
Here is the results of
Code: Select all
xclip -selection clipboard -i /boot/grub/custom.cfg
Code: Select all
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="1"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=1024x768
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
insmod gfxmenu
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans-Bold14.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans10.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans12.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/ascii.pf2
insmod png
set theme=($root)/boot/grub/themes/mx_logo_ribbon/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=2
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=2
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Fluxbox-6.6' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.63-x64v3-xanmod1-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.6.63-x64v3-xanmod1 ...'
linux /boot/vmlinuz-6.6.63-x64v3-xanmod1 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.6.63-x64v3-xanmod1
}
menuentry 'Fluxbox-6.1' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-28-amd64-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.1.0-28-amd64 ...'
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-28-amd64
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'XFCE-6.1' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-6.1.0-28-amd64--471fd16c-b914-4193-8af6-42bc4fed4954' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 471fd16c-b914-4193-8af6-42bc4fed4954
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=471fd16c-b914-4193-8af6-42bc4fed4954 ro quiet splash init=/lib/systemd/systemd
initrd /boot/initrd.img-6.1.0-28-amd64
}
### END /etc/grub.d/30_os-prober ###
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 4:35 pm
by siamhie
asqwerth wrote: Tue Dec 03, 2024 3:27 pm
No update grub needed. Just edit the custom.cfg and reboot. That's it.
Just saw this post. I had updated grub and I'm close but no quite there.
Seems my custom.cfg entries were added to the end of my grub menu.
close.jpg
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 5:07 pm
by fehlix
siamhie wrote: Tue Dec 03, 2024 4:32 pm
Here is the results of
Code: Select all
xclip -selection clipboard -i /boot/grub/custom.cfg
Code: Select all
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="1"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=1024x768
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
insmod gfxmenu
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans-Bold14.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans10.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans12.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/ascii.pf2
insmod png
set theme=($root)/boot/grub/themes/mx_logo_ribbon/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=2
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=2
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Fluxbox-6.6' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.63-x64v3-xanmod1-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.6.63-x64v3-xanmod1 ...'
linux /boot/vmlinuz-6.6.63-x64v3-xanmod1 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.6.63-x64v3-xanmod1
}
menuentry 'Fluxbox-6.1' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-28-amd64-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.1.0-28-amd64 ...'
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-28-amd64
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'XFCE-6.1' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-6.1.0-28-amd64--471fd16c-b914-4193-8af6-42bc4fed4954' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 471fd16c-b914-4193-8af6-42bc4fed4954
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=471fd16c-b914-4193-8af6-42bc4fed4954 ro quiet splash init=/lib/systemd/systemd
initrd /boot/initrd.img-6.1.0-28-amd64
}
### END /etc/grub.d/30_os-prober ###
Hmme ... , I guessed it...
Please do not have anything else but only the menu entries within custom.cfg
Here the same reduced to menu entries only:
Code: Select all
menuentry 'Fluxbox-6.6' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.63-x64v3-xanmod1-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.6.63-x64v3-xanmod1 ...'
linux /boot/vmlinuz-6.6.63-x64v3-xanmod1 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.6.63-x64v3-xanmod1
}
menuentry 'Fluxbox-6.1' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-28-amd64-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.1.0-28-amd64 ...'
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-28-amd64
}
menuentry 'XFCE-6.1' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-6.1.0-28-amd64--471fd16c-b914-4193-8af6-42bc4fed4954' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 471fd16c-b914-4193-8af6-42bc4fed4954
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=471fd16c-b914-4193-8af6-42bc4fed4954 ro quiet splash init=/lib/systemd/systemd
initrd /boot/initrd.img-6.1.0-28-amd64
}
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 8:57 pm
by siamhie
fehlix wrote: Tue Dec 03, 2024 5:07 pm
siamhie wrote: Tue Dec 03, 2024 4:32 pm
Here is the results of
Code: Select all
xclip -selection clipboard -i /boot/grub/custom.cfg
Code: Select all
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="1"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=1024x768
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
insmod gfxmenu
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans-Bold14.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans10.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/DejaVuSans12.pf2
loadfont ($root)/boot/grub/themes/mx_logo_ribbon/ascii.pf2
insmod png
set theme=($root)/boot/grub/themes/mx_logo_ribbon/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=2
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=2
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Fluxbox-6.6' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.63-x64v3-xanmod1-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.6.63-x64v3-xanmod1 ...'
linux /boot/vmlinuz-6.6.63-x64v3-xanmod1 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.6.63-x64v3-xanmod1
}
menuentry 'Fluxbox-6.1' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-28-amd64-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.1.0-28-amd64 ...'
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-28-amd64
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'XFCE-6.1' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-6.1.0-28-amd64--471fd16c-b914-4193-8af6-42bc4fed4954' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 471fd16c-b914-4193-8af6-42bc4fed4954
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=471fd16c-b914-4193-8af6-42bc4fed4954 ro quiet splash init=/lib/systemd/systemd
initrd /boot/initrd.img-6.1.0-28-amd64
}
### END /etc/grub.d/30_os-prober ###
Hmme ... , I guessed it...
Please do not have anything else but only the menu entries within custom.cfg
Here the same reduced to menu entries only:
Code: Select all
menuentry 'Fluxbox-6.6' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.63-x64v3-xanmod1-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.6.63-x64v3-xanmod1 ...'
linux /boot/vmlinuz-6.6.63-x64v3-xanmod1 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.6.63-x64v3-xanmod1
}
menuentry 'Fluxbox-6.1' --class fluxbox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-28-amd64-init-systemd-20cfcd8f-3e81-49d4-a5f4-35784be52c3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 20cfcd8f-3e81-49d4-a5f4-35784be52c3f
echo 'Loading Linux 6.1.0-28-amd64 ...'
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=20cfcd8f-3e81-49d4-a5f4-35784be52c3f ro quiet init=/lib/systemd/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-28-amd64
}
menuentry 'XFCE-6.1' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-6.1.0-28-amd64--471fd16c-b914-4193-8af6-42bc4fed4954' {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 471fd16c-b914-4193-8af6-42bc4fed4954
linux /boot/vmlinuz-6.1.0-28-amd64 root=UUID=471fd16c-b914-4193-8af6-42bc4fed4954 ro quiet splash init=/lib/systemd/systemd
initrd /boot/initrd.img-6.1.0-28-amd64
}
Ah OK. That's how my custom.cfg started when I wrote it and I added the other sections from the grub.cfg file thinking I needed them.
Grub still confuses me compared to the LILO days.
I'll edit the custom.cfg file back to what I originally had it. Do I still run update-grub afterwards?
Re: How do you edit the grub menu by hand?
Posted: Tue Dec 03, 2024 11:17 pm
by asqwerth
No. No update grub needed. EVER. The custom.cfg file is just a list of grub entries. No scripting bits.
I mean, I gave you the whole contents of the custom.cfg for you to copy and paste quite a few posts ago.