<SOLVED> Dual Boot - Only boots to Mint

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.
Locked
mamba76
Level 1
Level 1
Posts: 25
Joined: Thu Apr 22, 2021 8:57 pm

<SOLVED> Dual Boot - Only boots to Mint

Post by mamba76 »

Hi all. I have succeeded in installing win 10 along side Mint in dual boot, only problem is it only boots to Mint now. The BIOS on my HP Probook 4540s sucks (I think?) I had win10 setup on my new SSD as traditional MBR, realised I wanted to dual boot for Linux distro so converted the partition table to GPT using MBR2GPT tool. Why settle for 4 partitions when you can have 128! Success, check in disk manager and volumes now says GPT now starts, stops and works fine. I I now have 4 partitions <system reserved> <C:/> <EFI> <unallocated(200Gb)>.
Downloaded Mint CD, verified, tested Mint on USB first then installed it from the Mint desktop. Now when I restart it goes straight into Mint with no other options, no boot menu anywhere. I think I can get to a BIOS option that's trying to boot Windows but its not finding it. What's changed in the EFI file as Im actually in UEFI compatibility mode so I assume that will look for an MBR too. This is the only BIOS type setting that attempts to load Windows but Im just getting 'no OS found'.
.
What is controlling the boot now? The BIOS, EFI partition or the root of Mint? As I take it, anyway you try for dual boot your <system reserved> and <C:/> partitions never get altered. Is the MBR on C partition or system reserved?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Pierre
Level 21
Level 21
Posts: 13192
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Dual Boot - Only boots to Mint

Post by Pierre »

Hi mamba76 ,
welcome to our forum.
:)

what you could try, is to type

Code: Select all

sudo update-grub

from the Terminal of your new LinuxMint System,
to see if the Windows System is now available in the Boot Menu.

it would also be helpful, to know something about your machine:
viewtopic.php?f=90&t=318644
copy the result of that, back here, on your reply.
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!.
mamba76
Level 1
Level 1
Posts: 25
Joined: Thu Apr 22, 2021 8:57 pm

Re: Dual Boot - Only boots to Mint

Post by mamba76 »

** I should point out I do know MBR is in the first sector of 512 bytes on the physical disk. (very tired last night and wanted to finish question) **

Thanks. It seems like the EFI partition is correctly recognised by linux as /dev/sda3
-----------
root@paul-HP-ProBook-4540s:~# sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-58-generic
Found initrd image: /boot/initrd.img-5.4.0-58-generic
Found Windows Boot Manager on /dev/sda3@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done
------------

FDisk confirms what Id find in the windows disk manager -

------------
Disk /dev/sda: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 01324A85-A2FF-11EB-AFFB-B4B52F755349

Device Start End Sectors Size Type
/dev/sda1 63 192779 192717 94.1M Microsoft basic data
/dev/sda2 192780 424980114 424787335 202.6G Microsoft basic data
/dev/sda3 424980480 425185279 204800 100M EFI System
/dev/sda4 425185280 976771071 551585792 263G Linux filesystem
----------

Not sure if

Code: Select all

sudo update-grub
changed anything but still boots straight to Mint
I dual booted win10 / xp before using easyBCD but before installing linux I checked easyBCD to see what it recognised after I went UEFI(Compat mode) with working GPT and theres not a lot it could do. I was thinking I might need to set that up first, then I read that when installing Mint it knows this and would automatically present some sort of boot manager when starting the laptop.
mamba76
Level 1
Level 1
Posts: 25
Joined: Thu Apr 22, 2021 8:57 pm

Re: Dual Boot - Only boots to Mint

Post by mamba76 »

and inxi report -

Code: Select all

System:    Kernel: 5.4.0-58-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.8.5 
           wm: muffin dm: LightDM Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: Hewlett-Packard product: HP ProBook 4540s v: A1009D11 
           serial: <filter> Chassis: type: 10 serial: <filter> 
           Mobo: Hewlett-Packard model: 17F6 v: KBC Version 58.21 serial: <filter> 
           UEFI: Hewlett-Packard v: 68IRR Ver. F.67 date: 05/30/2018 
