[Solved] Edit Grub Timeout

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
Dumfy
Level 1
Level 1
Posts: 24
Joined: Thu Oct 15, 2015 8:35 am

[Solved] Edit Grub Timeout

Post by Dumfy » Sun Oct 13, 2019 7:26 pm

Hi all,

How can I edit the Grub Timeout at boot so that the screen will just wait until I make a selection? All that I've read says use the following command . . .

Press Alt + F2, type gksudo gedit /etc/default/grub but I always receive an error saying Failed To Execute Child Process "gksudo" (no such file or directory)

This is using Mint 19.2 Tina. I'm a newbie having decided to try Mint again.

Also a second question if I may please . . . .
I'm dual booting with Win 10 and at some point (from past experience) Windows will change or overwrite Grub and I'll only be able to boot into Windows. How do I get the Grub boot manager back when that happens?

With thanks and kind regards
Last edited by Dumfy on Mon Oct 14, 2019 8:10 am, edited 1 time in total.

User avatar
blueocean
Level 5
Level 5
Posts: 723
Joined: Sun Jul 08, 2018 11:50 pm

Re: Edit Grub Timeout

Post by blueocean » Sun Oct 13, 2019 8:05 pm

For repairing after Windows disables it, I use a live session (the USB installer). Boot to the live session and open a terminal:
Add each of these and press enter after each one:

Code: Select all

sudo add-apt-repository ppa:yannubuntu/boot-repair

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get install -y boot-repair && boot-repair
Once it's installed follow the prompts and choose default repair.
It's pretty easy and works quit well for what you want.

As far as editing your grub timeout, I'll let someone else give that fix. Me, I navigate to etc folder in files and right click and open as root, manually edit etc/default/grub and put a 10 in GRUB_TIMEOUT=0 instead of the 0, then save the file and run sudo update-grub in the terminal. I advise making a Timeshift restore snapshot before doing any of the above changes.
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.

User avatar
Larry78723
Level 7
Level 7
Posts: 1545
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Edit Grub Timeout

Post by Larry78723 » Sun Oct 13, 2019 8:27 pm

+1 on your instructions, blueocean.
Image

User avatar
blueocean
Level 5
Level 5
Posts: 723
Joined: Sun Jul 08, 2018 11:50 pm

Re: Edit Grub Timeout

Post by blueocean » Sun Oct 13, 2019 8:41 pm

Larry78723 wrote:
Sun Oct 13, 2019 8:27 pm
+1 on your instructions, blueocean.
Thanks, hopefully it will help the poster.
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.

all41
Level 15
Level 15
Posts: 5691
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Edit Grub Timeout

Post by all41 » Sun Oct 13, 2019 9:25 pm

Dumfy wrote:
Sun Oct 13, 2019 7:26 pm
Hi all,

How can I edit the Grub Timeout at boot so that the screen will just wait until I make a selection? All that I've read says use the following command . . .

Press Alt + F2, type gksudo gedit /etc/default/grub but I always receive an error saying Failed To Execute Child Process "gksudo" (no such file or directory)

This is using Mint 19.2 Tina. I'm a newbie having decided to try Mint again.

Also a second question if I may please . . . .
I'm dual booting with Win 10 and at some point (from past experience) Windows will change or overwrite Grub and I'll only be able to boot into Windows. How do I get the Grub boot manager back when that happens?

With thanks and kind regards
also see:
viewtopic.php?f=46&t=299742

User avatar
zcot
Level 5
Level 5
Posts: 544
Joined: Wed Oct 19, 2016 6:08 pm

Re: Edit Grub Timeout

Post by zcot » Sun Oct 13, 2019 9:49 pm

Boot-repair is already included in the live session, so no need to install that ppa and program, just boot to the usb/dvd and use it.

