[SOLVED] Dual Boot system boots straight into Windows 10

Questions about Grub, UEFI,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.
Kurogane

[SOLVED] Dual Boot system boots straight into Windows 10

Post by Kurogane »

Hello! Recently I've installed Mint 20 Cinnamon on my PC alongside W10, and so far my experience with it is amazing! After being a Windows-only user for maybe 15 years, Linux systems are like revelations to me.

I suppose that I've installed everything correctly and at the moment I can boot into both systems and they are working fine. The only thing that bothers me is that right now I can only access Mint if I choose it in the boot menu on every startup, and by default my PC boots straight into W10. At first, this was a reasonable option for me to explore Mint system bit by bit occasionally, while always booting in Windows if I'm not using boot menu.

Now, as I use Mint more and more, I'd like to make it more comfortable to boot into Mint, so in the end, there is probably something wrong with my installation, as the computer never loads grub by default. I can access it only by using boot menu on startup and choosing Ubuntu (?) as a boot option. Then I can successfully boot into Mint. I would prefer to have it booting to grub by default, or even booting into Mint by default would be a good option. This is a common issue, I guess, so I decided to look for correct advice for me, so that I won't break everything that works right now. Some help would be appreciated :D. Here's some system info:

Code: Select all

System:    Kernel: 5.4.0-47-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.6.7 
           wm: muffin dm: LightDM Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:   Type: Desktop System: LENOVO product: ----------------- v: Lenovo S20-00 serial: <------------> 
           Chassis: type: 13 serial: <filter> 
           Mobo: LENOVO model: INVALID v: --------------- WIN serial: <---------> UEFI: LENOVO 
           v: ------------ date: 05/22/2014 
CPU:       Topology: Dual Core model: Intel Celeron J1800 bits: 64 type: MCP arch: Silvermont 
           rev: 8 L2 cache: 1024 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 9666 
           Speed: 1997 MHz min/max: 1333/2582 MHz Core speeds (MHz): 1: 1333 2: 1333 
Graphics:  Device-1: NVIDIA GF119M [GeForce 610M] vendor: Lenovo driver: nvidia v: 390.138 
           bus ID: 01:00.0 chip ID: 10de:1058 
           Display: x11 server: X.Org 1.20.8 driver: nvidia 
           unloaded: fbdev,modesetting,nouveau,vesa resolution: 1600x900~60Hz 
           OpenGL: renderer: GeForce 800A/PCIe/SSE2 v: 4.6.0 NVIDIA 390.138 direct render: Yes 
Audio:     Device-1: Intel Atom Processor Z36xxx/Z37xxx Series High Definition Audio 
           vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:0f04 
           Device-2: NVIDIA GF119 HDMI Audio vendor: Lenovo driver: snd_hda_intel v: kernel 
           bus ID: 01:00.1 chip ID: 10de:0e08 
           Sound Server: ALSA v: k5.4.0-47-generic 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo 
           driver: r8169 v: kernel port: 1000 bus ID: 02:00.0 chip ID: 10ec:8168 
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter vendor: Lenovo 
           driver: ath9k v: kernel port: 1000 bus ID: 03:00.0 chip ID: 168c:0036 
           IF: wlp3s0 state: down mac: <filter> 
           Device-3: Qualcomm Atheros AR3012 Bluetooth 4.0 type: USB driver: btusb bus ID: 1-4.4:8 
           chip ID: 0cf3:3004 
Drives:    Local Storage: total: 465.76 GiB used: 11.60 GiB (2.5%) 
           ID-1: /dev/sda vendor: Seagate model: ST500DM002-1BD142 size: 465.76 GiB 
           speed: 3.0 Gb/s serial: <filter> 
Partition: ID-1: / size: 19.56 GiB used: 9.80 GiB (50.1%) fs: ext4 dev: /dev/sda6 
           ID-2: /home size: 78.24 GiB used: 1.77 GiB (2.3%) fs: ext4 dev: /dev/sda7 
           ID-3: swap-1 size: 4.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda5 

Code: Select all

