LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-18-2022, 03:41 AM   #1
RedBlack
LQ Newbie
 
Registered: May 2022
Posts: 4

Rep: Reputation: 0
Question GRUB installing on Windows 10 boot partition instead of requested boot partition


I wanted to install Linux Mint on separate SSD. I was afraid that Linux Mint installer will install GRUB to Windows ESP by default, so I disabled all drives except target drive. The installation completed successfully. After I enabled all drives back on and upgrading all packages(including GRUB), it now shows GRUB boot menu. I was scared that GRUB actually installed on Windows ESP.

How to make it so GRUB will upgrade on ESP in second SSD not in first?

I want to do this as shown in this diagram:
 
Old 05-18-2022, 05:13 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
I'm not familiar with the Mint installer but I know that the Ubuntu Ubiquity installer will install the grub boot files to the first EFI partition it finds. I don't know if the Mint installer does this. It however, would have simply created a separate directory in that partition and would not change or overwrite the windows files.

Quote:
How to make it so GRUB will upgrade on ESP in second SSD not in first?
Are you referring to the command: sudo update-grub? Grub won't be able to update files on the windows EFI because there are no Grub files there to update. You would first need to install Grub there which you don't want to do.

If you're paranoid about this, disconnect/disable the windows drive before updating Grub.

Do you have the Mint drive set to first boot in the BIOS Firmware? Do you have a windows entry in the Grub menu? Does it boot?

I'm not sure I read your situation correctly.

Last edited by yancek; 05-18-2022 at 05:18 AM.
 
1 members found this post helpful.
Old 05-18-2022, 05:23 AM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Open a terminal and post the output of the following:
Code:
df -h
sudo efibootmgr -v
 
Old 05-18-2022, 05:29 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Multiple EFI partitions is a terrible idea. Grub isn't your (potential) problem, a future Windows upgrade will be.

Just use the Windows EFI and save yourself a bunch of grief.
 
Old 05-18-2022, 08:09 AM   #5
RedBlack
LQ Newbie
 
Registered: May 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
Do you have the Mint drive set to first boot in the BIOS Firmware? Do you have a windows entry in the Grub menu? Does it boot?
I usually set Windows to first boot. Also it shows in GRUB menu as Windows 10 (on /dev/sdc1). Also when I try to boot Windows by choosing first SSD via UEFI boot menu, it doesn't boot with a winload.exe error.

P.S: Linux Mint is Ubuntu-based distro
 
Old 05-18-2022, 08:48 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
I usually set Windows to first boot. Also it shows in GRUB menu as Windows 10 (on /dev/sdc1). Also when I try to boot Windows by choosing first SSD via UEFI boot menu, it doesn't boot with a winload.exe error.
May be the result of two efi partitions, see post #4
 
Old 05-18-2022, 11:31 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
Quote:
I usually set Windows to first boot
Does that mean you set the windows drive to first boot in the BIOS firmware? Does it boot?

Quote:
Also it shows in GRUB menu as Windows 10 (on /dev/sdc1)
Again, does it boot?

Quote:
Also when I try to boot Windows by choosing first SSD via UEFI boot menu, it doesn't boot with a winload.exe error.
Is that the boot from EFI file option? If there is a winload.exe error, you need some windows tool to repair that corrupted or missing file, whatever the error is.

Have you mounted the different drives EFI partitions from Mint to see what directories and files are in each?
 
Old 05-18-2022, 11:46 AM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
In addition to the commands in post #3:
Code:
sudo parted -l
lsblk -f
cat /sys/firmware/efi

Last edited by colorpurple21859; 05-18-2022 at 11:57 AM.
 
Old 05-18-2022, 12:10 PM   #9
RedBlack
LQ Newbie
 
