# The Ubuntu Forum Community > Other Discussion and Support > Documentation and Community Wiki Discussions >  How to have a custom Grub2 menu that is maintenance free

## Cavsfan

If you just use Ubuntu or dual boot/multi boot Ubuntu with Debian, Mint, Arch, Fedora, openSUSE, Windows, etc. this will give you all the information to create a custom background, fonts colors and menu that never needs modified.
You can also choose the default OS and the timeout before the default OS is selected. That will never need changing even when a new kernel is installed in any Linux system. 

It has been updated for UEFI/GPT partitioned systems.

The only time you would need to modify anything is if you get bored with the background picture, font colors or if you install/remove/re-install an operating system.

The Wiki evolved from this thread: How to: Create a Customized GRUB2 Screen that is Maintenance Free.

There are several examples of what your screen could look like.

There is a link in the bottom of the Wiki that links back to this thread to post questions, comments, problems, etc.

All Linux systems are pretty much the same as far as customizing grub goes but, Arch is a little different see here for Arch Linux.

Grub has gotten much simpler and you should find that it is easier to customize. The Wiki has been updated with the ability to boot into the backup kernel.

If you choose not to have that ability,  just omit that part and go with 2 entries per system instead of the three in the Wiki.

----------


## dino99

hey you made a good job, clearly explained, thanks.   :Capital Razz:  :Capital Razz: 
thats kind of wiki have a place into "tutorials & tips" subforum.

----------


## Cavsfan

> hey you made a good job, clearly explained, thanks.  
> thats kind of wiki have a place into "tutorials & tips" subforum.


You're welcome. 
Didn't you get the message:
http://ubuntuforums.org/showthread.php?t=2074191

"the forum will be closed completely to posting after a transitional period."  :Razz:

----------


## Cavsfan

Here is my current Grub2 menu on Quantal Quetzal 12.10.
I have 2 Lucid installs, a Precise Pangolin install, a Quantal Quetzal install and Windows 7.
I leave the default on Windows 7 for my wife in case the PC reboots.
Even when new kernels are installed in any Ubuntu, the default still is Windows 7. 
The normal font color is yellow and highlight is white.



Feel free to post your custom grub2 menu if you have used my wiki to make it.  :Smile:

----------


## Cavsfan

I installed 3 more systems - Lucid, Precise and Quantal on separate partitions to keep the grub files generic in case anyone needs a copy of the original file.

I got an upgrade to grub and it gave me some errors. Luckily I had a copy of *05_debian_theme* to fix the error.

I had to edit fstab every time I installed another system as it would pull all of the swap partitions into fstab.
There is a section on editing fstab when installing or reinstalling Ubuntu in the wiki in my signature in section 1.7.

It would be very difficult to maneuver the long menu without customizing it as I have.
Here is what my grub2 screen currently looks like with 7 operating systems:



Here is the output of *sudo blkid*:



```
/dev/sda1: LABEL="C:" UUID="1CFC7A8DFC7A60C6" TYPE="ntfs" 
/dev/sda2: LABEL="Lucid" UUID="a162dc8a-e4df-4b79-b4c3-524761ff7ae1" TYPE="ext4" 
/dev/sda3: UUID="2a80f59e-e7c3-418e-aab2-ab5d19255a2f" TYPE="swap" 
/dev/sda5: LABEL="Precise" UUID="3b8b1954-24e6-4a5e-9074-70a1a94ed4be" TYPE="ext4" 
/dev/sda6: UUID="82c51b29-023f-4964-99b6-67b45a49527f" TYPE="swap" 
/dev/sda7: LABEL="Quantal" UUID="b5fc902c-0bf0-45b3-95a1-29f3c46dfe6a" TYPE="ext4" 
/dev/sda8: UUID="69ac3efc-8a8a-4056-89e0-59bb81c2f468" TYPE="swap" 
/dev/sda9: LABEL="Lucid-Generic" UUID="109c11d0-71e3-41a4-87da-9e81535499a5" TYPE="ext4" 
/dev/sda10: UUID="24aa8c8b-53dc-4ecc-852b-ff2c25c8b342" TYPE="swap" 
/dev/sda11: LABEL="Precise-Generic" UUID="50104efb-d918-45a9-985e-a70c60e87ac0" TYPE="ext4" 
/dev/sda12: UUID="139390a6-2fe1-4ff2-b650-88ae3b0586c1" TYPE="swap" 
/dev/sda13: UUID="580e8c62-78ce-44a2-93e3-ccebd37c3acc" TYPE="ext4" LABEL="Quantal-Generic" 
/dev/sda14: UUID="ec3048b8-c644-435a-93bb-08bb4975d0db" TYPE="swap" 
/dev/sdb1: LABEL="Fantom" UUID="78B8D1A1B8D15DE6" TYPE="ntfs"
```

They are easy to recognize since they have all been labeled as explained in 1.6 of the wiki.

I will try to put the generic grub files on the wiki but, if any one needs a copy of something let me know and I will post the contents of the file here.

----------


## bogan

HI!, *Cavsfan*,

I see your latest Grub menu is still using Grub v1.98-1: I thought grub 2 was 1.99.

With Quantal 12.10 Grub Customizer is a disaster, and I get no recovery options, so I am tempted to try your method; I have studied it with interest in the past, but have not tried it out, as Grub Customer did what I needed.

Will it work with Grub 2 v2.00 ??  which has files very different from previous versions.

Edit:  I use the following to see what my grub menu will look like : will it work with your system ? 

```
grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
```

Currently mine shows like this:  

```
0    ature_menuentry_id}
     1    _id_option=
     2    _id_option=
     3    entry_id_option
     4    Ubuntu  3.5.0-18 Linux 12.1 (on sda10)
     5    Memory test (memtest86+)
     6    Ubuntu Quantal (12.10) (on USB)
     7    Ubuntu 12.04.1 LTS (12.04)
     8    Ubuntu 12.10 (12.10)
     9    Ubuntu 12.04.1 LTS (12.04)
    10    Ubuntu 12.04.1 LTS (12.04)
    11    Windows 7 (loader) (on /dev/sda1)
    12    Ubuntu 3.2.0-33pae (12.04.1) ( on sda5)
```

