grub 2

Questions about Grub, the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
hatebreed

grub 2

Post by hatebreed »

I used to be able to edit the boot order of grub 2 but now it seems you can't edit the grub.cfg file. I know that your not supposed to edit this file but I used to be able to edit the order of OS's in this file. Now it seems that no matter what you do you can't edit this order. I've tried to edit the order also with startup manager but that just lets you pick the default OS. Any ideas?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Nuts2u
Level 3
Level 3
Posts: 129
Joined: Sun Nov 27, 2011 8:44 pm

Re: grub 2

Post by Nuts2u »

Install Grub Customizer
Silence is golden. Duct tape is silver. Welcome to Hell. Here's your copy of Windows.
BrunoMiranda
Level 4
Level 4
Posts: 359
Joined: Thu Jun 24, 2010 2:22 pm

Re: grub 2

Post by BrunoMiranda »

Yes, you're right. You shouldn't edit the grub.cfg file. You can, but the next time a new kernel is installed or you or something runs update-grub, those settings will be overwritten and you'll have to do it all again.

The correct way to do things is to edit the /etc/default/grub file. In there, you'll find this:

GRUB_DEFAULT=0

Change it from 0 to your preference. (Zero is the 1st entry, the 2nd one should be one and so on)

After this, don't forget to run the update-grub command so your grub.cfg file gets updated.

And from now on, you shouldn't worry about this any more.
Bye for now,
Bruno


(Always backup before you screw up :)
AdamFirst
Level 2
Level 2
Posts: 90
Joined: Sat Nov 29, 2008 4:34 pm

Re: grub 2

Post by AdamFirst »



The first step is to backup any file that you wish to change.

After that, Bruno's way will allow you to select the first entry displayed in the grub menu.

If you want something more, I would suggest that you build your menu in /etc/grub.d/40_custom.

I wouldn't use Grub Customizer. I have tried it multiple times, and it has failed me multiple times. There is a lot of info about grub2 and it's customization on the web. My custom menu works well for me, and I boot a rotating mix of 6+ OS's.

Yours,
AdamFirst
User avatar
AZgl1800
Level 20
Level 20
Posts: 11173
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: grub 2

Post by AZgl1800 »

AdamFirst wrote: Tue Dec 11, 2018 8:49 pm

I wouldn't use Grub Customizer I have tried it multiple times, and it has failed me multiple times. There is a lot of info about grub2 and it's customization on the web. My custom menu works well for me, and I boot a rotating mix of 6+ OS's.

Yours,
AdamFirst
Many complaints about how screwed up Grub Customizer messes with the Grub config file...
I also advise against using it..... google is your friend here...
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: grub 2

Post by all41 »

Do not follow this advice "Install Grub Customizer"
Do not go there--good reasons are in the forums--read these.
You can change the default boot order without messing with your system files
Everything in life was difficult before it became easy.
User avatar
Pierre
Level 21
Level 21
Posts: 13215
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: grub 2

Post by Pierre »

BrunoMiranda wrote: Tue Dec 11, 2018 1:28 pm
The correct way to do things is to edit the /etc/default/grub file. In there, you'll find this:

GRUB_DEFAULT=0

Change it from 0 to your preference. (Zero is the 1st entry, the 2nd one should be one and so on)

After this, don't forget to run the update-grub command so your grub.cfg file gets updated.
and also adjust the GRUB_TIMEOUT=10 as well, to your liking.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Locked

Return to “Installation & Boot”