Debian 9 GRUB boot order

If none of the more specific forums is the right place to ask

Debian 9 GRUB boot order

Postby uthappam » 2018-02-17 02:40

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?
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 GRUB boot order

Postby Dai_trying » 2018-02-17 10:19

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.
Dai_trying
 
Posts: 567
Joined: 2016-01-07 12:25

Re: Debian 9 GRUB boot order

Postby debiman » 2018-02-17 12:03

alternatively, you could boot into mint, edit /etc/default/grub to choose the second entry as default, and run update-grub.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: Debian 9 GRUB boot order

Postby trinidad » 2018-02-17 14:46

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.
trinidad
 
Posts: 17
Joined: 2016-08-04 14:58

Re: Debian 9 GRUB boot order

Postby Dai_trying » 2018-02-17 16:31

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.
Dai_trying
 
Posts: 567
Joined: 2016-01-07 12:25

Re: Debian 9 GRUB boot order

Postby sunrat » 2018-02-17 20:17

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
sunrat
 
Posts: 2495
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Debian 9 GRUB boot order

Postby Thorny » 2018-02-17 22:12

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
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: Debian 9 GRUB boot order

Postby uthappam » 2018-02-17 22:27

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.
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 GRUB boot order

Postby bw123 » 2018-02-17 23:36

I used to have issues like this and finally decided to only have one grub per machine.
User avatar
bw123
 
Posts: 3588
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Debian 9 GRUB boot order

Postby Thorny » 2018-02-17 23:47

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.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: Debian 9 GRUB boot order

Postby trinidad » 2018-02-17 23:54

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.
trinidad
 
Posts: 17
Joined: 2016-08-04 14:58

[solved] Debian 9 GRUB boot order

Postby uthappam » 2018-02-18 00:01

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.
uthappam
 
Posts: 208
Joined: 2010-01-01 17:14
Location: Delhi, India


Return to General Questions

Who is online

Users browsing this forum: Jimmyfd, MagicPoulp and 5 guests

fashionable