[Solved] Help with Grub Customizer not Saving Configurations Correctly

Message
Author
rej
Posts: 140
Joined: Thu Mar 09, 2017 11:11 pm

Re: Help with Grub Customizer not Saving Configurations Correctly

#11 Post by rej »

fehlix-

Sorry - should have included this...

Code: Select all

[T60 x86 sda5]

rj@antix17.1rj:~
$ grep GRUB_DISABLE_OS_PROBER /etc/default/grub
GRUB_DISABLE_OS_PROBER=true
rj@antix17.1rj:~
$ ls -al /etc/grub.d/*
-rwxr-xr-x 1 root root  9424 Jun 21 09:49 /etc/grub.d/00_header
-rwxr-xr-x 1 root root  6058 Jun 21 09:49 /etc/grub.d/05_debian_theme
-rwxr-xr-x 1 root root 12261 Jun 21 09:49 /etc/grub.d/10_linux
-rwxr-xr-x 1 root root 11082 Jun 21 09:49 /etc/grub.d/20_linux_xen
-rwxr-xr-x 1 root root  1570 Jun 21 09:49 /etc/grub.d/20_memtest86+
-rw-r--r-- 1 root root 11692 Jun 21 09:49 /etc/grub.d/30_os-prober
-rwxr-xr-x 1 root root  1416 Jun 21 09:49 /etc/grub.d/30_uefi-firmware
-rwxr-xr-x 1 root root   214 Jun 21 09:49 /etc/grub.d/40_custom
-rwxr-xr-x 1 root root   216 Jun 21 09:49 /etc/grub.d/41_custom
-rw-r--r-- 1 root root   483 Jun 21 09:49 /etc/grub.d/README
rj@antix17.1rj:~
$ sudo update-grub
[sudo] password for rj: 
Generating grub configuration file ...
Found background: /usr/share/wallpaper/back.jpg
Found background image: /usr/share/wallpaper/back.jpg
Found linux image: /boot/vmlinuz-4.15.9-antix.1-686-smp-pae
Found initrd image: /boot/initrd.img-4.15.9-antix.1-686-smp-pae
Found linux image: /boot/vmlinuz-4.15.5-antix.1-686-smp-pae
Found initrd image: /boot/initrd.img-4.15.5-antix.1-686-smp-pae
Found linux image: /boot/vmlinuz-4.10.5-antix.1-486-smp
Found initrd image: /boot/initrd.img-4.10.5-antix.1-486-smp
Found linux image: /boot/vmlinuz-4.9.83-antix.1-486-smp
Found initrd image: /boot/initrd.img-4.9.83-antix.1-486-smp
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
done
rj@antix17.1rj:~
$ grep '\b(menuentry|submenu)' /boot/grub/grub.cfg
rj@antix17.1rj:~
$ 
________________________________________
________________________________________
[T60 x86 sda7] (same device)

rj@mx17.1rj:~
$ grep GRUB_DISABLE_OS_PROBER /etc/default/grub
GRUB_DISABLE_OS_PROBER="true"
rj@mx17.1rj:~
$ ls -al /etc/grub.d/*
-rwxr-xr-x 1 root root  9424 Sep 12 09:07 /etc/grub.d/00_header
-rwxr-xr-x 1 root root  6058 Sep 12 09:07 /etc/grub.d/05_debian_theme
-rwxr-xr-x 1 root root 12251 Sep 12 09:07 /etc/grub.d/10_linux
-rwxr-xr-x 1 root root   773 Jul 19 01:58 /etc/grub.d/10_linux_proxy
-rwxr-xr-x 1 root root 11082 Sep 12 09:07 /etc/grub.d/20_linux_xen
-rwxr-xr-x 1 root root   851 Sep 12 09:07 /etc/grub.d/20_memtest86+
-rw-r--r-- 1 root root 11692 Sep 12 09:07 /etc/grub.d/30_os-prober
-rwxr-xr-x 1 root root  1611 Jul 19 01:58 /etc/grub.d/30_os-prober_proxy
-rwxr-xr-x 1 root root  1416 Sep 12 09:07 /etc/grub.d/30_uefi-firmware
-rwxr-xr-x 1 root root   774 Jul 19 01:58 /etc/grub.d/35_linux_proxy
-rwxr-xr-x 1 root root 11082 Jun 21 01:56 /etc/grub.d/36_linux_xen
-rwxr-xr-x 1 root root   187 Jul 19 01:58 /etc/grub.d/37_memtest86+_proxy
-rwxr-xr-x 1 root root   187 Jul 19 01:58 /etc/grub.d/38_memtest86+_proxy
-rwxr-xr-x 1 root root  1416 Jun 21 01:56 /etc/grub.d/39_uefi-firmware
-rwxr-xr-x 1 root root   214 Sep 12 09:07 /etc/grub.d/40_custom
-rwxr-xr-x 1 root root   216 Sep 12 09:07 /etc/grub.d/41_custom
-rw-r--r-- 1 root root   483 Sep 12 09:07 /etc/grub.d/README

/etc/grub.d/backup:
total 24
drwxr-xr-x 4 root root 4096 Jan  2  2018 .
drwxr-xr-x 5 root root 4096 Sep 12 09:07 ..
drwxr-xr-x 5 root root 4096 Jan  2  2018 boot_grub
-rw-r--r-- 1 root root 1378 Jan  2  2018 default_grub
drwxr-xr-x 2 root root 4096 Jan  2  2018 etc_grub_d
-rw-r--r-- 1 root root  519 Jan  2  2018 RESTORE_INSTRUCTIONS

/etc/grub.d/bin:
total 444
drwxr-xr-x 2 root root   4096 Jan  2  2018 .
drwxr-xr-x 5 root root   4096 Sep 12 09:07 ..
-rwxr-xr-x 1 root root 444280 Jul 19 01:58 grubcfg_proxy

/etc/grub.d/proxifiedScripts:
total 36
drwxr-xr-x 2 root root  4096 Jul 19 01:58 .
drwxr-xr-x 5 root root  4096 Sep 12 09:07 ..
-rwxr-xr-x 1 root root 12251 Jun 21 01:56 linux
-rwxr-xr-x 1 root root   851 Jun 21 01:56 memtest86+
-rwxr-xr-x 1 root root 11692 Jun 21 01:56 os-prober
rj@mx17.1rj:~
$ sudo update-grub
[sudo] password for rj: 
Generating grub configuration file ...
using custom appearance settings
Found background image: /usr/share/backgrounds/MXLinux/grub/mxreflection_by_ant_ony.png
Found linux image: /boot/vmlinuz-4.15.3-antix.1-686-smp-pae
Found initrd image: /boot/initrd.img-4.15.3-antix.1-686-smp-pae
Found linux image: /boot/vmlinuz-4.13.0-1-686-pae
Found initrd image: /boot/initrd.img-4.13.0-1-686-pae
Found linux image: /boot/vmlinuz-4.15.3-antix.1-686-smp-pae
Found initrd image: /boot/initrd.img-4.15.3-antix.1-686-smp-pae
Found linux image: /boot/vmlinuz-4.13.0-1-686-pae
Found initrd image: /boot/initrd.img-4.13.0-1-686-pae
Found memtest86+ image: /boot/memtest86+.bin
Found linux image: /boot/vmlinuz-4.15.3-antix.1-686-smp-pae
Found initrd image: /boot/initrd.img-4.15.3-antix.1-686-smp-pae
Found linux image: /boot/vmlinuz-4.13.0-1-686-pae
Found initrd image: /boot/initrd.img-4.13.0-1-686-pae
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ image: /boot/memtest86+.bin
done
rj@mx17.1rj:~
$ grep '\b(menuentry|submenu)' /boot/grub/grub.cfg 
rj@mx17.1rj:~
$ 

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

Re: Help with Grub Customizer not Saving Configurations Correctly

#12 Post by fehlix »

rej wrote: Sun Oct 14, 2018 2:33 pm

Code: Select all

[T60 x86 sda5]

-rwxr-xr-x 1 root root   773 Jul 19 01:58 /etc/grub.d/10_linux_proxy
-rwxr-xr-x 1 root root  1611 Jul 19 01:58 /etc/grub.d/30_os-prober_proxy
-rwxr-xr-x 1 root root   774 Jul 19 01:58 /etc/grub.d/35_linux_proxy
-rwxr-xr-x 1 root root   187 Jul 19 01:58 /etc/grub.d/37_memtest86+_proxy
-rwxr-xr-x 1 root root   187 Jul 19 01:58 /etc/grub.d/38_memtest86+_proxy
/etc/grub.d/backup:
OK, you seem have to used grub-customizer on those other non-currently controlling grub installs,
which created now the mess.
Here what I would do.
Within all those linux installations except the one which has the controling / active grub:
Open Grub-Customizer -> Edit -> Revert - > Save
This will reset to the orignal /etc/grub.d/ content and will remove all "*proxy" scripts.
and disable os_prober (again)

Code: Select all

sudo chmod -x /etc/grub.d/30_os-prober
and regenerate the grub.cfg

Code: Select all

sudo update-grub
Now boot into the linux with the controling grub (MX17 on sda3 ??)
and do also regenerate the grub.cfg

Code: Select all

sudo update-grub
This should now finally eliminate the unnecessary menu-entries.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

rej
Posts: 140
Joined: Thu Mar 09, 2017 11:11 pm

Re: Help with Grub Customizer not Saving Configurations Correctly

#13 Post by rej »

Fehlix-

Thanks! This worked - cleaned up the boot menu. The question now is:

I plan to install the new antix17.2 on another partition and also quite often change or update partitions with a snapshot of new alterations. What will need to be done each time a partition is changed or added? I don't think that it can be booted into, until it is added to the Grub menu, so it would start the multiple entries again and need to be re-configured on all partitions with each installation?

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

Re: Help with Grub Customizer not Saving Configurations Correctly

#14 Post by fehlix »

rej wrote: Sun Oct 14, 2018 6:48 pm Fehlix-

Thanks! This worked - cleaned up the boot menu. The question now is:

I plan to install the new antix17.2 on another partition and also quite often change or update partitions with a snapshot of new alterations. What will need to be done each time a partition is changed or added? I don't think that it can be booted into, until it is added to the Grub menu, so it would start the multiple entries again and need to be re-configured on all partitions with each installation?
Simple keep one grub with one Linux installtion the "controling" grub, otherwise you get confuesd.
You can achieve this by installting the new antix, with the option the install grub into the PBR ( into the parttiion boot record)
not into the MBR ( of the drive), which the controling grub is hooked into.
After installation of the new antix, reboot into the exiting MX Linux with the controling grub, and
do re-genrate the grub-menu by running this:

Code: Select all

sudo update-grub
Now reboot and you shall see a new antiX boot-menu entry.
Select the new antix and turn off OS_prober with the new antiX as written above by either by

Code: Select all

sudo chmod -x /etc/grub.d/30_os-prober
or alternatively by setting GRUB_DISABLE_OS_PROBER=true within /etc/default/grub with the new antiX.
:puppy:
BTW: I try to avoid grub-customizer ;=)
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

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

Re: Help with Grub Customizer not Saving Configurations Correctly

#15 Post by asqwerth »

Essentially you should only use GC from your controlling grub distro, and for the other distros, install their bootloader(grub) in PBR, also known as "install bootloader/grub in Root Partition").

Then, whenever you install or remove or update kernels in those other distros, you then have to reboot into controlling grub distro to update-grub or run GC.
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
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

Re: Help with Grub Customizer not Saving Configurations Correctly

#16 Post by KoO »

You can also clear up boot entry's with this command if it is EFI.

sudo efibootmgr this command will list all bootable entry's and non bootable's..(the star * means bootable)

BootOrder: 0000,0001,0004,0006,0002
Boot0000* antiX17.1
Boot0001* debian
Boot0002* Hard Drive
Boot0004* Windows Boot Manager

To remove windows from the boot list I use 0004.This can come in handy if you do a lot of disk hopping and want to remove old entry's. {BE CAREFUL}
sudo efibootmgr -b 0004 -B

If GC would work with out adding entry's every time you used it would be a great app. Try to avoid using GC..
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

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

Re: Help with Grub Customizer not Saving Configurations Correctly

#17 Post by asqwerth »

I got the impression that he was using old school MBR boot rather than UEFI boot. That's why I didn't bother with UEFI instructions.

I no longer use GC. I didn't find it 100% reliable when I multiboot more than 10 distros, plus running GC takes a long time when you have so many distros.

Instead I have a /boot/grub/custom.cfg file in my main distro, containing menu items which are either chainloader entries pointing towards the grub bootloader of the other distro(s) [their bootloaders are in root partition] or are entries directly running the grub.cfg file of that other distro.

That way, I never need to return to the main distro to update-grub whenever those other distros have a change in their bootloader or grub.cfg file.
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
oops
Posts: 1619
Joined: Tue Apr 10, 2018 5:07 pm

Re: Help with Grub Customizer not Saving Configurations Correctly

#18 Post by oops »

asqwerth wrote: Mon Oct 15, 2018 3:41 am ...
Instead I have a /boot/grub/custom.cfg file in my main distro, containing menu items which are either chainloader entries pointing towards the grub bootloader of the other distro(s) [their bootloaders are in root partition] or are entries directly running the grub.cfg file of that other distro.

That way, I never need to return to the main distro to update-grub whenever those other distros have a change in their bootloader or grub.cfg file.
Not sure that is a good solution ether (except for advanced users) , if you have a kernel update into your main distrib. so the update-grub is applied and you loose automatically your customized config.
BTW: I try to avoid grub-customizer too.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

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

Re: Help with Grub Customizer not Saving Configurations Correctly

#19 Post by asqwerth »

oops wrote: Mon Oct 15, 2018 4:01 am if you have a kernel update into your main distrib. so the update-grub is applied and you loose automatically your customized config.
BTW: I try to avoid grub-customizer too.
Nope, custom.cfg is totally not affected by updates to grub.cfg via update-grub.

It exists outside of the grub.cfg menu items and I don't edit grub.cfg at all, because grub.cfg is a generated file created by the update-grub command.

custom.cfg is a separate file that one can create.
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
oops
Posts: 1619
Joined: Tue Apr 10, 2018 5:07 pm

Re: Help with Grub Customizer not Saving Configurations Correctly

#20 Post by oops »

asqwerth wrote: Mon Oct 15, 2018 4:06 am...
Nope, custom.cfg is totally not affected by updates to grub.cfg via update-grub.

It exists outside of the grub.cfg menu items and I don't edit grub.cfg at all.
Ah Ok, then sorry for the mistake. But if a kernel update is applied into your main distrib, you have to modify by hand your custom file?
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

Post Reply

Return to “Software / Configuration”