Battery:   ID-1: BAT0 charge: 43.1 Wh condition: 44.0/44.0 Wh (100%) volts: 12.4/10.8 
           model: Hewlett-Packard Primary serial: <filter> status: Unknown 
CPU:       Topology: Quad Core model: Intel Core i7-3630QM bits: 64 type: MT MCP arch: Ivy Bridge 
           rev: 9 L2 cache: 6144 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 38310 
           Speed: 3285 MHz min/max: 1200/3400 MHz Core speeds (MHz): 1: 3043 2: 3193 3: 3240 
           4: 3141 5: 3201 6: 3218 7: 3056 8: 3333 
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard driver: i915 
           v: kernel bus ID: 00:02.0 chip ID: 8086:0166 
           Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 20.0.8 
           compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Hewlett-Packard 
           driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:1e20 
           Sound Server: ALSA v: k5.4.0-58-generic 
Network:   Device-1: Qualcomm Atheros AR9485 Wireless Network Adapter vendor: Hewlett-Packard 
           driver: ath9k v: kernel port: 3040 bus ID: 03:00.0 chip ID: 168c:0032 
           IF: wlo1 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
           vendor: Hewlett-Packard driver: r8169 v: kernel port: 2000 bus ID: 04:00.0 
           chip ID: 10ec:8168 
           IF: enp4s0 state: down mac: <filter> 
           Device-3: Qualcomm Atheros type: USB driver: btusb bus ID: 2-1.6:3 chip ID: 0cf3:311d 
Drives:    Local Storage: total: 465.76 GiB used: 141.69 GiB (30.4%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB 
           speed: 6.0 Gb/s serial: <filter> 
Partition: ID-1: / size: 257.89 GiB used: 8.70 GiB (3.4%) fs: ext4 dev: /dev/sda4 
USB:       Hub: 1-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 chip ID: 1d6b:0002 
           Hub: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0 
           chip ID: 8087:0024 
           Device-1: 1-1.1:3 info: Validity Sensors VFS491 type: <vendor specific> driver: N/A 
           rev: 1.1 chip ID: 138a:003d 
           Device-2: 1-1.3:4 info: Primax type: Video driver: uvcvideo rev: 2.0 chip ID: 0461:4dfe 
           Hub: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 chip ID: 1d6b:0002 
           Hub: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0 
           chip ID: 8087:0024 
           Device-3: 2-1.6:3 info: Qualcomm Atheros type: Bluetooth driver: btusb rev: 1.1 
           chip ID: 0cf3:311d 
           Hub: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 chip ID: 1d6b:0002 
           Hub: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 chip ID: 1d6b:0003 
Sensors:   System Temperatures: cpu: 60.0 C mobo: 0.0 C 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http: //packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main
           2: deb http: //archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http: //archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http: //archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http: //archive.canonical.com/ubuntu/ focal partner
Info:      Processes: 265 Uptime: 1h 19m Memory: 7.66 GiB used: 2.43 GiB (31.7%) Init: systemd 
           v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Client: Unknown python3.8 client 
           inxi: 3.0.38 
User avatar
AndyMH
Level 21
Level 21
Posts: 13575
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Dual Boot - Only boots to Mint

Post by AndyMH »

mamba76 wrote: Thu Apr 22, 2021 10:29 pm What is controlling the boot now? The BIOS, EFI partition or the root of Mint? As I take it, anyway you try for dual boot your <system reserved> and <C:/> partitions never get altered. Is the MBR on C partition or system reserved?
Boot is controlled by BIOS which has read the EFI partition. When you installed mint, it put mint (the entry showing in BIOS will be 'ubuntu') at the top of BIOS boot list. Should still see the windows bootloader there further down the list. You converted the drive to GPT, you no longer have a MBR, more info on GPT:
https://en.wikipedia.org/wiki/GUID_Partition_Table
update-grub found win, so your problem is that grub is not showing on boot:
https://www.fosslicious.com/2020/01/sho ... linux.html
If you press Esc after the manufacturer's boot screen you should get grub giving you the option of mint or win. The link tells your how to make it permanent.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
mamba76
Level 1
Level 1
Posts: 25
Joined: Thu Apr 22, 2021 8:57 pm

Re: Dual Boot - Only boots to Mint

Post by mamba76 »

That sounds like how it should work. Iv not seen anything identifiable as GRUB on boot. (I would add images but I realise it not as easy here as windows lol)

Hitting ESC during the HP logo just brings me to 2 relevent options -
----
f9 Boot Device Options
f10 BIOS setup
----
In BIOS fastboot = off, secureboot = off, clear secure boot keys = on, UEFI Hybrid(CSM) mode selected
Back to boot menu - press f9 and I get options -
----
OS Boot Manager (which goes straight to Mint)
Boot from EFI File (browses to a few boot loaders, I think this is where you find an entry for Windows and Ubuntu, tried all under windows but just goes same as NoteBook Hard Drive(below))
Optical Disk
NoteBook Hard Drive (which tries to load windows and fails) - Boot Device Not Found - Hard Disk (3F0)
NoteBook Ethernet
-----

I take it, as you say there's no MBR, does the first sector now hold GPT info instead of MBR? or has the MBR gone for good and boot looks for the VBR (Volume Boot Record) in the EFI partition? in that case what is stored in the first 512 bytes now? Information to FIND the EFI partition ?
Thanks
mamba76
Level 1
Level 1
Posts: 25
Joined: Thu Apr 22, 2021 8:57 pm

Re: Dual Boot - Only boots to Mint

Post by mamba76 »

Under - EFI Boot Menu - I have 3 options -
1) Microsoft (all options here lead to failed windows boot, OS not found)
2) Boot (all options here boot to Mint with msg - System boot order not found - inizialising defaults)
3) Ubuntu (all options here boot to Mint but without the message in option 2, just long black screen before desktop shows up)

I edited the GRUB file and changed it from 'hidden' to 'menu' as suggested.

- sudo -apt install gedit
- sudo gedit /etc/default/grub
* changed property GRUB_TIMEOUT_STYLE=menu
-save
-reboot - nothing changed
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Dual Boot - Only boots to Mint

Post by fabien85 »

mamba76 wrote: Fri Apr 23, 2021 10:22 am - sudo apt install gedit
- sudo gedit /etc/default/grub
* changed property GRUB_TIMEOUT_STYLE=menu
-save
-reboot - nothing changed
Go to the line below, reading like "GRUB_TIMEOUT=5" and make sure you have a non-zero number. It's the number of seconds that the menu is displayed (unless a key is pressed during this time).
Also and more importantly, you need to sudo update-grub after making the change (and saving it).
mamba76
Level 1
Level 1
Posts: 25
Joined: Thu Apr 22, 2021 8:57 pm

Re: Dual Boot - Only boots to Mint

Post by mamba76 »

Thanks, this time remembered to update. Here my full file.

--------
# 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"
-----
After reading this thread
https://askubuntu.com/questions/1165001 ... tween-uefi
Would Mint be installed in UEFI mode or Legacy mode? How can I tell?
----
Device Start End Sectors Size Type
/dev/sda1 63 192779 192717 94.1M Microsoft basic data
/dev/sda2 192780 424980114 424787335 202.6G Microsoft basic data
/dev/sda3 424980480 425185279 204800 100M EFI System
/dev/sda4 425185280 976771071 551585792 263G Linux filesystem
----
If in UEFI mode the boot process should jump straight to the start sector of the EFI partition. Notice sda1 still starts at sector 63, Im guessing sda0 is the MBR and among other tasks MBR is also is responsible for directing the boot process to the EFI partition.
Im thinking out loud now lol but will keep reading. Also everything I do is now is from Linux so getting used to this too.
I cloned my original disk to this new SSD using AOMEI backup. I could convert the original HDD to GPT the same way and compare the 2 EFI partitions, I know that Windows would boot on that one.
User avatar
AndyMH
Level 21
Level 21
Posts: 13575
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Dual Boot - Only boots to Mint

Post by AndyMH »

Would Mint be installed in UEFI mode or Legacy mode? How can I tell?
Open a terminal and efibootmgr, e.g.

Code: Select all

andy@T431 ~ $ efibootmgr
EFI variables are not supported on this system.
I'm booting in legacy mode, if you see different then UEFI.

Other clues, when booting in legacy mode your system drive is normally formatted with a legacy/msdos partition table, if booting UEFI you normally have a GPT partition table. gparted is the standard linux partition editor, install from sw manager. My system drive:
Screenshot from 2021-04-23 20-51-41.png
You get the panel on the left from view > device information. I'm legacy boot and have an msdos partition table.
If in UEFI mode the boot process should jump straight to the start sector of the EFI partition.
NO, you don't understand. If you mount your EFI partition (use the disks program) and have a look inside you will see folders for each OS installed, BIOS passes control to the bootloader in each folder (which one is determined by your BIOS boot list).
Notice sda1 still starts at sector 63, Im guessing sda0 is the MBR and among other tasks MBR is also is responsible for directing the boot process to the EFI partition.
Not normal, but okay, a GPT partition table is the first 34 sectors (with a backup copy at the end of the drive), so starting at sector 63 is okay. Normally the first partition starts at sector 2048 (=1MB).
You don't have an MBR if you are booting UEFI, the bootloader lives in the EFI partition and there is no such thing as sda0.
I cloned my original disk to this new SSD using AOMEI backup.
A windows tool when running linux? Next time use a linux utility, there are a number of choices, I developed foxclone:
https://www.foxclone.com/
viewtopic.php?f=47&t=315557&p=1784922&h ... e#p1784922
There is a user guide you can download, msdos and gpt partition tables are explained (page 48 on...).

For future posts, if you want to post terminal output, then use code tags (the </> button above the reply window, you paste the output between the tags). It makes it much easier to read (and more likely to get a response), e.g. your drive output:

Code: Select all

Device Start End Sectors Size Type
/dev/sda1 63 192779 192717 94.1M Microsoft basic data
/dev/sda2 192780 424980114 424787335 202.6G Microsoft basic data
/dev/sda3 424980480 425185279 204800 100M EFI System
/dev/sda4 425185280 976771071 551585792 263G Linux filesystem
There can be a steep learning curve with linux, but it is worth it :D
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
mamba76
Level 1
Level 1
Posts: 25
Joined: Thu Apr 22, 2021 8:57 pm

Re: Dual Boot - Only boots to Mint

Post by mamba76 »

Thats helped a lot, thanks.
Ok, I switched to pure UEFI mode in BIOS (without CSM) as the only option I need is Boot from EFI File. Amazingly the folders on boot screen match the folders available in

Code: Select all

 /boot/efi
!
So somewhere here lies the issue, got it!
When I do eventually get windows to boot, I would like to start the laptop and be presented with a 2 option menu- windows / Ubuntu - similar to what easyBCD does but for now I will concentrate on getting Win10 to start, so anything I can look at / change in these boot files?

tried so far -
1) changed /etc/default/grub -

Code: Select all

GRUB_TIMEOUT_STYLE=menu
(Iv seen no menu yet after reboot, yes done sudo update-grub)

Code: Select all

GRUB_TIMEOUT=10
was already set.
That's it so far..
Partition table is GPT
How do you upload pictures?
mamba76
Level 1
Level 1
Posts: 25
Joined: Thu Apr 22, 2021 8:57 pm

Re: Dual Boot - Only boots to Mint

Post by mamba76 »

PROBLEM SOLVED

ENABLE SECURE BOOT AGAIN

I have the grub and can boot back into windows. Now I feel like a complete tool!
Thanks for your help tho guys Im sure I learnt something!
Locked

Return to “Installation & Boot”