LinuxQuestions.org
Review your favorite Linux distribution.
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 01-14-2017, 12:13 PM   #1
henrig
Member
 
Registered: Jan 2016
Location: UK
Distribution: Linux Mint
Posts: 44

Rep: Reputation: Disabled
GRUB editing


I have installed Ubuntu Mate alongside Linux Mint and other OSes. I believe grub from ubuntu has overwritten the previous grub.
I now want to edit grub so it boots into Mint by default and straightaway, without showing me the boot options. So I will need to edit Ubuntu's grub file.
That means Ubuntu's grub file will boot me straight to Mint without showing me the boot options.

But in the future if I wish to modify this grub file again, I cannot boot into Ubuntu to make the changes to its grub file. Can I access it from Mint and make the changes successfully? I've managed that but got stuck when it came to running update-grub. How do I specify which grub?

Alternatively, is there a way for me to get Linux Mint's grub file to take over or overwrite Ubuntu's grub file? So if I want to make changes to grub in the future, I'll be in the right OS.

Mint is my default OS by the way, so I'd rather control everything from it.
 
Old 01-14-2017, 12:39 PM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,197

Rep: Reputation: 164Reputation: 164
Just read through the grub manual here: https://www.gnu.org/software/grub/manual/grub.html

Can you post the grub2.conf file here?
 
Old 01-14-2017, 12:44 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,893

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Quote:
Originally Posted by henrig View Post
Alternatively, is there a way for me to get Linux Mint's grub file to take over or overwrite Ubuntu's grub file? So if I want to make changes to grub in the future, I'll be in the right OS.
Yes. Boot into Mint and run two grub instructions as root. grub-mkconfig creates a grub configuration file on Mint which will also include Ubuntu:

grub-mkconfig -o /boot/grub/grub.cfg

Then install the Mint grub on your boot device:

grub-install /dev/sda
(or whichever device you boot from)

-------------------------
Steve Stites
 
2 members found this post helpful.
Old 01-15-2017, 04:04 AM   #4
henrig
Member
 
Registered: Jan 2016
Location: UK
Distribution: Linux Mint
Posts: 44

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jailbait View Post
Yes. Boot into Mint and run two grub instructions as root. grub-mkconfig creates a grub configuration file on Mint which will also include Ubuntu:

grub-mkconfig -o /boot/grub/grub.cfg

Then install the Mint grub on your boot device:

grub-install /dev/sda
(or whichever device you boot from)

-------------------------
Steve Stites
Works a treat, thanks.
By the way, what's the difference with running grub-mkconfig and update-grub?
Both seem to give the same output in CLI. Though when I ran update-grub previously in Mint, I didn't remember seeing the last OS installed, Ubuntu, in the output.


For some reason, I'm unable to edit my grub and get my PC to boot directly to the selected OS.

I've edited my grub file in /etc/default/grub according to documentation.

I've uncommented #GRUB_HIDDEN_TIMEOUT=0
and set GRUB_TIMEOUT=0
but it defaults to 10 sec and the menu is displayed.

If I change to GRUB_TIMEOUT=-1, there is no countdown (as expected) but the menu is still displayed.
If I remove GRUB_HIDDEN_TIMEOUT=0 (comment it out again)
and set GRUB_TIMEOUT=0
I still get a countdown from 10 sec. The quickest boot I can get is 1 sec.
Basically, GRUB_HIDDEN_TIMEOUT doesn't work and GRUB_TIMEOUT=0 with this value doesn't work either.
I run update-grub after saving all changes.

Here's the content of the grub file I am now currently using:



# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
 
Old 01-15-2017, 05:14 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,426
Blog Entries: 10

Rep: Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249
Quote:
Originally Posted by henrig View Post
By the way, what's the difference with running grub-mkconfig and update-grub?
update-grub is just a shortcut for 'grub-mkconfig -o /boot/grub/grub.cfg'.
update-grub is not present on all linux systems, grub-mkconfig is.
 
Old 01-15-2017, 11:44 AM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,893

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Quote:
Originally Posted by henrig View Post

I've uncommented #GRUB_HIDDEN_TIMEOUT=0
and set GRUB_TIMEOUT=0
but it defaults to 10 sec and the menu is displayed.

If I change to GRUB_TIMEOUT=-1, there is no countdown (as expected) but the menu is still displayed.
If I remove GRUB_HIDDEN_TIMEOUT=0 (comment it out again)
and set GRUB_TIMEOUT=0
I still get a countdown from 10 sec. The quickest boot I can get is 1 sec.
Basically, GRUB_HIDDEN_TIMEOUT doesn't work and GRUB_TIMEOUT=0 with this value doesn't work either.
I think that you have run into a bug in grub:

https://bugs.launchpad.net/ubuntu/+s...2/+bug/1258597

If you want to fix the bug then you can report the bug here:

https://www.gnu.org/software/grub/grub-bugs.html

-----------------------
Steve Stites
 
1 members found this post helpful.
  


Reply

Tags
grub


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
grub menu - can't remove thru editing etc/default/grub eco_bach Linux - Newbie 13 12-14-2016 01:15 PM
Editing Grub. borntorunes Linux - Newbie 10 10-05-2009 06:16 AM
editing in GRUB deretsigernu Linux - General 2 09-04-2007 07:12 AM
DualBooting with GRUB ; Need Help Editing GRUB blooperspree Linux - Software 2 11-04-2006 11:23 AM
Grub Editing hoe Linux - General 2 11-07-2004 06:45 PM

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

All times are GMT -5. The time now is 02:17 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
Open Source Consulting | Domain Registration