Model: ATA ST500DM002-1BD14 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  524MB   523MB   ntfs            Basic data partition          hidden, diag
 2      524MB   629MB   105MB   fat32           EFI system partition          boot, esp
 3      629MB   646MB   16,8MB                  Microsoft reserved partition  msftres
 4      646MB   64,4GB  63,8GB  ntfs            Basic data partition          msftdata
 5      64,4GB  68,7GB  4295MB  linux-swap(v1)                                swap
 6      68,7GB  90,2GB  21,5GB  ext4
 7      90,2GB  176GB   85,9GB  ext4
 8      176GB   500GB   324GB   ntfs                                          msftdata


NAME FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                   
├─sda1
│    ntfs   Восстановить
│                 92A44281A4426835                                    
├─sda2
│    vfat         B846-4411                              63,9M    33% /boot/efi
├─sda3
│                                                                     
├─sda4
│    ntfs         ACB65CBAB65C86AC                                    
├─sda5
│    swap         de9288f9-8e1b-4b18-8e3f-1fbbf8a111c8                [SWAP]
├─sda6
│    ext4         5638ae96-4ad1-411c-928c-3fec0a7271f3    8,8G    50% /
├─sda7
│    ext4         581006a1-c071-47ab-9b82-b11f7c842e76   72,5G     2% /home
└─sda8
     ntfs   Media 25EAB9A81E69E24F   
UPDATE: The solution on the Lenovo AIO was to create a bootable rEFInd flash drive, following the instructions from this post by pbear: viewtopic.php?p=1729832&sid=9a1416da011 ... 6#p1729832
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Dual Boot system boots straight into Windows 10

Post by mr_raider »

Open a terminal, type the following command:

sudo efibootmgr -v


Post the output.
Image
Kurogane

Re: Dual Boot system boots straight into Windows 10

Post by Kurogane »

mr_raider wrote: Sun Sep 13, 2020 9:45 am Open a terminal, type the following command:

sudo efibootmgr -v


Post the output.
Hi. Here it is:

Code: Select all

BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0000,0001,2001,2002,2003
Boot0000* Windows Boot Manager	PciRoot(0x0)/Pci(0x13,0x0)/Sata(0,0,0)/HD(2,GPT,ba893a59-e94d-484b-afba-744b4bb5b94b,0xfa000,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0001* Ubuntu	PciRoot(0x0)/Pci(0x13,0x0)/Sata(0,0,0)/HD(2,GPT,ba893a59-e94d-484b-afba-744b4bb5b94b,0xfa000,0x32000)/File(\EFI\ubuntu\grubx64.efi)RC
Boot0002* MATSHITA DVD-RAM UJ8FB	BBS(CDROM,,0x500)................-...........A.....................................7.v..
Boot0003* Windows Boot Manager	PciRoot(0x0)/Pci(0x13,0x0)/Sata(0,0,0)/HD(2,GPT,0e78bb14-a71a-4cf6-acf0-f74c2aef10bb,0x1f4800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0004* Windows Boot Manager	HD(2,GPT,ba893a59-e94d-484b-afba-744b4bb5b94b,0xfa000,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Dual Boot system boots straight into Windows 10

Post by mr_raider »

Can you find an option in your BIOS to reorder the boot entries to put ubuntu on top?

That's the préfère y solution. We can also try to force it with the command line but that doesn't always stick.
Image
Kurogane

Re: Dual Boot system boots straight into Windows 10

Post by Kurogane »

mr_raider wrote: Sun Sep 13, 2020 9:54 am Can you find an option in your BIOS to reorder the boot entries to put ubuntu on top?

That's the préfère y solution. We can also try to force it with the command line but that doesn't always stick.
I was trying, but I couldn't do it. Both Windows Boot Manager and Ubuntu are at SATA1 in BIOS, and I can only move them together in the sequence. It's a Lenovo AIO BIOS, so it is kinda limited.
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Dual Boot system boots straight into Windows 10

Post by mr_raider »

Sometimes the option is called hard drive bbs priorities. Sometimes you need at the Linux boot loader as trusted. Every bios is different. Try digging through the options.


Anyway try this

Code: Select all

sudo efibootmgr -o 1
Image
Kurogane

Re: Dual Boot system boots straight into Windows 10

Post by Kurogane »

mr_raider wrote: Sun Sep 13, 2020 10:26 am Sometimes the option is called hard drive bbs priorities. Sometimes you need at the Linux boot loader as trusted. Every bios is different. Try digging through the options.


Anyway try this

Code: Select all

sudo efibootmgr -o 1
The only thing that comes to my mind about such setting, is maybe setup mode of secure boot, I never tried it, and I'm not sure if that option might be there. Like I said my BIOS is heavily restricted. Secure boot is disabled right now in my BIOS settings

Now, about the command. Is this command all I should do? It seems, like the changes don't get saved, I reboot into Windows, and efibootmgr shows the same order it had before typing sudo efibootmgr -o 1.
motoryzen
Level 10
Level 10
Posts: 3497
Joined: Sun Dec 08, 2019 12:25 am

Re: Dual Boot system boots straight into Windows 10

Post by motoryzen »

Kurogane wrote: Sun Sep 13, 2020 9:30 am Hello! Recently I've installed Mint 20 Cinnamon on my PC alongside W10, and so far my experience with it is amazing! After being a Windows-only user for maybe 15 years, Linux systems are like revelations to me.

I suppose that I've installed everything correctly and at the moment I can boot into both systems and they are working fine. The only thing that bothers me is that right now I can only access Mint if I choose it in the boot menu on every startup, and by default my PC boots straight into W10. At first, this was a reasonable option for me to explore Mint system bit by bit occasionally, while always booting in Windows if I'm not using boot menu.

Now, as I use Mint more and more, I'd like to make it more comfortable to boot into Mint, so in the end, there is probably something wrong with my installation, as the computer never loads grub by default. I can access it only by using boot menu on startup and choosing Ubuntu (?) as a boot option. Then I can successfully boot into Mint. I would prefer to have it booting to grub by default, or even booting into Mint by default would be a good option.

-- This is exactly the main reason why I don't install any Linux distro into the same storage drive as Windows. Windows mbr and LInux grub never, and probably never will, play nicely together. One always ends up overtaking the other. It's always best to install Windows and Linux distros into separate storage drives.

Even if they are both physically connected to the PC at the same time, most often windows mbr or linux grub will still at least work correctly enough to allow you to boot into either world without a problem that way, but it doesn't always, and I prefer to disconnect one of the drives when booting into the other to 100% ensure it just works. I mentioned separate drives because once you get ready to remove one of those worlds and just stick with the other, most often there is data loss or a boot manager gets corrupted. Unfortunately it's not as simple as just deleting the correct partitions. Tried that also and still learned the hardway.

It's just not worth the hassle and risks to go that exact route on doing baby steps into Linux imo.

I apologize I'm not able to offer any helpful troubleshooting tips.
Mint 21.2 Cinnamon 5.8.4
asrock x570 taichi ...bios p5.00
ryzen 5900x
128GB Kingston Fury @ 3600mhz
Corsair mp600 pro xt NVME ssd 4TB
three 4TB ssds
dual 1TB ssds
Two 16TB Toshiba hdd's
24GB amd 7900xtx vid card
Viewsonic Elite UHD 32" 144hz monitor
Kurogane

Re: Dual Boot system boots straight into Windows 10

Post by Kurogane »

motoryzen wrote: Sun Sep 13, 2020 11:19 am -- This is exactly the main reason why I don't install any Linux distro into the same storage drive as Windows. Windows mbr and LInux grub never, and probably never will, play nicely together. One always ends up overtaking the other. It's always best to install Windows and Linux distros into separate storage drives.

Even if they are both physically connected to the PC at the same time, most often windows mbr or linux grub will still at least work correctly enough to allow you to boot into either world without a problem that way, but it doesn't always, and I prefer to disconnect one of the drives when booting into the other to 100% ensure it just works. I mentioned separate drives because once you get ready to remove one of those worlds and just stick with the other, most often there is data loss or a boot manager gets corrupted. Unfortunately it's not as simple as just deleting the correct partitions. Tried that also and still learned the hardway.

It's just not worth the hassle and risks to go that exact route on doing baby steps into Linux imo.

I apologize I'm not able to offer any helpful troubleshooting tips.
Hello! I, mostly agree with you on the separate storage devices for each OS. These days people have plenty of different storage spaces on their computers, sometimes multiple HDDs, SSDs, you can also have m.2 memory etc. On the other hand, there are laptop and old computer users out there. And while, in some cases there may be an option to add storage, it's probably not my case, and I believe there is atleast some amount of people in the same boat.

I use an AIO PC, and while I, supposedly have an additional SATA port, there is neither financial opportunity, neither additional physical space inside of my chassis to fit another disk drive, although not sure about that, I could probably remove faulty DVD drive to create space. But then again, there is a huge difference between spending time to make everything work on a single drive and disassembling AIO PC, in my case, for example. Tear it down to connect drives, get it back to see if it works, and if it doesn't repeat the process X times.

Speaking about everything to just work, well, while I heard a lot about boot problems, it is literally the first thing I heard when I wanted to research about Linux and dual booting. Surprisingly, I had everything almost (!) working from the first try. I was getting psychologically ready for my installation to fail. In the end, everything worked, though I have these small issues.

I think it should be possible to make it work. Plugging different drives in and out seems like a lot more hassle to me, than to make everything work once, and earn experience to fix it later on quicker. Thanks, for sharing your opinion though! :)
motoryzen
Level 10
Level 10
Posts: 3497
Joined: Sun Dec 08, 2019 12:25 am

Re: Dual Boot system boots straight into Windows 10

Post by motoryzen »

Kurogane wrote: Sun Sep 13, 2020 11:54 am
motoryzen wrote: Sun Sep 13, 2020 11:19 am -- This is exactly the main reason why I don't install any Linux distro into the same storage drive as Windows. Windows mbr and LInux grub never, and probably never will, play nicely together. One always ends up overtaking the other. It's always best to install Windows and Linux distros into separate storage drives.

Even if they are both physically connected to the PC at the same time, most often windows mbr or linux grub will still at least work correctly enough to allow you to boot into either world without a problem that way, but it doesn't always, and I prefer to disconnect one of the drives when booting into the other to 100% ensure it just works. I mentioned separate drives because once you get ready to remove one of those worlds and just stick with the other, most often there is data loss or a boot manager gets corrupted. Unfortunately it's not as simple as just deleting the correct partitions. Tried that also and still learned the hardway.

It's just not worth the hassle and risks to go that exact route on doing baby steps into Linux imo.

I apologize I'm not able to offer any helpful troubleshooting tips.
Hello! I, mostly agree with you on the separate storage devices for each OS. These days people have plenty of different storage spaces on their computers, sometimes multiple HDDs, SSDs, you can also have m.2 memory etc. On the other hand, there are laptop and old computer users out there. And while, in some cases there may be an option to add storage, it's probably not my case, and I believe there is atleast some amount of people in the same boat.

I use an AIO PC, and while I, supposedly have an additional SATA port, there is neither financial opportunity, neither additional physical space inside of my chassis to fit another disk drive, although not sure about that, I could probably remove faulty DVD drive to create space. But then again, there is a huge difference between spending time to make everything work on a single drive and disassembling AIO PC, in my case, for example. Tear it down to connect drives, get it back to see if it works, and if it doesn't repeat the process X times.

Speaking about everything to just work, well, while I heard a lot about boot problems, it is literally the first thing I heard when I wanted to research about Linux and dual booting. Surprisingly, I had everything almost (!) working from the first try. I was getting psychologically ready for my installation to fail. In the end, everything worked, though I have these small issues.

I think it should be possible to make it work. Plugging different drives in and out seems like a lot more hassle to me, than to make everything work once, and earn experience to fix it later on quicker. Thanks, for sharing your opinion though! :)
-- (Homer Simpson voice ) "DOH!" I didn't even think about aio's. Many laptops take a few minutes to disable enough to access the internal storage drive(s). *makes embarrassed Shrek grin* Sorry
Mint 21.2 Cinnamon 5.8.4
asrock x570 taichi ...bios p5.00
ryzen 5900x
128GB Kingston Fury @ 3600mhz
Corsair mp600 pro xt NVME ssd 4TB
three 4TB ssds
dual 1TB ssds
Two 16TB Toshiba hdd's
24GB amd 7900xtx vid card
Viewsonic Elite UHD 32" 144hz monitor
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Dual Boot system boots straight into Windows 10

Post by mr_raider »

Kurogane wrote: Sun Sep 13, 2020 11:02 am
mr_raider wrote: Sun Sep 13, 2020 10:26 am Sometimes the option is called hard drive bbs priorities. Sometimes you need at the Linux boot loader as trusted. Every bios is different. Try digging through the options.


Anyway try this

Code: Select all

sudo efibootmgr -o 1
The only thing that comes to my mind about such setting, is maybe setup mode of secure boot, I never tried it, and I'm not sure if that option might be there. Like I said my BIOS is heavily restricted. Secure boot is disabled right now in my BIOS settings

Now, about the command. Is this command all I should do? It seems, like the changes don't get saved, I reboot into Windows, and efibootmgr shows the same order it had before typing sudo efibootmgr -o 1.
The command places the Ubuntu entry at the top of the boot list, in theory.

So if I understand you right, that command allows you to reboot into Mint only once? Or not at all?
Image
bendipa
Level 5
Level 5
Posts: 586
Joined: Sat Jan 04, 2020 8:02 pm
Location: NW London. UK

Re: Dual Boot system boots straight into Windows 10

Post by bendipa »

Kurogane wrote: Sun Sep 13, 2020 9:52 am
mr_raider wrote: Sun Sep 13, 2020 9:45 am Open a terminal, type the following command:

sudo efibootmgr -v


Post the output.
Hi. Here it is:

Code: Select all

BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0000,0001,2001,2002,2003
Boot0000* Windows Boot Manager	PciRoot(0x0)/Pci(0x13,0x0)/Sata(0,0,0)/HD(2,GPT,ba893a59-e94d-484b-afba-744b4bb5b94b,0xfa000,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0001* Ubuntu	PciRoot(0x0)/Pci(0x13,0x0)/Sata(0,0,0)/HD(2,GPT,ba893a59-e94d-484b-afba-744b4bb5b94b,0xfa000,0x32000)/File(\EFI\ubuntu\grubx64.efi)RC
Boot0002* MATSHITA DVD-RAM UJ8FB	BBS(CDROM,,0x500)................-...........A.....................................7.v..
Boot0003* Windows Boot Manager	PciRoot(0x0)/Pci(0x13,0x0)/Sata(0,0,0)/HD(2,GPT,0e78bb14-a71a-4cf6-acf0-f74c2aef10bb,0x1f4800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0004* Windows Boot Manager	HD(2,GPT,ba893a59-e94d-484b-afba-744b4bb5b94b,0xfa000,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot into LM like before, and run command sudo efibootmgr -o 0001,0000. Then run sudo efibootmgr and check that the order has changed, ie 0001 now shows first in boot order. Then reboot PC. Is Win 10 still booting first?
Computer: Dell Vostro 470
Systems: Linux Mint 21.3 Xfce (Una), Manjaro 23.1 Xfce (Vulcan), Windows 10 (22H2) Pro.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Dual Boot system boots straight into Windows 10

Post by pbear »

Try changing boot order with efibootmgr. If that doesn't stick, the Windows way to do this is bcdedit. At a command prompt:

Code: Select all

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
For more info, see this explanation by Linux guru Rod Smith.

If bcdedit doesn't work either, I know one other trick, but let's try the regular methods first.
Kurogane

Re: Dual Boot system boots straight into Windows 10

Post by Kurogane »

mr_raider wrote: Sun Sep 13, 2020 5:02 pm
mr_raider wrote: Sun Sep 13, 2020 10:26 am

Code: Select all

sudo efibootmgr -o 1
The command places the Ubuntu entry at the top of the boot list, in theory.

So if I understand you right, that command allows you to reboot into Mint only once? Or not at all?
No, unfortunately, not a single time. I've run the command on several restarts, verified it by typing

Code: Select all

sudo efibootmgr
again, then restarted the computer. It always boots in W10, and when I reboot again and use boot menu, in Mint efibootmgr shows the boot order without any changes.
bendipa wrote: Sun Sep 13, 2020 6:41 pm Boot into LM like before, and run command sudo efibootmgr -o 0001,0000. Then run sudo efibootmgr and check that the order has changed, ie 0001 now shows first in boot order. Then reboot PC. Is Win 10 still booting first?
Yes, still booting into W10, though I didn't boot back into Mint to check if the changes are still there, like what I mentioned about using sudo efibootmgr -o 1. I've ran efibootmgr after changing order and verified the changes, although still boot into Windows.
pbear wrote: Sun Sep 13, 2020 10:20 pm Try changing boot order with efibootmgr. If that doesn't stick, the Windows way to do this is bcdedit. At a command prompt:

Code: Select all

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
For more info, see this explanation by Linux guru Rod Smith.

If bcdedit doesn't work either, I know one other trick, but let's try the regular methods first.
I've read about using bcdedit in Windows for this issue, didn't try though, left it as a last resort option, knowing things you do in W10, frequently duck up everything. So, I tried this command, restarted the PC, and still booted into W10. I've ran it again, just to make sure, here's the output, it seems the change is intact, it just doesn't work:

Code: Select all

Диспетчер загрузки Windows                                                                                              
--------------------                                                                                                    
идентификатор           {bootmgr}                                                                                       
device                  partition=\Device\HarddiskVolume2                                                               
path                    \EFI\ubuntu\grubx64.efi                                                                         
description             Windows Boot Manager                                                                            
locale                  ru-RU                                                                                          
inherit                 {globalsettings}                                                                                
default                 {current}                                                                                       
resumeobject            {9edca4b1-d4e1-11ea-9d40-b2cbe5551ded}                                                          
displayorder            {current}                                                                                       
toolsdisplayorder       {memdiag}                                                                                       
timeout                 30  
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Dual Boot system boots straight into Windows 10

Post by mr_raider »

Go to your BIOS and turn secure boot back on. See if you can add shimx64.efi as a trusted bootloader.
Image
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: Dual Boot system boots straight into Windows 10

Post by bigal »

The GRUB menu should appear if you press and hold Shift during the time when Grub should be loading. Use this if you boot using BIOS. If your system boots using UEFI, press Esc. Don’t worry if you are unsure when GRUB is actually loading. Boot into Mint in whatever way you can then make changes as detailed below.

For a permanent change you'll need to edit your /etc/default/grub file. To do this go to a Mint terminal and type sudo xed /etc/default/grub. (xed is the default text editor in Mint 20) Once there look for the line GRUB_HIDDEN_TIMEOUT=0 and place a hash (#) at the start of the line. If you want the GRUB menu to display for, lets say 10 seconds don’t put the hash there but change the 0 (zero) to 10.

To change the boot order go to /etc/default/grub and look for the line GRUB_DEFAULT=0 and change it to GRUB_DEFAULT=n where n is the number of the OS you want to have first in the list. NOTE that the numbering starts from 0 (zero).

Once you have made all the changes suggested above run sudo update-grub then reboot. Hopefully the GRUB menu will appear and the Mint OS will be the default.
Lots of Minty machines but there again I like lamb and I do live in Wales!
Kurogane

Re: Dual Boot system boots straight into Windows 10

Post by Kurogane »

mr_raider wrote: Mon Sep 14, 2020 6:35 am Go to your BIOS and turn secure boot back on. See if you can add shimx64.efi as a trusted bootloader.
Sorry, could you explain further if I need to do all of this in BIOS settings? I tried turning on secure boot, it boots me right into W10 again, but I booted Mint using boot menu, it started to lag though, so I disabled secure boot. Everything I have in BIOS on secure boot:
https://pasteboard.co/Jr2nGi9.jpg
bigal wrote: Mon Sep 14, 2020 7:21 am The GRUB menu should appear if you press and hold Shift during the time when Grub should be loading. Use this if you boot using BIOS. If your system boots using UEFI, press Esc. Don’t worry if you are unsure when GRUB is actually loading. Boot into Mint in whatever way you can then make changes as detailed below.

For a permanent change you'll need to edit your /etc/default/grub file. To do this go to a Mint terminal and type sudo xed /etc/default/grub. (xed is the default text editor in Mint 20) Once there look for the line GRUB_HIDDEN_TIMEOUT=0 and place a hash (#) at the start of the line. If you want the GRUB menu to display for, lets say 10 seconds don’t put the hash there but change the 0 (zero) to 10.

To change the boot order go to /etc/default/grub and look for the line GRUB_DEFAULT=0 and change it to GRUB_DEFAULT=n where n is the number of the OS you want to have first in the list. NOTE that the numbering starts from 0 (zero).

Once you have made all the changes suggested above run sudo update-grub then reboot. Hopefully the GRUB menu will appear and the Mint OS will be the default.
Hi! So I opened the grub file as you mentioned, and I have some questions on the steps you provided. Firstly, I only have GRUB_TIMEOUT_STYLE=hidden and GRUB_TIMEOUT=10, in my file, and if I'm not mistaken, that settings refer to how long GRUB will stay before automatically choosing an option? When I use boot menu, GRUB starts and the timer counts if I don't press any button, so should I really change those settings now? I don't really mind that timer, but should I change it to see if I can get GRUB to boot by default?

So, I also have the GRUB_DEFAULT=0 line. How can I figure what number should I put there? Are the numbers from efibootmgr related to those for grub file? Otherwise, please elaborate where to get the correct numbers, I have no idea :(
bigal
Level 5
Level 5
Posts: 512
Joined: Mon Aug 03, 2009 3:26 am
Location: Pembrokeshire, South West Wales

Re: Dual Boot system boots straight into Windows 10

Post by bigal »

From within Mint (not Windows) and as an ordinary user, not as root, can you post the output of please

Code: Select all

cat /etc/grub/default
Lots of Minty machines but there again I like lamb and I do live in Wales!
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Dual Boot system boots straight into Windows 10

Post by pbear »

Kurogane wrote: Mon Sep 14, 2020 8:38 am ... GRUB starts and the timer counts if I don't press any button, so should I really change those settings now?
I always set Grub to display at boot. Isn't going to solve the main problem, but useful to display Grub at boot because sometimes you want one of the other options. Also, displaying Grub doesn't delay boot. It's just matter of whether you look at a boot menu or a blank screen. As for how long, I like three seconds. Long enough to tap a key (which interrupts the timer) but brief enough not to annoy. As for how-to, see Mint Help.

Returning to the main topic, bcdedit isn't going to hurt the machine, but I understand your reluctance. Good luck.
Kurogane

Re: Dual Boot system boots straight into Windows 10

Post by Kurogane »

bigal wrote: Mon Sep 14, 2020 10:38 am From within Mint (not Windows) and as an ordinary user, not as root, can you post the output of please

Code: Select all

cat /etc/grub/default
Sorry, I've started using Mint just recently, so I don't know how to run something not as root, could you elaborate please? Also did, you mean:

Code: Select all

cat /etc/default/grub
? I get no such file or directory when I use the mentioned command. I tried to create a new standard user, and run sudo -u username cat /etc/default/grub. Here's the output:

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_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
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"
pbear wrote: Mon Sep 14, 2020 11:58 am
Kurogane wrote: Mon Sep 14, 2020 8:38 am ... GRUB starts and the timer counts if I don't press any button, so should I really change those settings now?
I always set Grub to display at boot. Isn't going to solve the main problem, but useful to display Grub at boot because sometimes you want one of the other options. Also, displaying Grub doesn't delay boot. It's just matter of whether you look at a boot menu or a blank screen. As for how long, I like three seconds. Long enough to tap a key (which interrupts the timer) but brief enough not to annoy. As for how-to, see Mint Help.

Returning to the main topic, bcdedit isn't going to hurt the machine, but I understand your reluctance. Good luck.
I've changed timeout style to menu, but I'm probably not going to see any changes, as I can launch Mint only through grub right now, so it is never hidden, but I will keep that in mind for future, thanks.
Locked

Return to “Installation & Boot”