Need to customize GRUB

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
NightScreams
Level 1
Level 1
Posts: 9
Joined: Wed Jul 11, 2012 9:37 pm

Need to customize GRUB

Post by NightScreams »

I want to remove in GRUB, the "memtest options and "recovery linux" from Grub...so all that is shows me is Mint or Windows. i don't really need those other options, but mostly i want to quickly switch between the 2 with fewer key presses.

So can someone show me an edited Grub config file that will do this for me?
thanks
User avatar
ZubenElgenubi
Level 2
Level 2
Posts: 68
Joined: Wed Jul 11, 2012 9:39 pm
Location: Mx

Re: Need to customize GRUB

Post by ZubenElgenubi »

I dunno how do that, but you can use BURG (graphical frontend for GRUB, if you are interested I can help you, is a lot easy :) ).
User avatar
Ginsu543
Level 4
Level 4
Posts: 449
Joined: Thu Nov 24, 2011 3:15 am
Location: Los Angeles, CA, USA

Re: Need to customize GRUB

Post by Ginsu543 »

NightScreams wrote:I want to remove in GRUB, the "memtest options and "recovery linux" from Grub...so all that is shows me is Mint or Windows. i don't really need those other options, but mostly i want to quickly switch between the 2 with fewer key presses.

So can someone show me an edited Grub config file that will do this for me?
thanks
Assuming you're running Grub2:

To remove the memtest86+ option from the Grub menu:
1) Go to Terminal
2) cd /etc/grub.d
3) Make the file "20_memtest86+" non-executable by issuing the following command:

Code: Select all

sudo chmod -x 20_memtest86+
To remove recovery mode:
1) Go to Terminal
2) cd /etc/default
3) Edit the "grub" file:

Code: Select all

gksu gedit grub
4) Uncomment the following line by deleting the # sign:

Code: Select all

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
After making the above changes, update grub by issuing the following command in Terminal:

Code: Select all

sudo update-grub
When you reboot, that should get you what you want.

Just FYI, you don't want to make changes to grub by directly editing the grub.cfg file because it is not a permanent file. Every time grub is updated (e.g., if you were to upgrade your kernel), grub.cfg gets overwritten and you would lose all the changes you made to it. Instead, you make changes to /etc/default/grub or the various scripts in /etc/grub.d/ and then run "sudo update-grub" to have grub itself generate the grub.cfg for you.

Hope that helps.
Main: Intel Core i7 920 D0 @ 4.0 GHz | Asus P6X58D Premium | 12 GB Mushkin Redline PC3-12800 7-8-7-24 | EVGA GeForce GTX 560 Ti | Mint 17.2 Cinnamon 64 / OS X 10.7.3
Portables: Toshiba Portege R200 | Mint 17.2 Cinnamon 32 / Dell Mini 9 | OS X 10.6.7
User avatar
kyphi
Level 9
Level 9
Posts: 2712
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter Valley, Australia

Re: Need to customize GRUB

Post by kyphi »

Install grub-customizer

Code: Select all

sudo apt-get install grub-customizer
When you run the program (it takes a few seconds to read all the information), take the tick out of the boxes next to memtest. Save and exit.
Linux Mint 20.1 Cinnamon
User avatar
I2k4
Level 5
Level 5
Posts: 709
Joined: Thu Feb 02, 2012 8:33 pm

Re: Need to customize GRUB

Post by I2k4 »

Agree with using Grub Customizer. Worked great to delete useless items and to reorder the choices (I wanted Windows 7 to be first / default.) However, I did find that "Recovery Console" choice useful when I had an unexpected problem so would caution against deleting it until you're sure your installation is bullet proof.
TRUST BUT VERIFY any advice from anybody, including me. Mint/Ubuntu user since 10.04 LTS. LM20 64 bit XFCE (Dell 1520). Dual booting LM20 XFCE / Win7 (Lenovo desktop and Acer netbook).
NightScreams
Level 1
Level 1
Posts: 9
Joined: Wed Jul 11, 2012 9:37 pm

Re: Need to customize GRUB

Post by NightScreams »

THANKS a ton. i have plenty more stupid questions in additional threads over the coming weeks. i also will be asking some retarded questions and maybe toss in a vegetable question in as well. your attendances are heavily suggested. :wink:
Post Reply

Return to “Newbie Questions”