Registered: May 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
Open a terminal and post the output of the following:
Code:
df -h
sudo efibootmgr -v
Code:
File System      Size         Used  Available    Used% Mounted in
udev             3,9G            0  3,9G            0% /dev
tmpfs            795M         1,7M  794M            1% /run
/dev/sdd3        161G          16G  137G           11% /
tmpfs            3,9G            0  3,9G            0% /dev/shm
tmpfs            5,0M         4,0K  5,0M            1% /run/lock
tmpfs            3,9G            0  3,9G            0% /sys/fs/cgroup
/dev/sdd1        523M         5,3M  518M            2% /boot/efi
tmpfs            795M          44K  795M            1% /run/user/1000
efibootmgr
Code:
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0003,0000,0001
Boot0000* ubuntu	HD(1,GPT,07e6d577-04d0-4aa0-9e80-9b6d518510c3,0x800,0x106000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0001* Hard Drive	BBS(HD,,0x0)..GO..NO........u.S.S.D. .1.9.2.G....................A.................................>..Gd-.;.A..MQ..L.A.A.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.2.3........BO..NO........u.T.E.A.M. .T.2.5.3.X.2.2.5.6.G....................A.................................>..Gd-.;.A..MQ..L.P.T.F.B.1.2.7.0.2.0.0.0.0.5.0.4.9.0.0.3........BO..NO........u.S.A.M.S.U.N.G. .H.D.5.0.2.H.J....................A.................................>..Gd-.;.A..MQ..L.2.S.B.0.9.J.S.0.0.C.7.8.8.9. . . . . . ........BO..NO........u.W.D.C. .W.D.S.1.2.0.G.2.G.0.A.-.0.0.J.H.3.0....................A.................................>..Gd-.;.A..MQ..L.8.1.1.4.4.B.0.8.9.6.7.9. . . . . . . . ........BO
Boot0003* Windows Boot Manager	HD(1,GPT,a93ec2c2-8454-4989-97c1-240705eb1e14,0x800,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.}...,................
 
Old 05-19-2022, 01:30 AM   #10
RedBlack
LQ Newbie
 
Registered: May 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
In addition to the commands in post #3:
Code:
sudo parted -l
lsblk -f
cat /sys/firmware/efi
Code:
Model: ATA TEAM T253X2256G (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17,4kB  16,8MB  16,8MB               Microsoft reserved partition  msftres
 2      16,8MB  256GB   256GB   ntfs         Basic data partition          msftdata


Model: ATA SAMSUNG HD502HJ (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type      File system  Flags
 1      1049kB  368MB  367MB  primary   ntfs         boot
 2      105GB   500GB  395GB  extended
 5      105GB   500GB  395GB  logical   ntfs


Model: ATA WDC WDS120G2G0A- (scsi)
Disk /dev/sdc: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  106MB  105MB   fat32        EFI system partition          boot, esp
 2      106MB   123MB  16,8MB               Microsoft reserved partition  msftres
 3      123MB   119GB  119GB   ntfs         Basic data partition          msftdata
 4      119GB   120GB  545MB   ntfs                                       hidden, diag


Model: ATA SSD 192G (scsi)
Disk /dev/sdd: 193GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  551MB   549MB   fat32                 boot, esp
 2      551MB   16,9GB  16,4GB  linux-swap(v1)        swap
 3      16,9GB  193GB   176GB   ext4
Code:
NAME FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                   
├─sda1
│                                                                     
└─sda2
     ntfs   New volume
                  DE546C74546C5177                                    
sdb                                                                   
├─sdb1
│    ntfs   Reserved by the system
│                 DAEE8B6BEE8B3EAF                                    
├─sdb2
│                                                                     
└─sdb5
     ntfs         6CF8A7B8F8A77F48                                    
sdc                                                                   
├─sdc1
│    vfat         D089-F769                                           
├─sdc2
│                                                                     
├─sdc3
│    ntfs         023E8DEE3E8DDB55                                    
└─sdc4
     ntfs         6E4CD7384CD6F9B3                                    
sdd                                                                   
├─sdd1
│    vfat         398F-0769                             517,7M     1% /boot/efi
├─sdd2
│    swap         e15041cc-ef5f-4c7e-9122-5297f2778f58                [SWAP]
└─sdd3
     ext4         8bafdb60-8a08-445e-9575-62aad77847da  136,1G    10% /
Code:
cat: /sys/firmware/efi: Is a directory
 
Old 05-19-2022, 05:28 AM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Are there two window entries in the bios/firmware settings boot order?
 
Old 05-19-2022, 06:05 AM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
In your initial post, the question was whether the Mint installer would install on the windows drive or the Mint drive. Since you had the windows drive disconnected during the install of Mint, it would not have been possible for the Mint installer to install Grub on the windows drive. Mount sdc1 and look at sdd1 from Mint and you should see windows files on sdc1 and Mint files on sdd1.

As far as updating Grub, I don't see how Grub could update files on windows (sdc1) if it is only installed on sdd1. If this is the case, when you want to switch from windows to Mint or vice versa, you would need to do it in the BIOS firmware.
 
1 members found this post helpful.
Old 05-19-2022, 07:57 AM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
open a terminal
Code:
sudo efibootmgr -n 0001
reboot
What happens?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware64-current fdisk linux partition type 22 instead of 83 and named 'Linux root' instead of 'Linux' gdiazlo Slackware - Installation 9 04-30-2020 04:54 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
How to uninstall Windows black "GRUB" and use the purple grub instead? josepharari Linux - Newbie 9 05-16-2011 07:09 AM
X: warning; priority set to -1 instead of requested priority 0 HitmanX Linux - Newbie 5 12-13-2010 11:09 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration