Forum › Forums › New users › New Users and General Questions › How do I get more info for Grub entries at boot?
- This topic has 21 replies, 5 voices, and was last updated Aug 16-5:40 pm by olsztyn.
-
AuthorPosts
-
August 14, 2020 at 12:31 pm #40280Moderator
BobC
I changed the wording of the topic to avoid the sp$m checker…
Need to see more info for Grub entries at boot, maybe partition labels… Any ideas?
On each partition there is a label, and I always enter a label to remind me about that partition, as I have many partitions that I create and load to test different scenarios with as clean of a setup as possible to be able to reproduce problems and get good tests of solutions.
When I boot, if I could see that label it would help a lot. There look to be different types of entries generated by the different scripts it looks, and the main entry from 10_linux doesn’t tell you what partition it’s on or any info about it except the version:
### BEGIN /etc/grub.d/10_linux ### menuentry 'antiX-19.1 Marielle Franco' --class antix_19_1 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9dd9ef75-417a-4169-8221-34342d349716' { submenu 'Advanced options for antiX-19.1 Marielle Franco' $menuentry_id_option 'gnulinux-advanced-9dd9ef75-417a-4169-8221-34342d349716' { menuentry 'antiX-19.1 Marielle Franco, with Linux 4.9.212-antix.1-amd64-smp' --class antix_19_1 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.212-antix.1-amd64-smp-advanced-9dd9ef75-417a-4169-8221-34342d349716' {Looking at the 30_os-prober entries, they do say what partition they are on, but when I get 4 or 5 different antiX 19.1 partitions on the same system, it would be super helpful to be able to distinguish them from one another:
### BEGIN /etc/grub.d/30_os-prober ### menuentry 'antiX 19 (19) (on /dev/sda4)' --class antix --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-bc65f4e9-23b9-4e09-95f2-2146b807b675' { insmod part_gpt insmod ext2 set root='hd0,gpt4' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 bc65f4e9-23b9-4e09-95f2-2146b807b675 else search --no-floppy --fs-uuid --set=root bc65f4e9-23b9-4e09-95f2-2146b807b675 fi linux /boot/vmlinuz-4.20.12-antix.1-amd64-smp root=UUID=bc65f4e9-23b9-4e09-95f2-2146b807b675 ro vga=791 gfxsave quiet acpi_osi=! acpi_osi=Windows i915.preliminary_hw_support=1 initrd /boot/initrd.img-4.20.12-antix.1-amd64-smp } submenu 'Advanced options for antiX 19 (19) (on /dev/sda4)' $menuentry_id_option 'osprober-gnulinux-advanced-bc65f4e9-23b9-4e09-95f2-2146b807b675' { menuentry 'antiX-19 Marielle Franco (on /dev/sda4)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.20.12-antix.1-amd64-smp--bc65f4e9-23b9-4e09-95f2-2146b807b675' { insmod part_gpt insmod ext2 set root='hd0,gpt4' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 bc65f4e9-23b9-4e09-95f2-2146b807b675 else search --no-floppy --fs-uuid --set=root bc65f4e9-23b9-4e09-95f2-2146b807b675 fi linux /boot/vmlinuz-4.20.12-antix.1-amd64-smp root=UUID=bc65f4e9-23b9-4e09-95f2-2146b807b675 ro vga=791 gfxsave quiet acpi_osi=! acpi_osi=Windows i915.preliminary_hw_support=1 initrd /boot/initrd.img-4.20.12-antix.1-amd64-smp } } menuentry 'antiX 19 (19) (on /dev/sda9)' --class antix --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-d4ea1368-1350-4251-b942-d27acc5a40c5' { insmod part_gpt insmod ext2 set root='hd0,gpt9' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt9 --hint-efi=hd0,gpt9 --hint-baremetal=ahci0,gpt9 d4ea1368-1350-4251-b942-d27acc5a40c5 else search --no-floppy --fs-uuid --set=root d4ea1368-1350-4251-b942-d27acc5a40c5 fi linux /boot/vmlinuz-4.20.12-antix.1-amd64-smp root=/dev/sda9 initrd /boot/initrd.img-4.20.12-antix.1-amd64-smp } submenu 'Advanced options for antiX 19 (19) (on /dev/sda9)' $menuentry_id_option 'osprober-gnulinux-advanced-d4ea1368-1350-4251-b942-d27acc5a40c5' { menuentry 'antiX 19 (19) (on /dev/sda9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.20.12-antix.1-amd64-smp--d4ea1368-1350-4251-b942-d27acc5a40c5' { insmod part_gpt insmod ext2 set root='hd0,gpt9' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt9 --hint-efi=hd0,gpt9 --hint-baremetal=ahci0,gpt9 d4ea1368-1350-4251-b942-d27acc5a40c5 else search --no-floppy --fs-uuid --set=root d4ea1368-1350-4251-b942-d27acc5a40c5 fi linux /boot/vmlinuz-4.20.12-antix.1-amd64-smp root=/dev/sda9 initrd /boot/initrd.img-4.20.12-antix.1-amd64-smp } }Any ideas on how to better identify the partitions when I boot without breaking Grub or OS-Prober?
August 14, 2020 at 9:30 pm #40288Memberolsztyn
::Thank you BobC!
I have been looking for ways to do about the same as you do, if I understand this well at this late hour…
I have not spent a great deal of time on finding the optimal solution to this but aside from editing Grub menu entries, which is static I found myself using a Grub function built into antiX – the capability to dynamically find all Grub bootloaders and Grub menu entries and present a menu of bootable systems by partition and partition labels to select which one to boot.
The way it is built into antiX is unfortunately nested from ‘Boot Rescue Menus’ on Grub menu. Upon selecting ‘Boot Rescue Menus’ a submenu is:
– Find Grub bootloaders
– Find Grub menus
– Find Windows bootloadersMy preferred choice is ‘Find Grub menus’, but similarly for bootloaders disk is searched and presents all bootable systems specifying partition and label to select to boot.
Your project is interesting and goes beyond that – to simplify such menus, add more info up-front rather than nested as submenu…- This reply was modified 2 years, 8 months ago by olsztyn.
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 14, 2020 at 10:03 pm #40290ModeratorBobC
August 15, 2020 at 12:05 am #40292ModeratorBobC
::I modified /etc/grub.d/10_linux and /etc/grub.d/30_os-prober to also display the label of the partition on the main menu entry on the boot screen. I’ll add a pic later. It’s not perfect, as they have the on string already including the parentheses on each side, and so my label looks a little out of place being after the closing one.
It does make it easier to tell what the heck you are booting 🙂
After looking at the GNU site, I seriously doubt they would do anything with something I came up with, but if one of the Devs here would look at my code, and tweak if needed, maybe they might if they didn’t think it would break anything. Anyway, I needed it for me. It was getting crazy with a bunch of machines trying to remember what the contents and purpose of each partition was.
- This reply was modified 2 years, 8 months ago by BobC.
Attachments:
August 15, 2020 at 12:19 am #40295ModeratorBobC
::Another post disappeared…
Here is the pic again. Note the partition labels at the ends of the linux lines
I modified /etc/grub.d/10_linux and /etc/grub.d/30_os-prober to also display the label of the partition on the main menu entry on the boot screen. The code’s not perfect, as they have the on string already including the parentheses on each side, and so my label looks a little out of place being after the closing one.
It does make it easier to tell what the heck you are booting 🙂
After looking at the GNU site, I seriously doubt they would do anything with something I came up with, but if one of the Devs here would look at my code, and tweak if needed, maybe they might if they didn’t think it would break anything. Anyway, I needed it for me. It was getting crazy with a bunch of machines trying to remember what the contents and purpose of each partition was.
- This reply was modified 2 years, 8 months ago by BobC.
- This reply was modified 2 years, 8 months ago by BobC.
August 15, 2020 at 6:48 am #40305Memberolsztyn
::I don’t see those options on my Grub menu’s anywhere. How do you get to them?
If you boot antiX Live USB all this is part of boot menus. Just select ‘Switch to Grub bootloader’ and all menus are nested from there. It might be that after install to hd menus are reduced. Currently I do not have any antiX installed in traditional way, all Frugals and Live instances, but will install later today to see if Grub menus are being reduced. In any case all Grub menus from Live can be copied to hd and all those functions will be there as well.
Some pictures of the sequence of my boot menus attached. Some menu entries are edited to simplify titles and also some useless entries, such as memtest removed.
- This reply was modified 2 years, 8 months ago by olsztyn.
Attachments:
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 15, 2020 at 8:03 am #40319ModeratorBobC
::Hmmmm, I don’t have those on mine, so maybe they only appear if its an EFI system. I think I saw that first screen once when booting from flashdrive on an EFI machine.
Given the latest on viruses, I may be switching to using a backup machine booted in frugal mode without persistence for all internet browsing. I suppose I will find more challenges when I try to do that…
August 15, 2020 at 8:41 am #40326Memberolsztyn
::Hmmmm, I don’t have those on mine, so maybe they only appear if its an EFI system.
Just to clarify, the first boot menu when you boot Live USB contains other menu entries, such as memtest. I modified this boot menu so only useful entries remained and edited menu entries so it may look somewhat different than default. However the important menu enty ‘Switch to grub Bootloader’ was originally on default antiX boot menu, so unless you removed that menu entry it should be there. I am using antiX 19.2 Hannie Schaft but menu entries did not change since previous version.
I slightly modified subsequent menu entries too, such as included ‘Frugals’ submenu, but if you just select ‘Switch to grub Bootloader’ from the initial menu you will see there is little difference from the pictures.
I ran into complexities of Grub config files so for the time being i kept nesting structure of default antiX but your project seems much more ambitious – to simplify discovery of all systems on your HD and present clear menu with appropriate labels up-front rather than nested as in my case or the default antiX.Just to add, I learned how to edit these Grub menus from Xecure, who explained in details in another post…
Thanks Xecure!- This reply was modified 2 years, 8 months ago by olsztyn.
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 15, 2020 at 9:02 am #40328ModeratorBobC
::I haven’t done anything to change the boot, but it is based on a respin with very few changes, not the original antiX 19.2 flashdrive. It’s the same one that I posted recently on my respin thread.
August 15, 2020 at 9:57 am #40331ModeratorBobC
::Yes, I found the labels there as you said. Too bad they don’t also appear on the Grub menu after install.
Also, I did a test and “Switch to grub Bootloader” disappears when you create a respin of the same distro.
Maybe it doesn’t disappear if you do everything via the flashdrive and remaster instead? It’s very handy to see the labels when deciding what partition to boot from.
I found the other thread, I think…
https://www.antixforum.com/forums/topic/i-cant-set-persistence/Hadn’t seen that one…
August 15, 2020 at 10:08 am #40334Memberolsztyn
::Maybe it doesn’t disappear if you do everything via the flashdrive and remaster instead? It’s very handy to see the labels when deciding what partition to boot from.
I have done many remasters, copying Live USB through Live USM Maker and created many Frugals, multiple of them residing on the same partition and nothing disappeared from the boot menus. In fact, all modifications to boot menus I made are being preserved when cloning or remaster.
Too bad the critical menu item ‘Boot Rescue menus’ disappear when you install antiX traditional way – I rely here on your experience as I did not have a chance to install one today. This menu item is critical to dynamic discovery of systems installed on HD and allows to select to boot any from that menu.
Very handy boot menu if you have multiple Linux installed and/or Frugals on the drive.
I wish antiX had such critical menu entry on the up-front screen rather than nested below.- This reply was modified 2 years, 8 months ago by olsztyn.
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 16, 2020 at 8:09 am #40353Memberseaken64
::I also run into this problem. It has always annoyed me that grub assigns some generic name to a distro instead of the actual distro name. For instance “Debian” instead of Q4OS, or “Slackware” instead of Vector Linux. At least antiX and MX are listed as “antiX” or “MX” instead of Debian.
I have not attempted any modification of the config files as you have. But I may try that. Instead I have resorted to a simple text file that I keep on the boot drive and/or a shared partition. If I forget which distro is in which partition I boot into my main distro, the one controlling the boot, and open and read the text file. I update the text file each time I make a change to the partitions.
I have also used an even more old fashioned solution, a piece of notepaper folded and placed under the keyboard.
I also have use a SuperGrub CD. And from what it looks like this ability is also now on the antiX live USB.
I will follow this topic and maybe try my hand at some script modifications according to your success. I am a little uncomfortable modifying the default scripts since I am not very good at programming and I may forget that I made modifications. Or an upgrade overwrites it all anyway.
Seaken64
August 16, 2020 at 10:21 am #40361Moderator
Brian Masinick
::For those who are having difficulty modifying the GRUB menu, check out:
http://www.gnu.org/software/grub/manual/grub/grub.html contains the full GNU GRUB Manual. As of August 16, 2020, this is Version 2.04 of the GRUB 2 manual.
In particular, if you are having problems you may want to manually change some features of the configuration files in /etc/grub.d. The manual covers this in detail; the examples on the system show the actual configuration, which can be modified.
Some sections of particular interest:
4.1 Installing GRUB using grub-install
5.1 How to boot operating systems
5.1.2 Chain-loading an OS
5.3.2 GNU/Linux16.1.1 menuentry – this may be of particular interest to those who want to modify the displayed menu entry.
Normally you do not directly EDIT grub.cfg – this is commented at the top of the file:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
You CAN edit the file, understanding that the next update-grub will overwrite the file. You may want to do this to see what
is changed when you modify a menu entry, a color, or an image.For instance:
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=yellow/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###To make something like this permanent, edit the file /etc/grub.d/05_debian theme
--
Brian MasinickAugust 16, 2020 at 11:39 am #40366Memberolsztyn
::I also run into this problem. It has always annoyed me that grub assigns some generic name to a distro instead of the actual distro name. For instance “Debian” instead of Q4OS, or “Slackware” instead of Vector Linux. At least antiX and MX are listed as “antiX” or “MX” instead of Debian.
I have not attempted any modification of the config files as you have. But I may try that. Instead I have resorted to a simple text file that I keep on the boot drive and/or a shared partition. If I forget which distro is in which partition I boot into my main distro, the one controlling the boot, and open and read the text file. I update the text file each time I make a change to the partitions.
To me it is amazing how Grub, which should be made as simple as possible for reliability of such fundamental process as boot has been turned into such mess and not even providing basic info on installed systems and partitions. The only explanation that comes to my mind is that Grub development has been in the hands of Microsoft fifth column in order to sabotage Linux. Just look at the multitude of various ‘config’ files designed for nothing but to complicate and make it unmanageable.
That nobody raised red flags over time and this sabotage of Linux has been overlooked for such a long time, this is hard to believe…I also have use a SuperGrub CD. And from what it looks like this ability is also now on the antiX live USB.
Yes, indeed, antiX Live has all these included but these functions are unnecessarily nested too deep in menus. This is a great asset of antiX and the fact they are pretty much out of clear sight in boot menus might indicate that either antiX owner did not think it was an important asset to show up-front or perhaps was not even aware. Sorry anti – this is not a criticism but rather highlighting the real power of antiX, going beyond the typical use.
Since antiX boot process includes the capability of dynamically discovering all systems on HD (Both Linux and Windows) and shows a menu of them that includes partition, label and System, this is a great feature that people need and this feature should be made more visible up-front…Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 16, 2020 at 2:56 pm #40372Memberseaken64
::@Brian,
I used to edit the grub.cfg file and change the titles. After my edit the boot menu was just what I wanted. Then when grub is updated, or when installing a new distro and re-running the grub boot repair or update-grub, my nicely edited menu was gone and I was back to the default list. I decided to stop trying to edit the menu and just write it all down by hand or keep an updated text file. It’s just easier.
I have noticed that if I use the 40(x)_custom files and add menu entries they stay as I wrote them in the 40_custom files. So, presumably, one could just make all the entries in the 40_custom files and stop all the other files from running.
Seaken64
- This reply was modified 2 years, 8 months ago by seaken64.
-
AuthorPosts
- You must be logged in to reply to this topic.




