Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-18-2015, 07:55 AM   #1
Registered: Mar 2008
Posts: 52

Rep: Reputation: 15
GRUB2 scripts to use labels for friendly names

I am using linux mint and the grub menu gets configured automatically using scripts in /etc/grub.d. The menuentry that gets created is something like
"linux mint (on /dev/sda1)"
. I use external drives sometimes and also have linux on my harddrive which I also switch between computers. It gets confusing when it says /dev/sda2 when it means something else. It boots fine because that actual boot command uses uuid. How can I change the text of the (script generated) description to also use partition labels or uuid (or the first few chars) just so I know which install will actually boot. like this:
"Linux Mint (OFFICESSD)"
"Linux Mint (HOMEHDD)"
"Ubuntu (SANDISK)"
"Ubuntu (IMATION)"
I realise (maybe its the best way) I can change the "GRUB_TITLE=Linux Mint 17 Cinnamon 64-bit" in /etc/linuxmint/info but would rather a smoother way.

Last edited by actmnophn; 03-18-2015 at 07:57 AM.
Old 03-18-2015, 09:28 AM   #2
Registered: Mar 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Would this be considered acceptable:
onstr="$(gettext_printf "(on s) [%s]" "${DEVICE}" "${UUID}")"
to replace
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
in os-prober script. it would only work for other than running linux.

Last edited by actmnophn; 03-18-2015 at 09:39 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting a USB stick with GRUB2 and Labels ljones0 Slackware 1 02-14-2011 08:53 PM
[SOLVED] using labels in grub2. How? Mountain Linux - Software 2 07-13-2010 07:00 PM
Show useful names/labels in Konqueror media:/ arizonagroovejet Linux - Desktop 3 08-18-2008 06:26 PM
friendly advice on compiling shell scripts ShadStar Linux - Newbie 9 03-07-2007 01:39 PM
partition names and labels slinky2004 Linux - Hardware 6 12-31-2004 08:58 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration