[Solved] Grub Timer

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 this

[Solved] Grub Timer

Postby fauxpas on Fri Apr 13, 2012 8:33 pm

I have mint 12 kde dual booting on my desktop and my laptop...

On my desktop the grub loads without a timer and sits there waiting for me to make a choice... My laptop has the 30 sec timer...

I like having no timer... Can I change the way the grub works on my lappie?
Last edited by fauxpas on Sat Apr 14, 2012 9:26 am, edited 1 time in total.
User avatar
fauxpas
Level 1
Level 1
 
Posts: 22
Joined: Tue Sep 16, 2008 3:49 am

Linux Mint is funded by ads and donations.
 

Re: Grub Timer

Postby lmarmisa on Sat Apr 14, 2012 5:00 am

fauxpas wrote:I have mint 12 kde dual booting on my desktop and my laptop...

On my desktop the grub loads without a timer and sits there waiting for me to make a choice... My laptop has the 30 sec timer...

I like having no timer... Can I change the way the grub works on my lappie?


If you wish no timer, edit the file /etc/default/grub with root privileges and change the parameter GRUB_TIMEOUT to -1.

Code: Select all
# 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=0
#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"


Finally open a terminal and type the command

Code: Select all
sudo update-grub


Best regards,

Luis
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: Grub Timer

Postby sunewbie on Sat Apr 14, 2012 5:57 am

Deleted this post, refer last post

Skip my other posts

Sorry for the trouble
Last edited by sunewbie on Sat Apr 14, 2012 7:36 am, edited 5 times in total.
Linux Beginners Search Engine | more details | Google CSE Page
Acceptance = Relief, Resistance = Stress | Strength become Habit, Habit becomes Weakness
Be not a traitor in your thoughts. Do everything that is necessary in Proper time.
User avatar
sunewbie
Level 5
Level 5
 
Posts: 509
Joined: Sun Sep 04, 2011 12:55 pm
Location: Mumbai, India

Re: Grub Timer

Postby lmarmisa on Sat Apr 14, 2012 6:05 am

sunewbie wrote:the actual file name is grub.cfg.


IMHO your comment is not correct.

The actual file to edit is "/etc/default/grub".
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: Grub Timer

Postby sunewbie on Sat Apr 14, 2012 6:32 am

post deleted by sunewbie
Last edited by sunewbie on Sat Apr 14, 2012 7:36 am, edited 4 times in total.
Linux Beginners Search Engine | more details | Google CSE Page
Acceptance = Relief, Resistance = Stress | Strength become Habit, Habit becomes Weakness
Be not a traitor in your thoughts. Do everything that is necessary in Proper time.
User avatar
sunewbie
Level 5
Level 5
 
Posts: 509
Joined: Sun Sep 04, 2011 12:55 pm
Location: Mumbai, India

Re: Grub Timer

Postby sunewbie on Sat Apr 14, 2012 6:37 am

checked it at http://ubuntuforums.org/showthread.php?t=1195275 (point 5. see Grub 2 Files & Options)

Also checked Grub 2 official ubuntu documentation

it's

/boot/grub/grub.cfg

corrected in my first post.

EDIT:

Editing other options, as you have mentioned is a bit tedious, so I gave him instructions to edit grub.cfg and also mentioned a note

EDIT2:

As Luis has said, editing anything under grub.d is complex.

My apologies
Last edited by sunewbie on Sat Apr 14, 2012 7:26 am, edited 1 time in total.
Linux Beginners Search Engine | more details | Google CSE Page
Acceptance = Relief, Resistance = Stress | Strength become Habit, Habit becomes Weakness
Be not a traitor in your thoughts. Do everything that is necessary in Proper time.
User avatar
sunewbie
Level 5
Level 5
 
Posts: 509
Joined: Sun Sep 04, 2011 12:55 pm
Location: Mumbai, India

Re: Grub Timer

Postby lmarmisa on Sat Apr 14, 2012 6:51 am

sunewbie wrote:checked it at http://ubuntuforums.org/showthread.php?t=1195275 (point 5. see Grub 2 Files & Options)

Also checked Grub 2 official ubuntu documentation

it's

/boot/grub/grub.cfg

the path you mentioned is for Grub Legacy.

corrected in my first post.


Linux Mint 12 KDE uses GRUB2.

The file /boot/grub/grub.cfg should be not edited by users. This file is automatically overwritten by the command "sudo update-grub".

The file to edit by users that want to change any parameter is named /etc/default/grub. Other options could be changed modifying the contents of the files located at the folder /etc/grub.d but these options are only for experts.

The procedure should be to edit the file /etc/default/grub with superuser privileges, change the parameter GRUB_TIMEOUT to -1, save the change and finally type the command:

Code: Select all
sudo update-grub


My post is correct. You should read carefully the GRUB2 documentation.

Best regards,

Luis
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: Grub Timer

Postby sunewbie on Sat Apr 14, 2012 7:02 am

lmarmisa wrote:
sunewbie wrote:the actual file name is grub.cfg.


IMHO your comment is not correct.

The actual file to edit is "/etc/default/grub".


