Originally Posted by
brkpoint
I'm trying to follow the instructions of
https://help.ubuntu.com/community/Ma...tioned_systems, but it says
DO NOT CLICK SAVE! Click file, save as and save it as 06_custom and not 40_custom.
This way the custom entries will be display at the top which is the goal.
Find where it is saved. If it is saved in /etc/grub.d/ you are good to go.
It's unclear where save as is coming from, is it a grub edit tool? Elsewhere in the wiki only nano is mentioned to edit files and there you don't need to find where the files are saved.
The intention is to edit /etc/grub.d/40_custom and then save it as /etc/grub.d/06_custom so it will show first above all other menu entries.
At one point I made a copy of 40_custom and changed the name to 06_custom.
I always keep an updated 06_custom file in my home directory. I edit it there and move a copy to /etc/grub.d/
This section explains about changing the +3 to +4. It is so the 4th line gets executed instead of the 3rd.
This is 40_custom:
Code:
#!/usr/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
This is my current 06_custom file on Fedora 34 (distro really doesn't matter) booting Arch Linux, Fedora 34, 3 Xubuntu versions and Windows 10:
Code:
#!/bin/sh
echo 1>&2 "Adding Arch Linux, Fedora 34 (Thirty Four), Xubuntu 18.04 LTS Bionic Beaver, Xubuntu 20.04 LTS Focal Fossa, Xubuntu 21.04 Hirsute Hippo and Windows 10"
exec tail -n +4 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Arch Linux' {
search --no-floppy --fs-uuid --set=root 688D-126B
linux /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw loglevel=3 quiet
initrd /intel-ucode.img /initramfs-linux.img
}
menuentry 'Arch Linux (fallback kernel)' {
search --no-floppy --fs-uuid --set=root 688D-126B
linux /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw loglevel=3 quiet
initrd /initramfs-linux-fallback.img
}
menuentry 'Fedora 34 (Thirty Four)' {
search --no-floppy --fs-uuid --set=root db5887a8-9c9f-4c06-9bd5-f4c123ff7839
linux /boot/vmlinuz root=UUID=db5887a8-9c9f-4c06-9bd5-f4c123ff7839 ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 resume=UUID=b564ed75-b9ee-410f-9f87-04afc30a0ff4 rhgb quiet LANG=en_US.UTF-8
initrd /boot/initrd.img
}
menuentry 'Xubuntu 18.04 LTS Bionic Beaver' {
search --no-floppy --fs-uuid --set=root 338e6d3b-cbd4-496d-9cc2-b688a90c17c3
linux /vmlinuz root=UUID=338e6d3b-cbd4-496d-9cc2-b688a90c17c3 ro quiet resume=/dev/disk/by-uuid/b564ed75-b9ee-410f-9f87-04afc30a0ff4 splash
initrd /initrd.img
}
menuentry 'Xubuntu 18.04 LTS Bionic Beaver (recovery mode)' {
search --no-floppy --fs-uuid --set=root 338e6d3b-cbd4-496d-9cc2-b688a90c17c3
linux /vmlinuz root=UUID=338e6d3b-cbd4-496d-9cc2-b688a90c17c3 ro recovery nomodeset
initrd /initrd.img
}
menuentry 'Xubuntu 20.04 LTS Focal Fossa' {
search --no-floppy --fs-uuid --set=root b78c207b-9fc9-4230-b3bc-cee5e8e4e288
linux /boot/vmlinuz root=UUID=b78c207b-9fc9-4230-b3bc-cee5e8e4e288 ro quiet splash
initrd /boot/initrd.img
}
menuentry 'Xubuntu 20.04 LTS Focal Fossa (recovery mode)' {
search --no-floppy --fs-uuid --set=root b78c207b-9fc9-4230-b3bc-cee5e8e4e288
linux /boot/vmlinuz root=UUID=b78c207b-9fc9-4230-b3bc-cee5e8e4e288 ro recovery nomodeset
initrd /boot/initrd.img
}
menuentry 'Xubuntu 21.04 Hirsute Hippo' {
search --no-floppy --fs-uuid --set=root ea44cecd-5fe4-46ba-9914-bcddba6b34d1
linux /boot/vmlinuz root=UUID=ea44cecd-5fe4-46ba-9914-bcddba6b34d1 ro quiet splash
initrd /boot/initrd.img
}
menuentry 'Xubuntu 21.04 Hirsute Hippo (recovery mode)' {
search --no-floppy --fs-uuid --set=root ea44cecd-5fe4-46ba-9914-bcddba6b34d1
linux /boot/vmlinuz root=UUID=ea44cecd-5fe4-46ba-9914-bcddba6b34d1 ro recovery nomodeset
initrd /boot/initrd.img
}
menuentry 'Windows 10' {
set root='hd2,gpt1'
search --no-floppy --fs-uuid --set=root 688D-126B
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
I did find out that this must be in /etc/default/grub on any system or else your custom menu will not show:
Code:
GRUB_TIMEOUT_STYLE=menu
Bookmarks