LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-18-2015, 06:55 AM   #1
actmnophn
Member
 
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
Code:
"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:
Code:
"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 06:57 AM.
 
Old 03-18-2015, 08:28 AM   #2
actmnophn
Member
 
Registered: Mar 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Would this be considered acceptable:
Code:
onstr="$(gettext_printf "(on s) [%s]" "${DEVICE}" "${UUID}")"
to replace
Code:
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 08:39 AM.
 
  


Reply


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 07:53 PM
[SOLVED] using labels in grub2. How? Mountain Linux - Software 2 07-13-2010 06:00 PM
Show useful names/labels in Konqueror media:/ arizonagroovejet Linux - Desktop 3 08-18-2008 05:26 PM
friendly advice on compiling shell scripts ShadStar Linux - Newbie 9 03-07-2007 12:39 PM
partition names and labels slinky2004 Linux - Hardware 6 12-31-2004 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:14 PM.

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