I have no idea what the first three entries mean, the first [Number 4] and the last, I renamed in grub Customer; entry 6 I( edited in /boot/grub/grub,cfg; whilst entries 7,9, & 10 are spurious duplicates of the sda5 entry, created by update-grub & Grub Customizer

Chao!, *bogan.*

----------


## Cavsfan

> HI!, *Cavsfan*,
> 
> I see your latest Grub menu is still using Grub v1.98-1: I thought grub 2 was 1.99.
> 
> With Quantal 12.10 Grub Customizer is a disaster, and I get no recovery options, so I am tempted to try your method; I have studied it with interest in the past, but have not tried it out, as Grub Customer did what I needed.
> 
> Will it work with Grub 2 v2.00 ??  which has files very different from previous versions.
> 
> Edit:  I use the following to see what my grub menu will look like : will it work with your system ? 
> ...


Hi *bogan*!

Replace that old command with this one:


```
grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f1,2 | nl --starting-line-number=0
```

I got that from *drs305* just in case you thought I was smart enough to come up with it myself!  :Smile: 
Not sure why but, that old one doesn't even work in Lucid any more!
However neither can see what is in the submenus of the default grub menu.
The submenus came with grub 1.99 I believe.

Here is the output of that command on my system and it looks just like the picture:


```
     0    menuentry "Lucid Lynx" {
     1    menuentry "Lucid Lynx (Recovery Mode)" {
     2    menuentry "Lucid Lynx Generic" {
     3    menuentry "Lucid Lynx Generic (Recovery Mode)" {
     4    menuentry "Precise Pangolin 12.04" {
     5    menuentry "Precise Pangolin 12.04 (Recovery Mode)" {
     6    menuentry "Precise Pangolin Generic 12.04" {
     7    menuentry "Precise Pangolin 12.04 Generic (Recovery Mode)" {
     8    menuentry "Quantal Quetzel 12.10" {
     9    menuentry "Quantal Quetzel 12.10 (Recovery Mode)" {
    10    menuentry "Quantal Quetzel Generic 12.10" {
    11    menuentry "Quantal Quetzel 12.10 Generic (Recovery Mode)" {
    12    menuentry "Windows 7" {
```

That picture is on Lucid and it uses grub 1.98, I believe Maverick Meerkat and anything after that and before Quantal uses grub 1.99.
Quantal uses grub 2.00.

The wiki is broken down into Lucid at the top (1.3 in the table of contents) and Maverick and later towards the bottom (1.4).
There are just a couple of differences between 1.99 and 2.00 in 05_debian_theme.
Pretty much everything else is the same.
Grub 1.99 gives an erroneous error when selecting windows but, still goes into windows.
Grub 2.00 does not give any error when selecting windows which is why I am glad Precise is getting grub 2.0 in January. At least that is what I heard.

The wiki is a lot more straight forward than that How to. It became pretty convoluted and it was closed for editing. The Forum's policy is How Tos should be in wiki format.

So, be sure and use the wiki on the first post of this thread or in my signature (green links).
Let me know what you think and if you use it post your grub menu when you are done.  :Smile: 

Thanks for the post!  :Very Happy:

----------


## Cavsfan

Here is my current grub2 menu customized on Precise grub 1.99:



The normal font color is yellow and the highlight font color is white.

----------


## Cavsfan

Here is my current grub2 menu customized on Quantal grub 2.00:



The normal font color is cyan and the highlight font color is light-red.

----------


## bogan

Hi!, *Cavsfan*,

Thanks for your response, Post #7, for some reason my subscription advisory did not pick it up.

In Quantal with grub 2.00 and Grub Customizer 3,  the 'old command' showed exactly what was displayed on the screen, apart from the first three odd extra bits.

Weirdly, the 'new command', you suggested, shows not  only what is displayed, but in addition, it shows the entries complete with part of the script for each:

```
alan@alan-MS-7616:~$ grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f1,2 | nl --starting-line-number=0
     0    menuentry "Ubuntu  3.5.0-18 Linux 12.1 (on sda10)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b5aab3a2-0086-4a12-9276-46bb5a615038
     1    menuentry "Memory test (memtest86+)" {
     2    menuentry "Ubuntu 12.10 (12.10)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-cee38717-6980-4485-a047-124edb4d5a23
     3    menuentry "Ubuntu Quantel (12.10) on USB" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-7608b1e5-b5ea-4563-ad94-8cf496b9f95f
     4    menuentry "Ubuntu 3.5.0-18 (12.10) on sdb7 External" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-7608b1e5-b5ea-4563-ad94-8cf496b9f95f
     5    menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os $menuentry_id_option 'osprober-chain-CC9240F39240E394
     6    menuentry "Ubuntu 3.2.0-33pae (12.04.1) ( on sda5)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-a8ecbe4f-fc2d-40a1-b261-1b62d74e7130
alan@alan-MS-7616:~$
```

Line 2 is actually the entry for the USB OS and line 3, labelled 'USB', is actually a duplicate of the sda5 entry line6, which is very confusing.

I have had this problem of duplicate entries for some time and Posted about it but got no response; Grub customizer adds them on Saving the configuration.

As far as I can see, to use your system, I would need to start with virgin installations of all the OSs, none of them having run Grub Customizer, as the duplicates get copied from one OS to another by update-grub.

Chao!, *bogan.*

----------


## Cavsfan

> I wanted a unique entry in UEFI  and boot menu description.
> And the install of grub created both.
> But grub is somewhere hard coded to only use /EFI/ubuntu/grub.cfg in the ESP to find the full install. Or it does not work.
> There now is a grub.cfg in my /EFI/bionic_18_04 folder, but it is not used. Before it did not even have a grub.cfg.
> 
> So I did another grub install just to see if using the ubuntu description would work, and it did. More because you asked if grub-install worked.
> But I normally just manually edit /EFI/ubuntu/grub.cfg to have correct UUID & drive/partition of my default boot.


Ok, thanks for the explanation.

----------


## oldfred

Whose grub2 are you using to boot.

I wanted to understand some of the differences with grub2, Ubuntu's grub2 and others.
I installed Fedora to a partition on sdb, and it actually let me install to sdb's ESP, combo box on partitioning table actually worked.  But it has notes on updating that if you do not do it correctly, it will end up using a grub2 default of grub in UEFI not Fedora. So they hard code something also to be Fedora.

Ubuntu's grub hard codes the entry in source code  to efi_distributor = "ubuntu" in lots of places in the code. 
Others have efi_distributor = bootloader_id or my change in /etc/default/grub of bootload_id would work in some versions of grub2 and did mostly work in Ubuntu except the use of grub.cfg. Some seem to embed the grub.cfg into grubx64.efi, so then you cannot change it, except with full grub update.

----------


## Cavsfan

> Whose grub2 are you using to boot.
> 
> I wanted to understand some of the differences with grub2, Ubuntu's grub2 and others.
> I installed Fedora to a partition on sdb, and it actually let me install to sdb's ESP, combo box on partitioning table actually worked.  But it has notes on updating that if you do not do it correctly, it will end up using a grub2 default of grub in UEFI not Fedora. So they hard code something also to be Fedora.
> 
> Ubuntu's grub hard codes the entry in source code  to efi_distributor = "ubuntu" in lots of places in the code. 
> Others have efi_distributor = bootloader_id or my change in /etc/default/grub of bootload_id would work in some versions of grub2 and did mostly work in Ubuntu except the use of grub.cfg. Some seem to embed the grub.cfg into grubx64.efi, so then you cannot change it, except with full grub update.


i'm using Arch Linux's grub since it puts the two img files in the intrd line:


```
initrd    /intel-ucode.img /initramfs-linux.img
```

Ubuntu only puts the first one for some reason and I cannot boot into the normal kernel without using the fallback img.


```
initrd    /intel-ucode.img
```

----------


## 1fallen

> i'm using Arch Linux's grub since it puts the two img files in the intrd line:
> 
> 
> ```
> initrd    /intel-ucode.img /initramfs-linux.img
> ```
> 
> Ubuntu only puts the first one for some reason and I cannot boot into the normal kernel without using the fallback img.
> 
> ...


+1 Nice Cavsfan
@oldfred I know this was asked of Cavsfan, but if I use Grub I let Arch handle all bootable partitions:


```
pacman -Ss grub
core/grub 2:2.02-5 [installed]
    GNU GRand Unified Bootloader (2)
```

So my "Default Grub" reads like this:


```
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR='Arch'
GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=b007b23d-e1b5-40de-a8fb-dc2d89f83347 ipv6.disable=1"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND="/home/me/Pictures/bluedandelion.jpg"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires to
# set 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"
```

I will have to add that if I use Fedora I will not let it install grub, far too many issues crop up over time with multi boots.


```
inxi -xxx -D
Drives:
  HDD Total Size: 1.82 TiB used: 38.85 GiB (2.1%) 
  ID-1: /dev/sda vendor: Western Digital model: WD1001FALS-00J7B0 
  size: 931.51 GiB serial: WD-WMATV0362316 rev: 0K05 scheme: GPT 
  ID-2: /dev/sdb vendor: Western Digital model: WD5000AAKS-00V1A0 
  size: 465.76 GiB serial: WD-WCAWF0858813 rev: 1D05 scheme: MBR 
  ID-3: /dev/sdc type: USB vendor: Western Digital model: WD5000BPVT-00HXZT1 
  size: 465.76 GiB serial: WD-WXR1EB0PMV14 scheme: MBR
```

----------


## Cavsfan

Nice 1fallen.  I just installed Cosmic Cuttlefish 18.10 UEFI.  I didn't know that was already named and ISOs available. Clearly wasn't paying attention.  :Capital Razz: 

I've got little hope for adding SSDs and UEFI to the wiki at this point. If I cannot get a single custom boot entry to work, I can imagine the trouble people would have.
Hopefully it will get better with time.

BTW, I just added a Ubuntu bug about grub not putting the Arch Linux boot line correctly. It is on UEFI systems only.

​https://bugs.launchpad.net/ubuntu/+s...r/+bug/1772314

If you are affected feel free to add your name.

----------


## 1fallen

I'll add me too! (And Done added me.)
But as a workaround for myself I just let Arch's grub handle it. (For now anyway  :Smile: )

----------


## Cavsfan

> I'll add me too! (And Done added me.)
> But as a workaround for myself I just let Arch's grub handle it. (For now anyway )


+1
I do the same.

----------


## Cavsfan

> I'll add me too! (And Done added me.)
> But as a workaround for myself I just let Arch's grub handle it. (For now anyway )


I see only 1 person on that bug - me. Could you look at that bug again?

https://bugs.launchpad.net/ubuntu/+s...r/+bug/1772314

----------


## 1fallen

Did you refresh your browser?
You posted 7 hours ago maybe you now see it.  :Smile:

----------


## Cavsfan

> Did you refresh your browser?
> You posted 7 hours ago maybe you now see it.


All I seen at the top that this bug affects 1 person. I do see it now though.  :Smile: 

I also added it to the Arch and derivatives thread hoping it will get attention there. 

https://ubuntuforums.org/showthread.php?t=2392441

It's strange because it is a Ubuntu grub bug yet it only affects people with Arch Linux dual booting.

Thanks mate!

----------


## Dennis N

You may be able to just copy Arch menuentry from the Arch grub.cfg and use that in your Ubuntu custom menus.

I use Manjaro, and have done that to get Ubuntu to boot Manjaro. Otherwise, Ubuntu grub creates the same error when generating the Manjaro grub menu entry.

Manjaro is a distro based on Arch linux.

----------


## 1fallen

> You may be able to just copy Arch menuentry from the Arch grub.cfg and use that in your Ubuntu custom menus.
> 
> I use Manjaro, and have done that to get Ubuntu to boot Manjaro. Otherwise, Ubuntu grub creates the same error when generating the Manjaro grub menu entry.
> 
> Manjaro is a distro based on Arch linux.


+1 This also works.

----------


## Cavsfan

> You may be able to just copy Arch menuentry from the Arch grub.cfg and use that in your Ubuntu custom menus.
> 
> I use Manjaro, and have done that to get Ubuntu to boot Manjaro. Otherwise, Ubuntu grub creates the same error when generating the Manjaro grub menu entry.
> 
> Manjaro is a distro based on Arch linux.


I had an idea that Manjaro did the same. Thanks for confirming that.

I just do not like editing the grub.cfg file for any reason. If my grub is on Ubuntu I'll use the falllback kernel.
But, I do like having it on Arch as I can use the normal kernel.

Grub updated on Xenial Xerus 16.04 this morning and I thought It might fix another problem I'm having with it but, it did not.
So, my grub will go back to Arch for the time being.

But, this bug needs to be fixed and the more people that sign on to it, the better.

----------


## Dennis N

> I just do not like editing the grub.cfg file for any reason.


I didn't edit any grub.cfg when I did this, only copied the menu entry for Manjaro from the Manjaro /boot/grub/grub.cfg, pasted the copied entry into the template 40_custom  file, then saved it in Ubuntu's /etc/grub.d. I created a new file, but you could add to an existing custom menu file. (You can have any number of custom menu files in /etc/grub.d. No matter - they all get merged into a single grub.cfg when you or the OS executes the update-grub command or its equivalent).

----------


## Cavsfan

> _I just do not like editing the grub.cfg file for any reason._





> I didn't edit any grub.cfg when I did this, only copied the menu entry for Manjaro from the Manjaro /boot/grub/grub.cfg, pasted the copied entry into the template 40_custom  file, then saved it in Ubuntu's /etc/grub.d. I created a new file, but you could add to an existing custom menu file. (You can have any number of custom menu files in /etc/grub.d. No matter - they all get merged into a single grub.cfg when you or the OS executes the update-grub command or its equivalent).


Oh, thanks for the clarification. In my Wiki I say to edit the /etc/grubd/40_custom file but, then save it as /etc/grub.d/06_custom so that it appears on top. (Ranch hand's original idea)
Then when you're sure all of the custom entries work you make 10_linux,  20_memtest86+ and 30_os-prober unexecutable so they no longer appear.

Just so you get some output on an update-grub execution, you do change the part it says not to change so you can add an echo line: (Drs305's original idea)


```
#!/bin/sh
echo 1>&2 "Adding system 1, system 2, etc."
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.
```

The +3 you change to +4 so that the 4th line is where execution starts (menuentry).

With Legacy/MBR partitioned systems, that works flawlessly but, so far on UEFI/GPT partitioned systems not so much...

D'oh! Now I see where you said you added it to your custom entry.

----------


## Cavsfan

@oldfred, I have an entire UEFI system and I wanted to have one grub in control of my system because grub keeps jumping around after an update.
So I tried the 1.8 section of the Wiki for efi:


```
sudo dpkg-reconfigure grub-efi-amd64
```

But, it did not ask me where to install grub at and just ended up installing grub to that partition, which is not the desired outcome.

On my old Legacy/MBR system,


```
sudo dpkg-reconfigure grub-pc
```

did allow me to move the asterisk from the disk to the partition to not have to worry about that grub installing or updating. 

The efi command does not do that and I do not understand why. Any tips?

----------


## oldfred

With UEFI & gpt, only the ESP has asterisk which parted/gparted use to indicate the ESP.
Other tools like gdisk use different codes to indicate ESP. But with gpt only an ESP can or should have asterisk. Some have multiple FAT32 partitions and switch which is ESP by moving boot flag. But normally you only have one ESP per drive. I put an ESP on every drive, including larger flash drives.

Somewhere in the UEFI version of Ubuntu's grub, it is set to only install to the first ESP, not always sda (but usually), as it seems to work with NVMe drives when they are first.

I installed Fedora, just to see the difference in grub. And it did install to sdb, when I specified that ESP, so grub is configured correctly, it is some change Ubuntu makes to grub. 

Ubuntu's grub also is hard coded to find the UEFI grub in /EFI/ubuntu/grub.cfg. They were updating grub with 18.10 and it installed to /EFI/grub which is standard grub2. But Ubuntu still booted using my old grub.cfg in /EFI/ubuntu, not the updated one with 18.10's UUID in /EFI/grub.
       Ubuntu 18.04 similar error /EFI/grub
https://bugs.launchpad.net/ubuntu/+s...y/+bug/1781042
Ubuntu 18.10 Cosmic installed /EFI/grub
https://bugs.launchpad.net/ubuntu/+s...2/+bug/1775743

I always used (hd0,3) or (hd1,gpt4) type to find root partitions with grub. But always had issues when plugging in flash drives. 
So I now am starting to use labels.

Some good examples here:
https://forum.manjaro.org/t/creating...tloader/3150/4



```
menuentry "Cosmic 18.10 on USB ssd test" {
    search --label --no-floppy --set=root cosmicSSD --hint hd2,gpt4
    configfile /boot/grub/grub.cfg
}
```

----------


## Dennis N

> grub keeps jumping around after an update.


In the case of updates to grub, one solution is to only allow updating the grub packages on the controlling OS. That works for UEFI or BIOS. Mark the grub packages as 'hold' (or whatever term applies) on the other OSes.

Other Comments:

For Ubuntu 18.04 to always be the controlling OS, I copied it's grub files to another EFI system partition so that they won't be overwritten later by other Ubiquity installs. I had to regenerate the UEFI boot menu entry because of this with an efibootmgr command - but that's a one time thing. And you would also have to use efibootmgr to fix the boot order after installing any new OS, but that is even easier.

On UEFI, I think grub boot files for an OS will only be installed on an EFI system partition which must be FAT, not EXT4 so you can't install grub to the OS partition as we used to do in BIOS. UEFI firmware is only required to read FAT partitions.

----------


## Cavsfan

> With UEFI & gpt, only the ESP has asterisk which parted/gparted use to indicate the ESP.
> Other tools like gdisk use different codes to indicate ESP. But with gpt only an ESP can or should have asterisk. Some have multiple FAT32 partitions and switch which is ESP by moving boot flag. But normally you only have one ESP per drive. I put an ESP on every drive, including larger flash drives.
> 
> Somewhere in the UEFI version of Ubuntu's grub, it is set to only install to the first ESP, not always sda (but usually), as it seems to work with NVMe drives when they are first.
> 
> I installed Fedora, just to see the difference in grub. And it did install to sdb, when I specified that ESP, so grub is configured correctly, it is some change Ubuntu makes to grub. 
> 
> Ubuntu's grub also is hard coded to find the UEFI grub in /EFI/ubuntu/grub.cfg. They were updating grub with 18.10 and it installed to /EFI/grub which is standard grub2. But Ubuntu still booted using my old grub.cfg in /EFI/ubuntu, not the updated one with 18.10's UUID in /EFI/grub.
>        Ubuntu 18.04 similar error /EFI/grub
> ...


Thanks for the reply! I'm just thankful that I can get to other grubs to boot into via BIOS. My *Arch_grub* option is always there.
Here is what my /boot/efi/EFI/ folder looks like:
Screenshot_2018-07-14_17-20-49.png

But, much of the time when I try to re-install the grub on Arch, it gives an error something about there is no more room. 
Default was 128KB but I was able to get a 550KB partition and only about 43KB is being used, so if I boot into TTY2 I can install grub without any error.

Also, the folders have folders within them there appear to be the same files. Sometimes in BIOS it will show Arch_grub and another Arch-grub. Not sure what the other one is probably a duplicate.
Sometimes after a grub update on one of the Ubuntu systems, it will boot to a blue screen saying windows has a problem, etc. I think the Windows boot took over when I see that.
But, like I say, I can always get to a bootable grub via BIOS thankfully. 

Even on every other Linux system besides Arch (Xubuntu and openSUSE Tumbleweed) where it fails to add the */initramfs-linux.img* element to the *initrd* line.
I have to press 'e' and and add it to get to Arch or else use the fallback kernel. Then re-install grub there.

----------


## Cavsfan

> _grub keeps jumping around after an update._
> 
> 
> In the case of updates to grub, one solution is to only allow updating the grub packages on the controlling OS. That works for UEFI or BIOS. Mark the grub packages as 'hold' (or whatever term applies) on the other OSes.
> 
> Other Comments:
> 
> For Ubuntu 18.04 to always be the controlling OS, I copied it's grub files to another EFI system partition so that they won't be overwritten later by other Ubiquity installs. I had to regenerate the UEFI boot menu entry because of this with an efibootmgr command - but that's a one time thing. And you would also have to use efibootmgr to fix the boot order after installing any new OS, but that is even easier.
> 
> On UEFI, I think grub boot files for an OS will only be installed on an EFI system partition which must be FAT, not EXT4 so you can't install grub to the OS partition as we used to do in BIOS. UEFI firmware is only required to read FAT partitions.


Thanks for the post! I guess you are absolutely right about UEFI boot, there is no longer an ext4 partition or disk that grub is installed to but, a partition that is vfat instead. 
So, that explains that! I wasn't thinking about that part. 

Oh, Fred I forgot to mention that I will try that custom entry again when I get a chance.

----------


## Cavsfan

Right now, I just have a wallpaper added, custom font colors, a default boot menuentry and a longer timeout.
With the way they have added the submenu, after the default menuentry, containing the extra boot entries for a system, that default remains pretty consistent.

----------


## Cavsfan

Woo Hoo! I am beginning to see how EFI systems can be customized. I just booted into Arch Linux from a custom entry.

Let's see how these other systems work and I'll have more to say.  :Wink:

----------


## Cavsfan

OK, I successfully booted into Arch Linux, Arch Linux's Fallback kernel, Windows 10, openSUSE Tumbleweed and Bionic Beaver 18.04.1 LTS and all went well.
This is from within Arch Linux though but, the differences should not be much. Just perhaps different on some Linux distributions.
Arch Linux uses the UUID of the EFI system partition as well as the UUID of the Arch partition, for reasons unbeknownst to me.

Here is the custom file I used. I will explain what I did before it's added to the Wiki as I need input from you all to make sure it works first.
Of course I cheat and change that +3 to a +4 so that we can at least see what is between the quotes when doing an update-grub, that and the picture should be the only things you see (a tip Drs305 taught me).


```
#!/bin/sh
echo 1>&2 "Adding Arch Linux, Windows 10, openSUSE Tumbleweed and Xubuntu Bionic Beaver 18.04 LTS"
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' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    linux    /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
    initrd    /intel-ucode.img /initramfs-linux.img
}
menuentry 'Arch Linux (fallback kernel)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    linux    /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
    initrd    /initramfs-linux-fallback.img
}
menuentry 'Windows 10' --class windows --class os $menuentry_id_option 'osprober-efi-688D-126B' {
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry 'openSUSE Tumbleweed' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-274e3321-d7af-4544-9afa-b1b3c118c325' {
    insmod part_gpt
    insmod ext2
    set root='hd2,gpt7'
    search --no-floppy --fs-uuid --set=root 274e3321-d7af-4544-9afa-b1b3c118c325
    linux /boot/vmlinuz root=/dev/sdc7 splash=silent resume=/dev/disk/by-uuid/be437b2b-9c95-4590-8d32-4da8e6c90318 quiet
    initrd /boot/initrd
}
menuentry 'Ubuntu 18.04.1 LTS' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-899f7460-1d2a-43ab-b98e-5e33953cb0c4' {
    insmod part_gpt
    insmod ext2
    set root='hd2,gpt8'
    search --no-floppy --fs-uuid --set=root 899f7460-1d2a-43ab-b98e-5e33953cb0c4
    linux /vmlinuz root=UUID=899f7460-1d2a-43ab-b98e-5e33953cb0c4 ro quiet splash $vt_handoff
    initrd /initrd.img
}
```

This is my system:


```
[cavsfan@ArchLinux ~]$ sudo blkid |grep sdc
[sudo] password for cavsfan: 
/dev/sdc1: UUID="688D-126B" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="3c1b6d6f-8a24-43da-b595-8c304ceee48d"
/dev/sdc3: UUID="C4968A52968A44C0" TYPE="ntfs" PARTLABEL="Windows_10" PARTUUID="345c85f4-bce7-4bc7-bbe0-db03eb319cad"
/dev/sdc4: UUID="701AE4631AE427B4" TYPE="ntfs" PARTUUID="1e337754-b45d-45a5-a971-b8cdcae8a002"
/dev/sdc5: UUID="be437b2b-9c95-4590-8d32-4da8e6c90318" TYPE="swap" PARTLABEL="Basic data partition" PARTUUID="3a259867-656d-41ed-9931-cf15a3bd0148"
/dev/sdc6: LABEL="ArchLinux" UUID="bbca28b2-503e-4dc8-9850-c54bd0492da8" TYPE="ext4" PARTLABEL="Arch_Linux" PARTUUID="5312b771-0835-4957-80a6-9a8a7107f24a"
/dev/sdc7: LABEL="opensuse" UUID="274e3321-d7af-4544-9afa-b1b3c118c325" TYPE="ext4" PARTUUID="25d7851a-f45f-4d60-955a-4a31706f8452"
/dev/sdc8: LABEL="Bionic" UUID="899f7460-1d2a-43ab-b98e-5e33953cb0c4" TYPE="ext4" PARTLABEL="Bionic_Beaver" PARTUUID="c4e0fdc9-7eac-4661-a7c6-c5a00c9a46fc"
/dev/sdc10: LABEL="Media" UUID="840ac879-510a-4b8d-be01-9d3a5f37dbb2" TYPE="ext4" PARTLABEL="Media" PARTUUID="61e2e7f9-1a98-44f7-881e-ae85fceaf994"
/dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="49992d5b-79cd-4934-a12f-11782bb345bd"
```

So, this should boot an Ubuntu system, just the partitions and UUID needs changed to match your system.


```
#!/bin/sh
echo 1>&2 "Adding Xubuntu Bionic Beaver 18.04.1 LTS"
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 'Ubuntu 18.04.1 LTS' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-899f7460-1d2a-43ab-b98e-5e33953cb0c4' {
    insmod part_gpt
    insmod ext2
    set root='hd2,gpt8'
    search --no-floppy --fs-uuid --set=root 899f7460-1d2a-43ab-b98e-5e33953cb0c4
    linux /vmlinuz root=UUID=899f7460-1d2a-43ab-b98e-5e33953cb0c4 ro quiet splash $vt_handoff
    initrd /initrd.img
}
```

Right now I see no way to boot Ubuntu to a backup kernel because there is only a /vmlinuz file and no /vmlinuz.old file. Which may be because I haven't had enough kernels get installed yet.

So, this is a tad more complicated than the Legacy/MBR partitioned systems were but, at least you do not have to go to the OS where your grub is installed and update the grub there when a kernel is added to a different system.
Because the default grub has the /vmlinuz and /initrd tied to a kernel number.

A lot if not all of each entry can be copied from the existing /boot/grub/grub.cfg file and then modified, which makes it MUCH easier.

----------


## Cavsfan

First picture of a customized EFI Grub menu. I just took a picture of the menu, which is sort of small but, could not make out the highlighted color of red taking the whole screen.



All of them work so I made */etc/grub.d/10_linux* and */etc/grub.d/30_os-prober* unexecutable.

----------


## oldfred

I use a configfile to boot the grub of my other Ubuntu installs.
And I now like labels over UUID, but you have to manage labels. When I re-install cosmic and reformat partition, it needs label updated.
You can then have two entries, one to directly boot kernel, and one to configfile to that installs grub with all its entries. I only have used configile to other grub so far.



```
menuentry "Cosmic 18.10 on sdb12" {
    configfile (hd2,gpt12)/boot/grub/grub.cfg
}

menuentry "Cosmic 18.10 on sdb12 test" {
    search --set=root --label cosmic_b --hint hd2,gpt12
    configfile /boot/grub/grub.cfg
}

menuentry 'Live ISOs on SSD' {
search --set=root --label iso_ssd --hint hd1,gpt5
configfile /livecdimage.cfg
} 

menuentry 'Live ISOs on HDD (boot on SSD)' {
configfile (hd1,6)/livecdimage.cfg
}
```

----------


## Cavsfan

> I use a configfile to boot the grub of my other Ubuntu installs.
> And I now like labels over UUID, but you have to manage labels. When I re-install cosmic and reformat partition, it needs label updated.
> You can then have two entries, one to directly boot kernel, and one to configfile to that installs grub with all its entries. I only have used configile to other grub so far.
> 
> 
> 
> ```
> menuentry "Cosmic 18.10 on sdb12" {
>     configfile (hd2,gpt12)/boot/grub/grub.cfg
> ...


+1 
I never would have guessed you could do that with a config file!

----------


## Cavsfan

OK, for EFI, I copied the exact code from above into Xubuntu 18.04 and successfully booted into each operating system so I know that it works on Ubuntu.

Guess I'll add it to the Wiki when I can.

Basically everything is the same in */etc/default/grub* you just change 2 entries. Also the same in */etc/grub.d/05_debian_theme*, the 3 menu colors go after line 122.

It's just the menu entries in */etc/grub.d/06_custom* that have drastically changed.

One cannot no longer prevent grub from moving from one system to another if grub is updated and installed on that other system.

It's also best to back up the EFI grub immediately after installing a Ubuntu system if you plan on installing another one.

I have Arch Linux, Windows 10, openSUSE Tumbleweed and Xubuntu 18.04 LTS installed currently and this is what I mean:


```
cavsfan@cavsfan-Bionic-Beaver:~$ sudo su
[sudo] password for cavsfan:
root@cavsfan-Bionic-Beaver:/home/cavsfan# cd /boot/efi/EFI
root@cavsfan-Bionic-Beaver:/boot/efi/EFI# ls
Arch_grub  bionic  Boot  Microsoft  opensuse  ubuntu
```

The blue is just meant to denote folders. I copied ubuntu to bionic to back it up.

The grub install command has also changed drastically for EFI as you may as well already know.


```
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi/EFI/ubuntu --bootloader-id=ubuntu  --recheck
```

I am not sure if every system is the same, you just have to look for this root owned/read only ubuntu folder to re-install grub back on Ubuntu.

----------


## Cavsfan

Since no feedback, I guess I am not going to add EFI booting to the Wiki at this time. Everything you need though is in post #534.

It contains the contents of */etc/grub.d/06_custom* for booting to Ubuntu, Arch Linux, openSUSE and Windows 10.

It has worked for me very, very well for quite a while now.

----------


## Cavsfan

Well, after some time and thought, I think I'll add the menuentries for an UEFI (Unified Extensible Firmware Interface) system (SSD) to the Wiki. 

I've learned there are several ways that one _could_ customize the UEFI grub but, the only sure fire way I have been able to do it is with UUIDs.

Everything else is the same: the fonts, background picture. Just the menuentries and the way you install grub is different.
Just like the Legacy/MBR partitioned custom grub, this does not ever require any changes except for the same reasons the Non-UEFI systems would.

I've learned how to customize UEFI grub for Ubuntu, Arch Linux, Fedora and openSUSE. I will only include Ubuntu and Windows 10 in the Wiki though. 
If anyone would be interested in any of the others, just ask and I will happily provide that too.

I do not know how long it will take me but, it will be done.

----------


## Cavsfan

Ok, I figured out what was necessary and what was superfluous in the previous posts I have made about a custom UEFI grub.

I updated the Wiki, only the menuentries and way to install grub has changed on Ubuntu. I have been installing and experiencing many different Linux systems.

I would customize each one and there are various differences from system to system.

I currently have Arch Linux, Fedora 29, openSUSE Tumbleweed, MX Linux 18.1 Continuum, Xubuntu 18.04 LTS and Windows 10.

If anyone is interested in more information about anything whatsoever, post it here.

For example here is how easy one boot entry is for Xubuntu Bionic Beaver 18.04 LTS linking UUIDs:


```
/dev/sdc4: UUID="bbc771f8-ba61-4e50-aeca-d2754b112aee" TYPE="swap" PARTLABEL="swap" PARTUUID="dc354366-1300-48d4-8a60-133aa2e2ca57"
/dev/sdc9: LABEL="Bionic" UUID="833501fb-4f83-4d51-9903-685d56cb6891" TYPE="ext4" PARTLABEL="Bionic" PARTUUID="4f579967-b025-47dc-b080-64a0865d7165"
```



```
menuentry '18.04 LTS (Bionic Beaver) LTS' {
    search --no-floppy --fs-uuid --set=root 833501fb-4f83-4d51-9903-685d56cb6891
    linux /vmlinuz root=UUID=833501fb-4f83-4d51-9903-685d56cb6891 ro quiet resume=/dev/disk/by-uuid/bbc771f8-ba61-4e50-aeca-d2754b112aee splash
    initrd /initrd.img
}
```

Also, let me know if I have made any mistakes.

----------


## Cavsfan

In Fedora and MX Linux, it does not create symlinks for the *vmlinuz* and *initrd* like most Linux systems.

But, I created a script that will create them after the kernel is installed. If anyone wants to know how it works, I gots it.  :Capital Razz:

----------


## Cavsfan

I have 4 drives in this computer.


dev/sda - TOSHIBA 2TB HDDdev/sdb - TOSHIBA 2TB HDDdev/sdc - WD Blue 1TB SSDdev/sdd - OCZ Vertex 480GB SSD

The 2nd TOSHIBA apparently is bad because it prevented it from booting when connected. 
So, I disconnected it and sdc became sdb but, my custom grub didn't skip a beat because it is tied to UUIDs and not drives.

I believe if I were using default grub, it would have needed some adjustments. Another reason to use a custom grub.  :Very Happy:

----------


## Cavsfan

Anyone multi-booting with Fedora 30, I finally figured out how to produce the kernel symlinks with this script: (the one I was using in Fedora 28,29 didn't work in 30)


```
#!/bin/bash
#

# We're passed the kernel version being installed
KERNEL_VERSION="$1"

ln -s -f "initramfs-"${1}".img" /boot/initrd.img

ln -s -f "vmlinuz-"${1} /boot/vmlinuz

echo "   SUCCESS: symlink initrd.img created for "initramfs-"${1}".img"" >&2
echo "   SUCCESS: symlink vmlinuz created for "vmlinuz-"${1}" >&2

exit 0
```

Save it as 52-symlink-kernel and if it's in your home directory, you would first make it executable *sudo chmod +x 52-symlink-kernel*
Then to install it you would use this command: 


```
sudo install 52-symlink-kernel /etc/kernel/postinst.d/52-symlink-kernel
```

Then in the terminal output of a new kernel installation you will see the SUCCESS lines. You can check in /boot with *ls -lA* and verify that they are symlinked correctly.

Cheers  :Wink:

----------


## Cavsfan

Custom grub on Fedora 31. No background, colors or fonts; just a custom menu:



The script above that works in 30 also works in 31 to create the kernel symlinks.

----------


## malspa

From the linked page:




> Although it says not to, you will need to change
> exec tail -n +3 $0 to
> exec tail -n +4 $0


Why?

----------


## malspa

Oh, and thanks very much for all the work on that "MaintenanceFreeCustomGrub2Screen" page, and this thread -- it's all been a big help to me. I've done lots of maintenance-free grub setups in the past, dual-booting or multi-booting. I used these valuable resources most recently to set up a maintenance-free grub for dual-booting two Debian Buster systems.

----------


## Cavsfan

> From the linked page:
> 
> 
> 
> 
> 
> _Although it says not to, you will need to change_
> _exec tail -n +3 $0 to_
> _exec tail -n +4 $0_
> ...


*(1)#!/bin/sh
(2)echo 1>&2 "Adding Bionic Beaver 18.04 LTS, Ubuntu Version name nn.nn and Windows 10"
(3)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.*

The reason to change it to 4 is so it starts execution on the 4th line, the *menuentry* line *if* you add the echo line to get some output when you enter update-grub.

If you do not include the echo line, the first menuentry line is the the 3rd line and you would leave it *+3*.




> Oh, and thanks very much for all the work on that "MaintenanceFreeCustomGrub2Screen" page, and this thread -- it's all been a big help to me. I've done lots of maintenance-free grub setups in the past, dual-booting or multi-booting. I used these valuable resources most recently to set up a maintenance-free grub for dual-booting two Debian Buster systems.


Thank you for the kind words!

----------


## Cavsfan

> From the linked page:
> 
> 
> 
> 
> 
> _Although it says not to, you will need to change_
> _exec tail -n +3 $0 to_
> _exec tail -n +4 $0_
> ...


This is my current *06_custom* file - (*/etc/grub.d/06_custom*):


```
#!/bin/sh
echo 1>&2 "Adding Arch Linux (rolling), Debian Buster, Debian Testing, Fedora 30 (Thirty), Fedora 31 (Thirty One), openSUSE Tumbleweed (rolling), MX Linux 18.3 Continuum, MX Linux 19 (Antix kernel) Patito Feo, MX Linux 19 Patito Feo, Xubuntu 18.04.3 Bionic Beaver LTS 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 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 quiet
    initrd /initramfs-linux-fallback.img
}
menuentry 'Debian Buster' {
    search --no-floppy --fs-uuid --set=root dbbd22d7-0110-47d4-932b-2f19c83bcbca
    linux  /vmlinuz root=UUID=dbbd22d7-0110-47d4-932b-2f19c83bcbca ro quiet
    initrd /initrd.img
}
menuentry 'Debian Buster (recovery mode)' {
    search --no-floppy --fs-uuid --set=root dbbd22d7-0110-47d4-932b-2f19c83bcbca
    linux  /vmlinuz root=UUID=dbbd22d7-0110-47d4-932b-2f19c83bcbca ro recovery nomodeset
    initrd /initrd.img
}
menuentry 'Debian Testing' {
    search --no-floppy --fs-uuid --set=root 1b019591-4bf0-4781-bf86-fdc044ef8ae7
    linux  /vmlinuz root=UUID=1b019591-4bf0-4781-bf86-fdc044ef8ae7 ro quiet
    initrd /initrd.img
}
menuentry 'Debian Testing (recovery mode)' {
    search --no-floppy --fs-uuid --set=root 1b019591-4bf0-4781-bf86-fdc044ef8ae7
    linux  /vmlinuz root=UUID=1b019591-4bf0-4781-bf86-fdc044ef8ae7 ro recovery nomodeset
    initrd /initrd.img
}
menuentry 'Fedora 30 (Thirty)' {
    search --no-floppy --fs-uuid --set=root 43cd93b8-2442-42df-88a3-7bf069390d49
    linux  /boot/vmlinuz root=UUID=43cd93b8-2442-42df-88a3-7bf069390d49 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 'Fedora 31 (Thirty One)' {
    search --no-floppy --fs-uuid --set=root 3ba4cef1-ee4e-47a9-acd4-52bccb07a237
    linux  /boot/vmlinuz root=UUID=3ba4cef1-ee4e-47a9-acd4-52bccb07a237 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 'openSUSE Tumbleweed (rolling)' {
    search --no-floppy --fs-uuid --set=root 00bd1c4f-112a-493b-b956-63c414cb844a
    linux  /boot/vmlinuz root=UUID=00bd1c4f-112a-493b-b956-63c414cb844a splash=silent resume=/dev/disk/by-uuid/b564ed75-b9ee-410f-9f87-04afc30a0ff4 mitigations=auto quiet
    initrd /boot/initrd
}
menuentry 'MX Linux 18.3 Continuum' {
        search --no-floppy --fs-uuid --set=root e2a9be0a-6b63-40e9-9a3f-029b14c8403e
        linux  /boot/vmlinuz root=UUID=e2a9be0a-6b63-40e9-9a3f-029b14c8403e ro quiet splash
        initrd /boot/initrd
}
menuentry 'MX Linux 18.3 Continuum - Systemd' {
        search --no-floppy --fs-uuid --set=root e2a9be0a-6b63-40e9-9a3f-029b14c8403e
        linux  /boot/vmlinuz root=UUID=e2a9be0a-6b63-40e9-9a3f-029b14c8403e ro quiet splash init=/lib/systemd/systemd
        initrd /boot/initrd
}
menuentry 'MX Linux 19 (Antix kernel) Patito Feo' {
        search --no-floppy --fs-uuid --set=root 66eebc19-c3f8-4b17-b912-0c5099ca7ae4
        linux  /boot/vmlinuz-antix root=UUID=66eebc19-c3f8-4b17-b912-0c5099ca7ae4 ro quiet splash
        initrd /boot/initrd-antix.img
}
menuentry 'MX Linux 19 (Antix kernel) Patito Feo Systemd' {
        search --no-floppy --fs-uuid --set=root 66eebc19-c3f8-4b17-b912-0c5099ca7ae4
        linux  /boot/vmlinuz-antix root=UUID=66eebc19-c3f8-4b17-b912-0c5099ca7ae4 ro quiet splash init=/lib/systemd/systemd
        initrd /boot/initrd-antix.img
}
menuentry 'MX Linux 19 Patito Feo' {
        search --no-floppy --fs-uuid --set=root 66eebc19-c3f8-4b17-b912-0c5099ca7ae4
        linux  /boot/vmlinuz root=UUID=66eebc19-c3f8-4b17-b912-0c5099ca7ae4 ro quiet splash
        initrd /boot/initrd.img
}
menuentry 'MX Linux 19 Patito Feo Systemd' {
        search --no-floppy --fs-uuid --set=root 66eebc19-c3f8-4b17-b912-0c5099ca7ae4
        linux  /boot/vmlinuz root=UUID=66eebc19-c3f8-4b17-b912-0c5099ca7ae4 ro quiet splash init=/lib/systemd/systemd
        initrd /boot/initrd.img
}
menuentry 'Xubuntu 18.04.3 Bionic Beaver LTS' {
    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.3 Bionic Beaver LTS (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 'Windows 10' {
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
```

My partitions:


```
sudo blkid | grep sdc
/dev/sdc1: UUID="688D-126B" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="15661847-bc65-401a-84b0-97a157f3949f"
/dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="6b26da12-6fdc-4ce5-bde3-c990cdfc081b"
/dev/sdc3: LABEL="C:" UUID="C4968A52968A44C0" TYPE="ntfs" PARTLABEL="Windows_10" PARTUUID="a76c4894-4d85-457e-8bc6-9d5308bef571"
/dev/sdc4: UUID="9C9AE5269AE4FE20" TYPE="ntfs" PARTUUID="94858fd1-334c-47f7-bfab-266b49f0a0ba"
/dev/sdc5: UUID="b564ed75-b9ee-410f-9f87-04afc30a0ff4" TYPE="swap" PARTLABEL="swap" PARTUUID="dc354366-1300-48d4-8a60-133aa2e2ca57"
/dev/sdc6: LABEL="ArchLinux" UUID="bbca28b2-503e-4dc8-9850-c54bd0492da8" TYPE="ext4" PARTLABEL="Arch_Linux" PARTUUID="ea32dc7f-6d56-4a5c-b544-008abb8026e4"
/dev/sdc7: LABEL="Media" UUID="840ac879-510a-4b8d-be01-9d3a5f37dbb2" TYPE="ext4" PARTLABEL="Media" PARTUUID="7af1d6dd-bfac-4c24-90ef-8da3d218898d"
/dev/sdc8: LABEL="openSUSE" UUID="00bd1c4f-112a-493b-b956-63c414cb844a" TYPE="ext4" PARTLABEL="openSUSE" PARTUUID="dcaa5edb-0510-4bab-93e4-b238b329dbf7"
/dev/sdc9: LABEL="Fedora" UUID="43cd93b8-2442-42df-88a3-7bf069390d49" TYPE="ext4" PARTLABEL="Fedora" PARTUUID="ee5e61eb-eab9-4794-aabe-a84a910fe9a0"
/dev/sdc10: LABEL="Bionic" UUID="338e6d3b-cbd4-496d-9cc2-b688a90c17c3" TYPE="ext4" PARTLABEL="Bionic" PARTUUID="4f579967-b025-47dc-b080-64a0865d7165"
/dev/sdc11: LABEL="rootMX18.3" UUID="e2a9be0a-6b63-40e9-9a3f-029b14c8403e" TYPE="ext4" PARTLABEL="mxlinux18" PARTUUID="e9eae6c4-f48a-4aa2-ba97-0ccadb7aa32f"
/dev/sdc12: LABEL="Fedora31" UUID="3ba4cef1-ee4e-47a9-acd4-52bccb07a237" TYPE="ext4" PARTLABEL="Fedora31" PARTUUID="c76d0607-d89b-49b5-82fd-f0460ec47cfe"
/dev/sdc13: LABEL="Debian-Buster" UUID="dbbd22d7-0110-47d4-932b-2f19c83bcbca" TYPE="ext4" PARTLABEL="Debian-Buster" PARTUUID="0e1cf947-9391-43d2-8d26-4384b98015a6"
/dev/sdc14: LABEL="Debian-Testing" UUID="1b019591-4bf0-4781-bf86-fdc044ef8ae7" TYPE="ext4" PARTLABEL="Debian-Testing" PARTUUID="9b354d04-fd5e-48b3-a8f0-35cc873eb7e6"
/dev/sdc15: LABEL="rootMX19" UUID="66eebc19-c3f8-4b17-b912-0c5099ca7ae4" TYPE="ext4" PARTLABEL="rootMX19" PARTUUID="ab7453e8-12b2-4530-9408-313bc9d8828f"
```

Sort of like a puzzle to be setup once.

----------


## Cavsfan

It took me awhile but, I finally figured out what most people probably already knew.  :Razz: 

When I customized Xubuntu 20.04 grub the menu would always never show, so rather than delving in to see what the problem was I had my grub on another system that didn't do that. 

Anyway, I err um, stumbled upon the fact that if I pressed the ESC key the menu would show. Figured out why that was in */etc/default/grub*:
Just needed to change this:


```
GRUB_TIMEOUT_STYLE=hidden
```

to this:


```
GRUB_TIMEOUT_STYLE=menu
```

Then everything worked like it should.  :Wink:

----------


## Cavsfan

on Xubuntu 20.04:

----------


## Cavsfan

> It took me awhile but, I finally figured out what most people probably already knew. 
> 
> When I customized Xubuntu 20.04 grub the menu would always never show, so rather than delving in to see what the problem was I had my grub on another system that didn't do that. 
> 
> Anyway, I err um, stumbled upon the fact that if I pressed the ESC key the menu would show. Figured out why that was in */etc/default/grub*:
> Just needed to change this:
> 
> 
> ```
> ...


Turns out my 18.04 install had this same issue. That should solve it and I updated the Wiki.
If anyone has any problem on any version let me know.

----------


## von Stalhein

Hi Cavsfan - my old frankenbox finally fell over so I bit the bullet and went all new. This combo should last a week before obsolescence, it's that cutting edge  :Smile: 

Anyway, upon plugging in HDDs and booting I saw the same thing in the GRUB menu, very truncated. Luckily I remembered your post!

Keep up the good work!

----------


## Cavsfan

> Hi Cavsfan - my old frankenbox finally fell over so I bit the bullet and went all new. This combo should last a week before obsolescence, it's that cutting edge 
> 
> Anyway, upon plugging in HDDs and booting I saw the same thing in the GRUB menu, very truncated. Luckily I remembered your post!
> 
> Keep up the good work!


Newer is always nice. Mine is a beast but, it's a few years old with a 4th gen i7.

Glad I could help!  :Smile:

----------


## Cavsfan

Grub on Bionic Beaver 18.04.5.

----------


## Cavsfan

If you dual or multi boot Linux systems and are interested in preventing your grub moving from one partition to another every time a new version of grub is installed. There are some steps you can take.

I currently have mine on Fedora 33 but I am booting Arch Linux, Fedora 33, openSUSE Tumbleweed, Xubuntu 18.04, Xubuntu 20.04 and Xubuntu 20.10.
On Ubuntu you can put the grub packages on hold with this command:


```
sudo apt-mark hold <pkg>
```

apt-mark man page

I was customizing all my systems because grub moves from one to another, Ubuntu and openSUSE do anyway.

This makes it so you only have to worry about customizing one system.

Just thought I'd mention it. Working pretty well here.

----------


## Michael Dooley

Thanks Cavsfan for this thread. I recently acquired a laptop from Ebay that had a UEFI bios. So far I've managed to get things set up in 06_custom so as to boot everything except a live CD or ISO.

#!/bin/sh
echo 1>&2 "Adding MATE 20.04 LTS focal, MATE 21.04 hirsute, live CD + parted magic"
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 'Ubuntu-MATE 20.04 (on /dev/sda5)' {
	search --no-floppy --fs-uuid --set=root e5cc4b83-5a56-4d3e-b885-dee279e6d6eb
	linux /boot/vmlinuz root=UUID=e5cc4b83-5a56-4d3e-b885-dee279e6d6eb ro  quiet splash $vt_handoff
	initrd /boot/initrd.img
}
menuentry 'Ubuntu-MATE 21.04 (on /dev/sda8)' {
	search --no-floppy --fs-uuid --set=root 1588c768-4536-43d7-963f-2ababd7d4022
	linux /boot/vmlinuz root=UUID=1588c768-4536-43d7-963f-2ababd7d4022 ro quiet splash $vt_handoff
	initrd /boot/initrd.img
}
menuentry 'live CD (on /dev/sda5)' {
    search --no-floppy --fs-uuid --set=root e5cc4b83-5a56-4d3e-b885-dee279e6d6eb
    set isofile="/home/data/Iso/ubuntu-mate-16.04.4-desktop-amd64.iso"
    loopback loop (hd1,msdos5)$isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile quiet splash
    initrd (loop)/casper/initrd.lz
}
menuentry 'Parted Magic (on /dev/sda5)' {
	search --no-floppy --fs-uuid --set=root e5cc4b83-5a56-4d3e-b885-dee279e6d6eb
	linux /boot/pmagic/bzImage64 root=/dev/sda5 directory=boot edd=on vga=normal
	initrd /boot/pmagic/initrd.img /boot/pmagic/fu.img /boot/pmagic/m64.img
}

There seems to be a bug in grub 2.04  Please see - https://bugs.launchpad.net/ubuntu/+s...2/+bug/1851311
The bug probably is keeping me from mounting an ISO. Do you have any thoughts as to what I might do to solve or work around this issue?

----------


## oldfred

I just installed Hirsute using UEFI & loopmount.

My configuration is a bit involved as I use a data partition and configfile into the ISO folder in the data partition. And in ISO folder I have a file livecdimage.cfg which has all my ISO boot info. I always forgot to update grub, so I now use configfile into the text file as then I do not have to update grub. Note inconsistency with hd0 & hd1, I often have to manually edit one or the other as I boot.

In 40_custom:


```
menuentry 'Live ISOs in data drive' { 
search --set=root --label nvme_data --hint hd0,gpt5 
configfile /ISO/livecdimage.cfg 
}
```

Then in /ISO/livecdimage.cfg



```
menuentry "Kubuntu 21.04 Live ISO" {
    set isofile="/ISO/hirsute-desktop-amd64.iso"
    rmmod tpm
    loopback loop (hd1,5)$isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile toram noeject
        initrd (loop)/casper/initrd
}
```

Because I installed to sda drive but boot from NVMe drive, I have a numbering issue. Default boot is always hd0, but if I boot NVMe drive as hd0, my install in sda drive becomes hd1. But I also have an external drive plugged in and that often changes order again. It my only work after I unplug external drive, just to avoid confusion (mine).

----------


## 1fallen

> I just installed Hirsute using UEFI & loopmount.
> 
> My configuration is a bit involved as I use a data partition and configfile into the ISO folder in the data partition. And in ISO folder I have a file livecdimage.cfg which has all my ISO boot info. I always forgot to update grub, so I now use configfile into the text file as then I do not have to update grub. Note inconsistency with hd0 & hd1, I often have to manually edit one or the other as I boot.
> 
> In 40_custom:
> 
> 
> ```
> menuentry 'Live ISOs in data drive' { 
> ...


Brilliant!  :KDE Star: 
Thanks for the share oldfred,

----------


## Michael Dooley

I'll look up this configfile business as I have a data partition too. But only one SSHD.




> My configuration is a bit involved as I use a data partition and configfile into the ISO folder in the data partition. And in ISO folder I have a file livecdimage.cfg which has all my ISO boot info.


How do I make these config files?

I read oldfred's post with more attention to detail and came up with my livecdimage.cfg file.

This is it -

menuentry "Ubuntu-Mate 18.04 Live ISO" {
    set isofile="/Iso/-amd64/ubuntu-mate-18.04.4-desktop-amd64.iso"
    rmmod tpm
    loopback loop (hd0,7)$isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile toram noeject
        initrd (loop)/casper/initrd
}

Getting closer but no boot to ISO yet. I'll post back with observations and details once I get this working. My suspicion is that I'll have to install a different grub.

----------


## Cavsfan

> Thanks Cavsfan for this thread. I recently acquired a laptop from Ebay that had a UEFI bios. So far I've managed to get things set up in 06_custom so as to boot everything except a live CD or ISO.


Thanks for the kind words! Although, I have never used a grub entry to mount a live ISO; I've no doubt that it can be done as Fred and 1fallen have done it.




> I'll look up this configfile business as I have a data partition too. But only one SSHD.
> 
> 
> 
> How do I make these config files?
> 
> I read oldfred's post with more attention to detail and came up with my livecdimage.cfg file.
> 
> This is it -
> ...


I was never able to get _any_ config file to boot and I tried many times. Let me know when you get that to work.
I use UUIDs to link the partitions in my custom grub menu. It's as simple as I could get it; I figured out what was necessary and it makes sense to me.


```
[cavsfan@Arch ~]$ sudo blkid | grep -e EFI -e sdc5 -e Bionic
/dev/sdc1: UUID="688D-126B" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="15661847-bc65-401a-84b0-97a157f3949f"
/dev/sdc5: UUID="b564ed75-b9ee-410f-9f87-04afc30a0ff4" TYPE="swap" PARTLABEL="swap" PARTUUID="dc354366-1300-48d4-8a60-133aa2e2ca57"
/dev/sdc10: LABEL="Bionic" UUID="338e6d3b-cbd4-496d-9cc2-b688a90c17c3" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Bionic" PARTUUID="4f579967-b025-47dc-b080-64a0865d7165"
```

Showing the EFI boot partition just because, the swap is red and the system partition is blue. Some systems use the EFI boot partition's UUID, Arch Linux is one of those.


```
menuentry 'Xubuntu 18.04.4 Bionic Beaver LTS' {
    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.4 Bionic Beaver LTS (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
}
```

----------


## oldfred

I find path to be one of the issues.
As system is not yet mounted with grub, it is defaults as seen if using live installer, but not if you have booted and mounted using your own mount.

I have a partition (hd0,7) and in that partition I have my data partition. While data partition once booted is /mnt/data, before mount it just has a bunch of folders, one of which is ISO. So grub will see it as (hd0,7)/ISO. If you do a ls of that from grub's c for command line then you should see your ISO & if you create a textfile for grub stanza, you see that file. The file has to have correctly formatted grub boot stanza, just like you have in 40_custom.

So is your data partition the hd0,7?
and is path to ISO this? /Iso/-amd64/ubuntu-mate-18.04.4-desktop-amd64.iso"

----------


## Michael Dooley

Yes oldfred, my data partition is sda7 (hd0,7). And the path is also correct.

----------


## Michael Dooley

I'm going to abandon this project at this point as it is taking up way too much of my time. A newer grub was installed in 20.04.2 this morning and I'll work with that rather than 18.04's grub. Thanks to all of you for your assistance and if I ever get a live CD or ISO to mount, I'll report back.

----------


## Cavsfan

> I'm going to abandon this project at this point as it is taking up way too much of my time. A newer grub was installed in 20.04.2 this morning and I'll work with that rather than 18.04's grub. Thanks to all of you for your assistance and if I ever get a live CD or ISO to mount, I'll report back.


I know you will get it going, you definitely know what you are doing. If you need additional support, please open up a thread in the Help section. 
I mean no ill will whatsoever, it's just that booting anything live was never included as a part of this Wiki; only booting operating systems.

Thank you kindly.  :Very Happy: 

If you ever need help booting operating systems in a custom grub, virtually any Linux OS system, that I can help with, Ubuntu, Arch Linux, Fedora, openSUSE, etc.

----------


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

----------


## Cavsfan

> 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._
> 
> ...


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:


```
#!/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: 


```
#!/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:


```
GRUB_TIMEOUT_STYLE=menu
```

----------


## von Stalhein

I can't for the life of me remember how I got to my last (and preferred) setup - I've gone over the wiki etc & fiddled but no result.

I had to reload Win & Ubuntu (separate drives) as for the original build last year I installed them under the legacy BIOS and recently shenanigans ensued.

Anyway, all up and going again except for the GRUB screen.

It used to boot to my selected picture with the menu of OSs. When picking Ubuntu the screen then reloaded to the same background image with a login text box sited in the bottom right corner. 

Now, when I select Ubuntu the next screen is (I think) the Plymouth? purple one with the box in the middle.

Would love some pointers on modifying this sequence to have the same image and also how to position the login text box.

----------


## Cavsfan

> I can't for the life of me remember how I got to my last (and preferred) setup - I've gone over the wiki etc & fiddled but no result.
> 
> I had to reload Win & Ubuntu (separate drives) as for the original build last year I installed them under the legacy BIOS and recently shenanigans ensued.
> 
> Anyway, all up and going again except for the GRUB screen.
> 
> It used to boot to my selected picture with the menu of OSs. When picking Ubuntu the screen then reloaded to the same background image with a login text box sited in the bottom right corner. 
> 
> Now, when I select Ubuntu the next screen is (I think) the Plymouth? purple one with the box in the middle.
> ...


You say you have a Legacy/MBR system or UEFI/GPT system?

After the BIOS screen it should go to the custom grub screen, then to whichever OS is selected. Could be grub files left executable maybe?

Once customized and certain all custom menu selections work, you make these (files shown in white) unexecutable.

----------


## von Stalhein

It's now a UEFI/GPT system after much pain to the management.

Selecting an OS works fine.

If I select Win, the little wheel thingy rotates in a sort of cutout box in the middle of the GRUB screen for a few seconds before the Win login screen appears.

If I select Ubuntu, it drops to a purple screen headed "Ubuntu" with my account name and a password box underneath - there are also the usual options to select a desktop environment or restart etc.

The previous setup was similar except instead of the purple screen, the next screen contained my background image with a text box in the bottom right corner for the pword.

Hop e that makes sense!

----------


## Cavsfan

> It's now a UEFI/GPT system after much pain to the management.
> 
> Selecting an OS works fine.
> 
> If I select Win, the little wheel thingy rotates in a sort of cutout box in the middle of the GRUB screen for a few seconds before the Win login screen appears.
> 
> If I select Ubuntu, it drops to a purple screen headed "Ubuntu" with my account name and a password box underneath - there are also the usual options to select a desktop environment or restart etc.
> 
> The previous setup was similar except instead of the purple screen, the next screen contained my background image with a text box in the bottom right corner for the pword.
> ...


My Windows logon looks pretty much the same, I have a wheel thing that rotates while Windows 10 is coming up.

Also, I believe your purple screen is your Plymouth logon screen on Ubuntu; I have the same except it's not purple. You've reached the system you selected at that point.

Here is a bit a bout Plymouth *here*

I hope this is what you meant.

----------


## von Stalhein

Thanks!

Yep - I remember the Plymouth one as being coloured purple from I don't know how many distros ago so it didn't worry me as it was familiar.

As I said above, in my last setup, the next screen after selecting Ubuntu had the same background as the initial GRUB screen, with the login box at the bottom RHS of the screen & the usual symbol to select whatever other desktops I had installed etc.

My uncertain memory is that I found a tute that detailed how to do that - I will do some search-engineing and report back.

----------


## Cavsfan

> Thanks!
> 
> Yep - I remember the Plymouth one as being coloured purple from I don't know how many distros ago so it didn't worry me as it was familiar.
> 
> As I said above, in my last setup, the next screen after selecting Ubuntu had the same background as the initial GRUB screen, with the login box at the bottom RHS of the screen & the usual symbol to select whatever other desktops I had installed etc.
> 
> My uncertain memory is that I found a tute that detailed how to do that - I will do some search-engineering and report back.


You're welcome! Yeah I do a lot of research as well.  :Smile: 

I've had my grub screen, logon screen and background all the same before too.

Let me know what you find and If I can help I will.

----------


## Cavsfan

Nothing changed with Ubuntu 22.04.



My custom menu file:


```
#!/bin/sh
echo 1>&2 "Adding Arch Linux, Fedora 35 (Thirty Five), Xubuntu 22.04 Jammy Jellyfish LTS 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 35 (Thirty Five)' {
    search --no-floppy --fs-uuid --set=root 88b17257-fd5e-4261-96d6-fc6cef32254f
    linux  /boot/vmlinuz root=UUID=88b17257-fd5e-4261-96d6-fc6cef32254f 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 22.04 Jammy Jellyfish LTS' {
    search --no-floppy --fs-uuid --set=root 7905894e-6202-4adb-bdf5-a43aaa82af6b
    linux    /boot/vmlinuz root=UUID=7905894e-6202-4adb-bdf5-a43aaa82af6b ro quiet splash
    initrd    /boot/initrd.img
}
menuentry 'Xubuntu 22.04 Jammy Jellyfish LTS (recovery mode)' {
        search --no-floppy --fs-uuid --set=root 7905894e-6202-4adb-bdf5-a43aaa82af6b
        linux  /boot/vmlinuz root=UUID=7905894e-6202-4adb-bdf5-a43aaa82af6b 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
}
```

----------


## Cavsfan

I found a more concise way to list the bootable menu lines:


```
grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f2,2 | nl --starting-line-number=0
```



```
cavsfan@Jammy-Jellyfish:~$ grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f2,2 | nl --starting-line-number=0
     0    Arch Linux
     1    Arch Linux (fallback kernel)
     2    Fedora 35 (Thirty Five)
     3    Xubuntu 22.04 Jammy Jellyfish LTS
     4    Xubuntu 22.04 Jammy Jellyfish LTS (recovery mode)
     5    Windows 10
```

Just the menu line numbers and what the systems names have been set to.

----------


## Cavsfan

> I found a more concise way to list the bootable menu lines:
> 
> 
> ```
> grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f2,2 | nl --starting-line-number=0
> ```
> 
> 
> 
> ...


I take that back; this is another decent way to display to menu lines but, the one in the Wiki is good too.

----------


## lolitta95

great work keep going tanks for the post!  :Very Happy:

----------


## Cavsfan

> great work keep going tanks for the post!


Sorry this is a little late.
Thank you! Glad to help.  :Very Happy:

----------


## von Stalhein

Hey @Cavsfan - send me away if this is the wrong spot!

I had a glitch today & had to re-set Win11.
There was some reordering of disks as I had to boot from a USB to get to the repair area.

I've changed the disk boot order back to the original and I can get into Ubuntu by holding F11 (MSI board & BIOS) and selecting the Ubuntu which then boots to the GRUB menu.
The 2 options at that juncture are Win11 & Ubuntu, and they both reference the same disk, which didn't worry me as ostensibly it is the Win disk and I thought that's where the bootloader resided anyway (UEFI).

So, I thought running the old 

```
sudo update-grub
```

 would restore things but it doesn't. 

I assume the re-set has overwritten the bootloader - can you link me to a fix please or point me to the Path of Solutions?

----------


## oldfred

I suggest starting a new thread, and post link to summary report from Boot-Repair.
Please copy & paste the pastebin link to the BootInfo summary report ( do not post report), do not run the auto fix till reviewed.Lets see details, use ppa version with your USB installer (2nd option) or any working install,  not Boot-Repair ISO
https://help.ubuntu.com/community/Boot-Repair

New grub 2.06 turns os-prober off by default. You can manually turn it back on temporally and then turn it back off. There is some security issue with trying to mount & scan every partition for operating systems. 

Since this thread is about maintenance free, I would copy Windows UEFI boot stanza into 40_custom. And include 40_custom in you normal backups. I copy mine into /home so backup of /home includes it.

Windows fast start up must be off, otherwise grub will not see it to add to menu, nor then boot it.
Or if UEFI Secure boot is on, grub does not pass security key to Windows so that does not work either.
Windows may turn those settings on with updates or run UEFI update that resets UEFI to defaults. (more with most laptops).

----------


## von Stalhein

Thanks Oldfred,will do - sorry for the clog.

----------


## Cavsfan

Yes, thanks Fred!  :Smile:

----------

