Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › Grub menu – default entry
- This topic has 7 replies, 2 voices, and was last updated Jan 31-5:38 pm by Girafenaine.
-
AuthorPosts
-
January 31, 2022 at 8:50 am #76453Member
Girafenaine
Hello,
I use antiX Fluxbox on a frugal install on a laptop. I boot this frugal install with a live-USB. I have to manually select the “frugal” grub entry I use on a daily basis, and I would like it to be the default entry.
Here is the /boot/grub/grub.cfg file on the live-USB. The default entry is for now the second one (“antiX-21-runit x64-full (30 October 2021)”):
#------------------------------------------------------------------ # file: /boot/grub/grub.cfg for the Live version of antiX # # This file can get updated automatically on a LiveUSB via the save # feature in the text menus. It is possible to break these updates # by editing this file. #------------------------------------------------------------------ # kernels kernel_label_0="Legacy" kernel_version_0="4.9" kernel_label_1="Modern" kernel_version_1="5.10" # load defaults if [ -s $prefix/config/defaults.cfg ]; then source $prefix/config/defaults.cfg fi set timeout=2 set gfxmode=1024x768 set gfxpayload="1680x1050;1600x900;1600x1200;1600x1050;1500x1000;1440x960;1440x900;1368x912;1366x768;1280x800;1280x720;1280x1024;1200x800;1024x768;auto" set default=0 menuentry " Frugal TM (antiX 21-runit)" --id=one { insmod part_msdos insmod part_gpt insmod ntfs search --no-floppy --set=root --fs-uuid 1262F3279C5B5625 linux /antiX-Frugal-5.10.57-antix.1-amd64-smp/vmlinuz1 bdir=antiX-Frugal-5.10.57-antix.1-amd64-smp buuid=1262F3279C5B5625 quiet splasht disable=xF persist_all live_swap=all-off amount=all initrd /antiX-Frugal-5.10.57-antix.1-amd64-smp/initrd.gz } menuentry " antiX-21-runit x64-full (30 October 2021)" "$kernel" "$initrd" "$kopts" --id=linux { kernel="$2" initrd="$3" shift 3 linux /antiX/${kernel} quiet splasht disable=lxF $@ initrd /antiX/${initrd}.gz } menuentry " antiX-21-runit x64-full TEST FRUGAL" "$kernel" "$initrd" "toram persist_frugal from=all buuid=1262F3279C5B5625 bdir=antiX-Frugal-5.10.27-antix.1-amd64-smp disable=xF" --id=test { kernel="$2" initrd="$3" shift 3 linux /antiX/${kernel} quiet splasht disable=xF $@ initrd /antiX/${initrd}.gz } #--custom menuentry " "$"Custom" "$kernel" "$initrd" "$kopts" --id=custom { #--custom kernel="$2" #--custom initrd="$3" #--custom shift 3 #--custom linux /antiX/${kernel} quiet splasht disable=lxF $@ #--custom initrd /antiX/${initrd}.gz #--custom } # menuentry " antiX-21-runit x64-full "$"Customize Boot (text menus)" "$kernel" "$initrd" "$kopts" --id=customize { # kernel="$2" # initrd="$3" # shift 3 # linux /antiX/${kernel} quiet splasht disable=lxF menus $@ # initrd /antiX/${initrd}.gz # } # load boot menus # if [ -f $prefix/config/bootmenu.cfg ]; then source $prefix/config/bootmenu.cfg fi if [ -f $prefix/theme/help.txt ]; then menuentry " "$"Help" --hotkey=H { cat $prefix/theme/help.txt echo -n $"Press <Enter> to continue"" " read xxx_help } fiHow could I make the first entry the default one ?
Girafenaine
----
Antix 19 - Fluxbox - Live USB stick and frugal / MX 19 - Fluxbox - Dell XPS 7590January 31, 2022 at 9:06 am #76454ModeratorBobC
::Use Forum > Search to search for GRUB_DEFAULT.
Brian’s “saved” method has it remember what was used last if I understand it correctly.
GRUB_DEFAULT=0 # boots first entry
GRUB_DEFAULT=1 # boots 2nd entry
etc.change needs to be made with root authority to /etc/default/grub
afterwards you need to run update-grubPS: This won’t move your frugal entry to the top, but allows you to make it the default, which I hope is an acceptable alternative.
- This reply was modified 1 year, 3 months ago by BobC.
January 31, 2022 at 9:20 am #76456ModeratorBobC
::On second thought, I’m not sure, but am wondering if you edited your file above manually?
The way I have added grub options is to add them to /etc/grub.d/40_custom via Control Centre > System tab > Edit Config files > 40_custom tab, edit /etc/default/grub and then run
sudo update-grub
from a terminal.January 31, 2022 at 12:39 pm #76482Member
Girafenaine
::Hello, thanks BobC for your answers.
I am not sure whether grub config is the same for a frugal install booted from a live-USB. Files are not in the same places, and I don’t know if “upgrade-grub” will do something (perhaps launched from the live-USB, but not from the frugal install).
Yes, I did manually edited the /boot/grub/grub.cg file on my live-USB antiX partition to add the first entry. As we can see in the file above, there is a line “set default=0” at the beginning. But this line seems not to see the manually added entry, since it boots on the second entry.
Girafenaine
----
Antix 19 - Fluxbox - Live USB stick and frugal / MX 19 - Fluxbox - Dell XPS 7590January 31, 2022 at 3:53 pm #76495ModeratorBobC
::If it was me, I would try making the changes via the standard method on a fresh, updated USB, and then remaster it so the changes would be permanent.
I have never tried running via frugal while booting from a USB before, though, so the only way to know would be to try it.
Maybe someone more knowledgeable can provide a better answer…
January 31, 2022 at 5:16 pm #76501Member
Girafenaine
::Hello BobC,
I am not aware of any “standard method” to add a grub entry other than the manual method I have followed, when you boot a frugal install from a live-USB !
I will try to run “update-grub” from the live-USB to check if it does the job.
Girafenaine
----
Antix 19 - Fluxbox - Live USB stick and frugal / MX 19 - Fluxbox - Dell XPS 7590January 31, 2022 at 5:22 pm #76502ModeratorBobC
::Be sure to backup your current setup someplace before it gets overwritten by update-grub
January 31, 2022 at 5:38 pm #76503Member
Girafenaine
::When I try to run update-grub on the live-USB, I get an error (something like : “grub-probe error – can’t find the path to “overlay” “).
I guess on a live-USB you cannot run update-grub, since the boot system is not the same and involved some steps that we don’t have on a normal installed OS. The grub cfg file is not mounted on its normal /boot/grub place in the file system on a live-USB. You will find it under /live/boot-dev/boot/grub/grub.cfg.
That’s why I think you are to edit the file manually only (or through the boot interface, where you can add some entries as well, but not such entries on another boot device).
And yet I would like to make this entry my default one, if one may do that !
Girafenaine
----
Antix 19 - Fluxbox - Live USB stick and frugal / MX 19 - Fluxbox - Dell XPS 7590 -
AuthorPosts
- You must be logged in to reply to this topic.