Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian 9 GRUB boot order

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Debian 9 GRUB boot order

#1 Post by uthappam »

My hard drive has Debian 9 in sda1 and Linux Mint in sda7. The GRUB menu which comes up when booting lists Mint at the top, and unless I specify Debian, the computer boots into Mint. I have searched the Net for a way to make Debian the default but none of the solutions I tried was effective -- not even Grub Customizer from Launchpad. Is Debian 9 different from its predecessors in the handling of GRUB?

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Debian 9 GRUB boot order

#2 Post by Dai_trying »

I would guess that you installed Mint last as it appears to have control of grub, boot into Debian and re-install grub and it should regain control and place Debian at the top of the list. This is based on a standard MBR boot system though so if you are using UEFI you will likely need to adjust the boot order using efibootmgr.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Debian 9 GRUB boot order

#3 Post by debiman »

alternatively, you could boot into mint, edit /etc/default/grub to choose the second entry as default, and run update-grub.

trinidad
Posts: 289
Joined: 2016-08-04 14:58
Been thanked: 13 times

Re: Debian 9 GRUB boot order

#4 Post by trinidad »

No sense chasing one's tail on this issue. Newest versions of grub now always default boots to the last system you were logged into. If you want the same splash just load that splash to the grubs of all the OSs on the disk. I have Deb 9, 4.9kernel, Ubuntu LTS 4.13kernel, and Linux Lite 4.4kernel on a 1T disk and it works perfectly. The order in the menu no longer matters, and by the way not even with Windows on UEFI setups either. Rebooting and updates are no longer the problem they used to be with grub. I have Ubuntu LTS kernel4.4 and windows 10 build 1709+ on my lap and grub works the same. Don't beat me up on this, but the boot order on the menu doesn't really matter. Whatever you were logged into will be what reboots.

TC
You can't believe your eyes if your imagination is out of focus.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Debian 9 GRUB boot order

#5 Post by Dai_trying »

trinidad wrote:Don't beat me up on this,
I'll be gentle...

It does matter if you want to have a default system and then boot into another as and when the need arises, although I haven't noticed the behaviour you stated on my systems, but I guess it is probably down to which version of grub you are using to control the system.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Debian 9 GRUB boot order

#6 Post by sunrat »

trinidad wrote:Don't beat me up on this, but the boot order on the menu doesn't really matter. Whatever you were logged into will be what reboots.
I haven't noticed this behaviour either. There is a setting which can make last booted system reboot, but normally GRUB will boot a default system if this is not set. Maybe it's a Ubuntu default?

Simply explained - https://unix.stackexchange.com/question ... ast-choice
You must add:
GRUB_DEFAULT=saved
and
GRUB_SAVEDEFAULT=true
to your /etc/default/grub
then
update-grub
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Debian 9 GRUB boot order

#7 Post by Thorny »

I don't want to beat anyone up.
But I can verify that it's not default for Ubu 16.04 LTS and I doubt the 18.04 LTS is out yet as it is only Feb., at least here where I am.
I agree with both Dai_trying and sunrat

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 GRUB boot order

#8 Post by uthappam »

Thank you all.
Yes, Dai_trying, Mint was installed after Debian. Sunrat, I have tried what you suggest. Trouble is, I don't always want the last used to start again. I'd like Debian to boot whenever I make no explicit selection.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Debian 9 GRUB boot order

#9 Post by bw123 »

I used to have issues like this and finally decided to only have one grub per machine.
resigned by AI ChatGPT

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Debian 9 GRUB boot order

#10 Post by Thorny »

uthappam wrote:Thank you all.
Yes, Dai_trying, Mint was installed after Debian. Sunrat, I have tried what you suggest. Trouble is, I don't always want the last used to start again. I'd like Debian to boot whenever I make no explicit selection.
That's what debiman's suggestion would give you.

sunrat was just responding to trinidad.

trinidad
Posts: 289
Joined: 2016-08-04 14:58
Been thanked: 13 times

Re: Debian 9 GRUB boot order

#11 Post by trinidad »

I'd hazard a guess here that if you install Deb 9 and set a root password during installation on a dual boot system grub is configured that way automatically because of the then necessary update login restart process. It is more than likely the same default on UEFI dual boot systems that boot Windows alongside Ubuntu because Windows must reboot often many times during major updates. It used to be a pain for users not familiar with how grub worked but apparently now it has been addressed. In the cases I have mentioned all the systems were recently installed (within the last year) except for the Windows 10 and I did not edit grub on any of them. It seems to me that the Mint grub (or the Mint installer) on/of your OS is probably not the newest version. Ubuntu, Debian 9, and Windows play well with each other now from grub on dual boot systems.

TC
You can't believe your eyes if your imagination is out of focus.

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

[solved] Debian 9 GRUB boot order

#12 Post by uthappam »

The solution turned out to be simple: from Debian, the command sudo grub-install /dev/sda made GRUB list Debian first. Dai_trying's first post in this thread.

Post Reply