How do you edit the grub menu by hand?  [Solved]

Message
Author
User avatar
siamhie
Global Moderator
Posts: 3452
Joined: Fri Aug 20, 2021 5:45 pm

Re: How do you edit the grub menu by hand?

#11 Post 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?
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
asqwerth
Developer
Posts: 7969
Joined: Sun May 27, 2007 5:37 am

Re: How do you edit the grub menu by hand?

#12 Post 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.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
siamhie
Global Moderator
Posts: 3452
Joined: Fri Aug 20, 2021 5:45 pm

Re: How do you edit the grub menu by hand?

#13 Post 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)
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
asqwerth
Developer
Posts: 7969
Joined: Sun May 27, 2007 5:37 am

Re: How do you edit the grub menu by hand?

#14 Post by asqwerth »

No update grub needed. Just edit the custom.cfg and reboot. That's it.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: How do you edit the grub menu by hand?

#15 Post 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.

User avatar
siamhie
Global Moderator
Posts: 3452
Joined: Fri Aug 20, 2021 5:45 pm

Re: How do you edit the grub menu by hand?

#16 Post 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 ###

This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
siamhie
Global Moderator
Posts: 3452
Joined: Fri Aug 20, 2021 5:45 pm

Re: How do you edit the grub menu by hand?

#17 Post 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
You do not have the required permissions to view the files attached to this post.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: How do you edit the grub menu by hand?

#18 Post 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
}

User avatar
siamhie
Global Moderator
Posts: 3452
Joined: Fri Aug 20, 2021 5:45 pm

Re: How do you edit the grub menu by hand?

#19 Post 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. :rofl:

I'll edit the custom.cfg file back to what I originally had it. Do I still run update-grub afterwards?
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
asqwerth
Developer
Posts: 7969
Joined: Sun May 27, 2007 5:37 am

Re: How do you edit the grub menu by hand?

#20 Post 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.
Last edited by asqwerth on Tue Dec 03, 2024 11:39 pm, edited 1 time in total.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

Post Reply

Return to “Software / Configuration”