Sorry for the confusion.

As you have said, I re-checked it in virtualbox with Ubuntu 10.04. I am not on Linux right now. working in office.

GRUB can be edited in both ways. According to my way, as I have mentioned, Grub.cfg file can be edited, but the changes will be wiped out if you you update grub or in case if any new kernels are installed. I have changed by grub,cfg file since 2 months and i am not facing any problem.

grub can also be edited by your way. (Recommended)

Code: Select all
sudo nautilus /etc/default


for KDE

Code: Select all
sudo dolphin /etc/default


find the file named Grub

Open it and edit it as said above i.e. change to GRUB_TIMEOUT=-1

save and exit

return to terminal

Code: Select all
sudo update-grub


if it's not working

Code: Select all
sudo update-grub2


grub.cfg will be automatically updated / recreated. Upon next reboot, changes can be observed.

my way (not recommended)

open terminal <alt> <ctrl> T and run the following command

Code: Select all
sudo gedit /boot/grub/grub.cfg


KDE

I don't know the default text editor in KDE

Code: Select all
sudo kedit /boot/grub/grub.cfg


or

Code: Select all
sudo kwrite /boot/grub/grub.cfg


or

Code: Select all
sudo kate /boot/grub/grub.cfg



This will open grub.cfg file in a notepad like app called gedit.

First backup up this file or save as something like grub backup.cfg

again open grub.cfg by using above code.

then find 'GRUB_TIMEOUT' as shown in the above post. Just change the number so that now it -1

save and exit, exit terminal and reboot.

Note:

Do not run sudo update-grub

If you run, grub.cfg file will be regenerated and any changes will be gone. Incase kernels are upgraded, grub.cfg will be automatically updated, and it will loose any changes.
Last edited by sunewbie on Sat Apr 14, 2012 8:22 am, edited 2 times in total.
Linux Beginners Search Engine | more details | Google CSE Page
Acceptance = Relief, Resistance = Stress | Strength become Habit, Habit becomes Weakness
Be not a traitor in your thoughts. Do everything that is necessary in Proper time.
User avatar
sunewbie
Level 5
Level 5
 
Posts: 509
Joined: Sun Sep 04, 2011 12:55 pm
Location: Mumbai, India

Re: Grub Timer

Postby fauxpas on Sat Apr 14, 2012 8:03 am

My grub.cfg doesn't contain the text GRUB_TIMEOUT...

Curious...
User avatar
fauxpas
Level 1
Level 1
 
Posts: 22
Joined: Tue Sep 16, 2008 3:49 am

Re: Grub Timer

Postby sunewbie on Sat Apr 14, 2012 8:12 am

fauxpas wrote:My grub.cfg doesn't contain the text GRUB_TIMEOUT...

Curious...


I have updated the posts.

Please do not edit grub.cfg.

Please edit /etc/default/grub file as I and Luis (lmarmisa) have mentioned.

If the entry does not exist. Luis has given a grub file, which you can find it in /etc/default.

Just add this entry in the same order

Save and exit. then update grub.

It should work.
Linux Beginners Search Engine | more details | Google CSE Page
Acceptance = Relief, Resistance = Stress | Strength become Habit, Habit becomes Weakness
Be not a traitor in your thoughts. Do everything that is necessary in Proper time.
User avatar
sunewbie
Level 5
Level 5
 
Posts: 509
Joined: Sun Sep 04, 2011 12:55 pm
Location: Mumbai, India

Re: Grub Timer

Postby fauxpas on Sat Apr 14, 2012 9:06 am

Worked a treat... Thanks to all...

The sequence for me was...

In Konsole: sudo apt-get install gedit

In Konsole: sudo gedit /etc/default/grub

In gedit: GRUB_TIMEOUT=-1

In Konsole: sudo update-grub
Last edited by fauxpas on Sat Apr 14, 2012 9:28 am, edited 1 time in total.
User avatar
fauxpas
Level 1
Level 1
 
Posts: 22
Joined: Tue Sep 16, 2008 3:49 am

Re: Grub Timer

Postby sunewbie on Sat Apr 14, 2012 9:20 am

Hi,

nice to know that it worked :)

For KDE, you do not need to install gedit. there must be a default text editor like kate or kwrite or any other text editor

anyways gedit is a good text editor with auto syntax highlighting

Note: Please edit your last post and change insatll to install and put it in code. The reason for editing is that many newbie will simply copy paste the code.

please change:

'sudo apt-get insatll gedit'

to

Code: Select all
sudo apt-get install gedit


Please mark this as thread as [SOLVED]

To mark it as [SOLVED], Edit the first post and add the word [SOLVED] in the beginning of the subject and submit the post.
Linux Beginners Search Engine | more details | Google CSE Page
Acceptance = Relief, Resistance = Stress | Strength become Habit, Habit becomes Weakness
Be not a traitor in your thoughts. Do everything that is necessary in Proper time.
User avatar
sunewbie
Level 5
Level 5
 
Posts: 509
Joined: Sun Sep 04, 2011 12:55 pm
Location: Mumbai, India

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 28 guests