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

Message
Author
User avatar
fehlix
Developer
Posts: 12883
Joined: Wed Apr 11, 2018 5:09 pm

Re: Grub.cfg text entry 'UserName - '

#31 Post by fehlix »

taraxacum wrote: Fri May 13, 2022 6:29 pm Here's a summary of the end result:

In all BELOWER distros I only edit the /etc/lsb-release file:
Value: DISTRIB_DESCRIPTION="UserName-1 MX 21 Wildflower"

In the controlling TOP distro, I only edit the /etc/default/grub file:
The PRETTY_NAME value is left unedited and I add two NEW lines after the GRUB_DISTRIBUTOR= line:

MY_DISTRIBUTOR="GRUB_DISTRIBUTOR"
eval $MY_DISTRIBUTOR=" 'UserName-3 $GRUB_DISTRIBUTOR' "

Do you agree and are satisfied with this overall result? Or do you have any questions or suggestions?
If not, I would close this thread and mark it as SOLVED.
Good summary. Two requests:
* mark this thread as [Solved]
* change the topic/thread title (edit your first post) to something, which reflects a bit more what this issue actually is about.
So other user might get an better idea. I mean "Grub.cfg text entry 'UserName - '" as a title is not really something
someone reading this has an idea what the point of this thread is.
Suggest something like "How to adjust grub menu entry with additional text", or something else.
You can also edit the first post and describe the "problem space" with some words and the "working solution" to "fix" the issue.
I guess other users may have a similar desire, so better generalize your description in order to help other users
to understand.
Thanks

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

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

#32 Post by taraxacum »

fehlix wrote: Fri May 13, 2022 7:04 pm
Good summary. Two requests:
* mark this thread as [Solved]
* change the topic/thread title (edit your first post) to something, which reflects a bit more what this issue actually is about.
So other user might get an better idea. I mean "Grub.cfg text entry 'UserName - '" as a title is not really something
someone reading this has an idea what the point of this thread is.
Suggest something like "How to adjust grub menu entry with additional text", or something else.
You can also edit the first post and describe the "problem space" with some words and the "working solution" to "fix" the issue.
I guess other users may have a similar desire, so better generalize your description in order to help other users
to understand.
Thanks
[/quote]

I've revised my post again and corrected the headlines. Before I mark the post as solved, I'll ask again to be on the safe side - because I assume that I won't be able to make any changes afterwards. Does this now correspond to your ideas?
Last edited by taraxacum on Tue Jun 21, 2022 10:45 am, edited 1 time in total.

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

Re: Grub.cfg text entry 'UserName - '

#33 Post by fehlix »

taraxacum wrote: Fri May 13, 2022 10:41 pm I've revised my post again and corrected the headlines. Before I mark the post as solved, I'll ask again to be on the safe side - because I assume that I won't be able to make any changes afterwards. Does this now correspond to your ideas?
Thanks. Looks good.
Some additions, if you want to show the architecture within the grub menu text directly:

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]"

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

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

#34 Post by taraxacum »

fehlix wrote: Fri May 13, 2022 7:04 pm
Good summary. Two requests:
* mark this thread as [Solved]

You can also edit the first post and describe the "problem space" with some words and the "working solution" to "fix" the issue.
I guess other users may have a similar desire, so better generalize your description in order to help other users
to understand.
Thanks
[/quote]


In the meantime I have written both contributions identically, since my problem can be summarized in one solution. I edited my first two posts again.

My request is that you read my first and second contribution again at the end and see if you still have any suggestions for improvement.

Otherwise I'm happy with the solution. I've learned a lot since then, especially how to work on your forum website. Thanks.
Last edited by taraxacum on Tue Jun 21, 2022 10:46 am, edited 1 time in total.

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

Re: Grub.cfg text entry 'UserName - '

#35 Post by fehlix »

taraxacum wrote: Sun Jun 05, 2022 5:28 pm My request is that you read my first and second contribution again at the end and see if you still have any suggestions for improvement.
I think there is a space after the first "$" in the last line of the CODE-block in your post #1):

Code: Select all

eval $ MY_DISTRIBUTOR=" '$MY_GRUBMENU_TEXT - $GRUB_DISTRIBUTOR [$MY_GRUBMENU_ARCH]' "

which should be:

Code: Select all

eval $MY_DISTRIBUTOR=" '$MY_GRUBMENU_TEXT - $GRUB_DISTRIBUTOR [$MY_GRUBMENU_ARCH]' "


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

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

#36 Post by taraxacum »

xaol wrote: Fri Apr 15, 2022 10:58 pm thank you for the correction. does that mean in the case of the ones used in the example, the point release won't get updated in those fields? i.e. the others will say 21.2, but pretty_name and distrib_description would stay 21.1 as they were?

In the meantime I have revised my posts and wrote a summary for a solution in the first and second post.
Thank you for your reply.
Last edited by taraxacum on Tue Jun 21, 2022 10:47 am, edited 1 time in total.

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

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

#37 Post by taraxacum »

fehlix wrote: Sun Jun 05, 2022 6:33 pm
taraxacum wrote: Sun Jun 05, 2022 5:28 pm My request is that you read my first and second contribution again at the end and see if you still have any suggestions for improvement.
I think there is a space after the first "$" in the last line of the CODE-block in your post #1):

Code: Select all

eval $ MY_DISTRIBUTOR=" '$MY_GRUBMENU_TEXT - $GRUB_DISTRIBUTOR [$MY_GRUBMENU_ARCH]' "

which should be:

Code: Select all

eval $MY_DISTRIBUTOR=" '$MY_GRUBMENU_TEXT - $GRUB_DISTRIBUTOR [$MY_GRUBMENU_ARCH]' "

Thanks for the correction - I probably wouldn't have noticed. I had used the correct spelling in my applications on the PC. I probably put a cursor there while editing.......I was pretty tired and sleepy.
I also improved the explanation with " and ' and removed the tab in between ... better that way.

Post Reply

Return to “General”