Customize MY_Grub.cfg boot menu with additional text and architecture [i386], [amd64] MX21.

Message
Author
taraxacum
Posts: 81
Joined: Fri Dec 14, 2018 7:24 pm

Customize MY_Grub.cfg boot menu with additional text and architecture [i386], [amd64] MX21.

#1 Post by taraxacum »

Code: Select all

System:    Kernel: 5.10.0-13-686-pae i686 bits: 32 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.0-13-686-pae 
           root=UUID=<filter> ro vga=791 quiet splash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.1_386 Wildflower April 9  2022 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop System: Hewlett-Packard product: HP Compaq dc7800 Convertible Minitower 
           v: N/A serial: <filter> Chassis: type: 6 serial: <filter> 
           Mobo: Hewlett-Packard model: 0AACh serial: <filter> BIOS: Hewlett-Packard 
           v: 786F1 v01.24 date: 03/18/2008 
CPU:       Info: Dual Core model: Intel Core2 Duo E8300 bits: 64 type: MCP arch: Penryn 
           family: 6 model-id: 17 (23) stepping: 6 microcode: 60F cache: L2: 6 MiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 bogomips: 11305 
           Speed: 1995 MHz min/max: 1998/2833 MHz Core speeds (MHz): 1: 1995 2: 1995 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported 
           Type: l1tf mitigation: PTE Inversion 
           Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass status: Vulnerable 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, STIBP: disabled, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel 82Q35 Express Integrated Graphics vendor: Hewlett-Packard 
           driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:29b2 class-ID: 0300 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.16.1 driver: loaded: intel 
           unloaded: fbdev,modesetting,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1280x800 s-dpi: 96 s-size: 339x212mm (13.3x8.3") 
           s-diag: 400mm (15.7") 
           Monitor-1: VGA1 res: 1280x800 hz: 60 dpi: 63 size: 520x320mm (20.5x12.6") 
           diag: 611mm (24") 
           OpenGL: renderer: Mesa DRI Intel Q35 x86/MMX/SSE2 v: 1.4 Mesa 20.3.5 
           direct render: Yes 
Audio:     Device-1: Intel 82801I HD Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus-ID: 00:1b.0 chip-ID: 8086:293e class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-13-686-pae running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel 82566DM-2 Gigabit Network vendor: Hewlett-Packard driver: e1000e 
           v: kernel port: 3100 bus-ID: 00:19.0 chip-ID: 8086:10bd class-ID: 0200 
           IF: eth0 state: down mac: <filter> 
           Device-2: Intel 82574L Gigabit Network driver: e1000e v: kernel port: 2100 
           bus-ID: 20:00.0 chip-ID: 8086:10d3 class-ID: 0200 
           IF: eth1 state: up speed: 100 Mbps duplex: full mac: <filter> 
           Device-3: Intel 82574L Gigabit Network driver: e1000e v: kernel port: 1100 
           bus-ID: 30:00.0 chip-ID: 8086:10d3 class-ID: 0200 
           IF: eth2 state: down mac: <filter> 
Drives:    Local Storage: total: 1.36 TiB used: 306.4 GiB (21.9%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD5000AADS-00S9B0 
           size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s type: N/A 
           serial: <filter> rev: 0A01 scheme: MBR 
           ID-2: /dev/sdb maj-min: 8:16 type: USB vendor: Toshiba model: External USB 3.0 
           size: 931.51 GiB block-size: physical: 512 B logical: 512 B type: N/A 
           serial: <filter> rev: 5438 scheme: MBR 
Partition: ID-1: / raw-size: 27 GiB size: 26.41 GiB (97.81%) used: 7.27 GiB (27.5%) fs: ext4 
           dev: /dev/sda5 maj-min: 8:5 
           ID-2: /home raw-size: 75 GiB size: 73.32 GiB (97.76%) used: 5.53 GiB (7.5%) fs: ext4 
           dev: /dev/sda7 maj-min: 8:7 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 10 GiB used: 40.1 MiB (0.4%) priority: -2 
           dev: /dev/sda1 maj-min: 8:1 
Sensors:   System Temperatures: cpu: 41.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     Packages: note: see --pkg apt: 2038 lib: 1016 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mirror.plusserver.com/mxlinux/mxlinux/mx/repo/ bullseye main non-free
Info:      Processes: 214 Uptime: 11h 21m wakeups: 1 Memory: 1.92 GiB used: 1.37 GiB (71.5%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Shell: Bash v: 5.1.4 running-in: quick-system-info-mx 
           inxi: 3.3.06 
Boot Mode: BIOS (legacy, CSM, MBR)

Customize MY_Grub.cfg boot menu with additional text and architecture [i386], [amd64] MX21.

When you insert the installation CD, an architecture entry of 386 or x64 is displayed.

However, after completing the installation of multiple distributions, this architecture information is not displayed in the Grub main menu.
Then the question arises, which of the distro's is the 386 version and which is the x64 version?

Furthermore, I miss the possibility to put an explanatory individual text in front of each distro in the Grub main menu.
So far I have written this text entry manually in the /boot/grub/grub.cfg file for the sake of a better overview. This is very time consuming as my entry gets overwritten and disappears with every Grub update. This process could be automated.

With this wishful thinking, I turned to the developers and, with their support (by Fehlix), have now worked out the following solution that solves the problem:


And now, dear reader!

So that you don't have to read all 30 posts and get bored, I would like to give a short version of the working solution here.

If several distributions are installed on one hard disk, a clear arrangement results:
1# Grub-Startmenü Text + Arch [i386] [amd64]_2022-06-17.png

Step 1:
In all BELOWER distributions I only edit the /etc/lsb-release file:
2# etc-lsb-release_Text-1 + Arch [amd64]_2022-06-17.png
Prefixed with my desired text. After that, I add the architecture entry manually in square brackets.
(German keyboard AltGr key + key 8 and key 9).
For reading out in the respectively started system I use terminal with entry:
dpkg --print-architectue.
After a few seconds, the read value i386 or amd64 is displayed, which I then write in the brackets:
3# Terminal_amd64_2022-06-17.png

Code: Select all

DISTRIB_DESCRIPTION="Text-1 -MX 21 Wildflower [ ]"

Step 2:
In the (first installed) controlling TOP distribution, I only edit the /etc/default/grub file:

The PRETTY_NAME value remains unchanged:
GRUB_DISTRIBUTOR="$(unset PRETTY_NAME; (. /etc/lsb-release; echo ${PRETTY_NAME:?}) 2>/dev/null || echo Debian) "
and I add four NEW lines after this line:
4# etc-default-grub_MY_GRUBMENU Text + [Arch]_2022-06-17.png

Code: Select all

MY_GRUBMENU_TEXT="Text-4"
MY_GRUBMENU_ARCH="$(dpkg --print-architecture)"
MY_DISTRIBUTOR="GRUB_DISTRIBUTOR"
eval $MY_DISTRIBUTOR="'$MY_GRUBMENU_TEXT - $GRUB_DISTRIBUTOR [$MY_GRUBMENU_ARCH]'"
A notice:
Between the superscript double dashes "
the new MY_statement is placed with a superscript single apostrophe ' in between.



In each individual distribution - starting from the bottom up - I update a new Grub.cfg file (possibly with root or password input) in the terminal: sudo update-grub.
5# Terminal_sudo update-grub_2022-05-22.png


Provided grub is installed in a separate MBR boot partition, the TOP display of the first distro will always remain the same with the same /etc/default/grub file. With each newly added distro, Grub is installed in the respective root partition (PBR) then only the respective file /etc/lsb-release is edited.
(I prefer this).

If Grub is not installed in a separate boot partition, but is installed in every root partition, the previous TOP distribution is converted into a BELOW distribution with each new installation that is added (the most recently installed distro is always at the top). As a result, the 4 additional lines from the /etc/default/grub file must be implemented accordingly - as must the /etc/lsb-release file.


I wish you the best of luck with your imitation.

Related links on this topic might be worth reading:

Code: Select all

https://www.howtogeek.com/196655/how-to-configure-the-grub2-boot-loaders-settings/
You do not have the required permissions to view the files attached to this post.
Last edited by taraxacum on Mon Jun 20, 2022 11:27 pm, edited 22 times in total.

taraxacum
Posts: 81
Joined: Fri Dec 14, 2018 7:24 pm

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#2 Post by taraxacum »

Here are the pictures of the problems described at the beginning of my post:
6# DVD MX-21 386_2022-06-17.png
7# DVD MX-21_x64_2022-06-17.png
8# mx-version MX-21_386_2022-06-21.png
9# mx-version MX-21_x64_2022-06-17.png
10# MX 21 Wildflower_2022-06-21.png
You do not have the required permissions to view the files attached to this post.
Last edited by taraxacum on Mon Jun 20, 2022 10:55 pm, edited 4 times in total.

User avatar
Eadwine Rose
Administrator
Posts: 11974
Joined: Wed Jul 12, 2006 2:10 am

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#3 Post by Eadwine Rose »

@taraxacum Please translate your German post into English, thanks.
MX-23.2_x64 July 31 2023 * 6.1.0-20-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

taraxacum
Posts: 81
Joined: Fri Dec 14, 2018 7:24 pm

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#4 Post by taraxacum »

This is what my partitioning looks like with a separate boot partition:
11# GParted_2022-05-26.png
You do not have the required permissions to view the files attached to this post.
Last edited by taraxacum on Thu May 26, 2022 3:23 pm, edited 2 times in total.

Huckleberry Finn

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#5 Post by Huckleberry Finn »

She meant this one: Hier die drei restlichen Bilder

:)

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

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#6 Post by fehlix »

taraxacum wrote: Sat Apr 23, 2022 7:31 pm It is obvious that it is a program writing error.
Please clarify this cause.
Not really sure what you are looking for. You got already a detailed answer within your other thread
about how to adjust displayed GRUB menu entries for multiple MX Linux installations:
here https://forum.mxlinux.org/viewtopic.php ... 78#p680578
In case you have a detailed question, please reformulate the question, so I can understand.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

taraxacum
Posts: 81
Joined: Fri Dec 14, 2018 7:24 pm

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#7 Post by taraxacum »

fehlix wrote: Sun Apr 24, 2022 11:17 am
taraxacum wrote: Sat Apr 23, 2022 7:31 pm It is obvious that it is a program writing error.
Please clarify this cause.
Not really sure what you are looking for. You got already a detailed answer within your other thread
about how to adjust displayed GRUB menu entries for multiple MX Linux installations:
here https://forum.mxlinux.org/viewtopic.php ... 78#p680578
In case you have a detailed question, please reformulate the question, so I can understand.

taraxacum
Posts: 81
Joined: Fri Dec 14, 2018 7:24 pm

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#8 Post by taraxacum »

fehlix wrote: Sun Apr 24, 2022 11:17 am
taraxacum wrote: Sat Apr 23, 2022 7:31 pm It is obvious that it is a program writing error.
Please clarify this cause.
Not really sure what you are looking for. You got already a detailed answer within your other thread
about how to adjust displayed GRUB menu entries for multiple MX Linux installations:
here https://forum.mxlinux.org/viewtopic.php ... 78#p680578
In case you have a detailed question, please reformulate the question, so I can understand.

I revised my request again and copied the contents of the files and pasted them with the >/< key, as you explained to me.

I hope this makes it easier for you to read.

I will therefore describe the core problem again as follows:

For the creation of the grub.cfg, the system looks for the system-relevant information from any files, probably not all known to me yet. So why doesn't the system find the -386 or x64 specification? What is the reason that this information is not read in?
If these two values were visible in the Grub menu, then I could distinguish which is the -386- and which is the x64 version ?

User avatar
dolphin_oracle
Developer
Posts: 20032
Joined: Sun Dec 16, 2007 1:17 pm

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#9 Post by dolphin_oracle »

If you hide the flat menus option in mx boot options the kernel for each entry will be displayed. The kernel name includes the architecture.
You do not have the required permissions to view the files attached to this post.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

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

Re: MX21 Grub start menu no entries i386 or x64 - on the monitor.

#10 Post by fehlix »

taraxacum wrote: Sat May 14, 2022 3:34 am For the creation of the grub.cfg, the system looks for the system-relevant information from any files, probably not all known to me yet. So why doesn't the system find the -386 or x64 specification? What is the reason that this information is not read in?
Good question. I assume the GRUB developer assumed user would always
install Linux within the the architecture of the system.
But you are right on 64bit system you can also install 32bit i386 Linux.
But the main grub menu entries would not have the architecture information.
Except, if you enable "flat menus" ( i.e. without any sub-menus), the information would be visisble
with the displayed kernel version ( as just mentioned by Dolphin_Oracle)
taraxacum wrote: Sat May 14, 2022 3:34 am If these two values were visible in the Grub menu, then I could distinguish which is the -386- and which is the x64 version ?
Within you other thread I have shown how to add the architecture directly into the GRUB menu entry titel
( i.e if you keep submenu enabled):
https://forum.mxlinux.org/viewtopic.php ... 61#p683461
which is shown here again as an example:
Within /etc/default/grub
my addtional lines at the end or below the unchanged GRUB_DISTRIBUTOR= line:

Example for MX 21.1 AHS:
/etc/default/grub

Code: Select all

GRUB_DISTRIBUTOR="$(unset PRETTY_NAME; (. /etc/lsb-release; echo ${PRETTY_NAME:?}) 2>/dev/null || echo Debian)"
#-----------------------------------------------------------------------
# my additions
MY_GRUBMENU_TEXT="MX211AHS"
MY_GRUBMENU_ARCH="$(dpkg --print-architecture)"
MY_DISTRIBUTOR="GRUB_DISTRIBUTOR"
eval $MY_DISTRIBUTOR="'$MY_GRUBMENU_TEXT - $GRUB_DISTRIBUTOR [$MY_GRUBMENU_ARCH]'"
#-----------------------------------------------------------------------
and one change of DISTRIB_DESCRIPTION= within
/etc/lsb-release:

Code: Select all

DISTRIB_DESCRIPTION="MX211AHS - MX 21.1 Wildflower [amd64]"
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “General”