Also, for editing system files, gksu was removed from Ubuntu starting with the 18.x version(equal with Mint 19.x). We can use a variety of alternate options:
1. xed admin:///etc/default/grub uses the resident gvfs functionality
2. sudoedit /etc/default/grub (this probably opens vi/vim or nano instead as the default, otherwise you can export xed as default, I have done that export EDITOR=xed in ~/.bashrc file so it's easy using that direct command, otherwise the command could be EDITOR=xed sudoedit /etc/default/grub
3. pkexec xed /etc/default/grub (but in this case you need to make sure there is a polkit definition for the xed program, which there is not by default, although you can get a user created one here: https://github.com/linuxmint/xed/issues/238 )

-you can read further about these options here: viewtopic.php?f=61&t=268140

User avatar
blueocean
Level 5
Level 5
Posts: 723
Joined: Sun Jul 08, 2018 11:50 pm

Re: Edit Grub Timeout

Post by blueocean » Sun Oct 13, 2019 10:03 pm

zcot wrote:
Sun Oct 13, 2019 9:49 pm
Boot-repair is already included in the live session, so no need to install that ppa and program, just boot to the usb/dvd and use it.

Also, for editing system files, gksu was removed from Ubuntu starting with the 18.x version(equal with Mint 19.x). We can use a variety of alternate options:
1. xed admin:///etc/default/grub uses the resident gvfs functionality
2. sudoedit /etc/default/grub (this probably opens vi/vim or nano instead as the default, otherwise you can export xed as default, I have done that export EDITOR=xed in ~/.bashrc file so it's easy using that direct command, otherwise the command could be EDITOR=xed sudoedit /etc/default/grub
3. pkexec xed /etc/default/grub (but in this case you need to make sure there is a polkit definition for the xed program, which there is not by default, although you can get a user created one here: https://github.com/linuxmint/xed/issues/238 )

-you can read further about these options here: viewtopic.php?f=61&t=268140
I did not realize it was included :oops: That is easier.
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.

User avatar
pbear
Level 8
Level 8
Posts: 2408
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Edit Grub Timeout

Post by pbear » Sun Oct 13, 2019 10:33 pm

Dumfy wrote:
Sun Oct 13, 2019 7:26 pm
How can I edit the Grub Timeout at boot so that the screen will just wait until I make a selection?
You set the timeout to -1, using one of the options zcot explains above.

By the way, if your computer uses UEFI, you shouldn't have the problem with Windows kicking Grub to the curb. That's a problem in BIOS because there's only one place to put the bootloader, to wit, the MBR. In UEFI, each system gets its own folder in the EFI partition. If you're not sure whether your computer uses UEFI, open Terminal and run ls /sys/firmware (that's an "L"). If efi is listed, you're booted in UEFI.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
trytip
Level 11
Level 11
Posts: 3806
Joined: Tue Jul 05, 2016 1:20 pm

Re: Edit Grub Timeout

Post by trytip » Mon Oct 14, 2019 12:37 am

Code: Select all

pkexec xed /etc/default/grub
find these lines and change accordingly: (if you don't have these lines add them)

Code: Select all

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=-1
then: sudo update-grub and reboot

IF: you have more selection in grub menu and you want it to save the last os booted

Code: Select all

# GRUB_DEFAULT=0
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=-1
Image

Dumfy
Level 1
Level 1
Posts: 24
Joined: Thu Oct 15, 2015 8:35 am

Re: Edit Grub Timeout

Post by Dumfy » Mon Oct 14, 2019 8:09 am

Hi everyone,

Thank you for your replies. Fantastic help and support from you all - a great community indeed.

My Grub timeout is now set to -1 and works well.

I'll keep all the info regarding Windows overwriting the boot manager safe as it will happen and I can use it then. Handy that Boot Repair is on the Live USB. Mine is an older system that I built a few years ago and doesn't use UEFI.

As i mentioned, I'm a Mint newbie, but intend using it a lot. There will no doubt be more questions along the way!

Appreciate all the advice given

Thanks,

Dumfy

User avatar
zcot
Level 5
Level 5
Posts: 544
Joined: Wed Oct 19, 2016 6:08 pm

Re: Edit Grub Timeout

Post by zcot » Mon Oct 14, 2019 11:38 am

blueocean wrote:
Sun Oct 13, 2019 10:03 pm

I did not realize it was included :oops: That is easier.
That started with 19.2 ;)

User avatar
blueocean
Level 5
Level 5
Posts: 723
Joined: Sun Jul 08, 2018 11:50 pm

Re: Edit Grub Timeout

Post by blueocean » Mon Oct 14, 2019 1:00 pm

zcot wrote:
Mon Oct 14, 2019 11:38 am
blueocean wrote:
Sun Oct 13, 2019 10:03 pm

I did not realize it was included :oops: That is easier.
That started with 19.2 ;)
It appears to be exactly the same app as the ppa.
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.

Post Reply

Return to “Installation & Boot”