Unable too boot to Linux Mint 21 after install

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.
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

I have a new UEFI PC that I built last fall and installed Windows 11 on it.

I have decided that I want to boot Mint (again) so I went through all the usual stuff to create a USB stick, download an ISO file, format the USB stick to boot, boot from it, use the Something Else option to format the new SSD with the partitions needed, install Mint, remove the USB stick and reboot --

Which is when I get the GRUB prompt, no menu. So I thought, no problem, I will reboot into the BOOT menu and select the Mint SSD.

But when I reboot into UEFI mode to select the Mint drive, there is no entry for the Mint SSD, only entries for the Windows drives.

The PC has Secure Boot disabled and Fast Boot also disabled -- so this should work.

I downloaded the Mint21 Mate 64-bit ISO from the Mint site and created the USB stick using RUFUS with the ISO option and GPT format.

In Something Else, I was careful to create a 512MB ESP partition on the new SSD, as well as the Ext-4 partitions, and to have to boot files written to that partition.

Yeah, I know this should be simple -- but I have not done this in UEFI before and am stumped about what to do now.
Last edited by LockBot on Mon Feb 06, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
mikaelrask
Level 5
Level 5
Posts: 801
Joined: Wed Mar 13, 2019 7:38 am
Location: Sweden
Contact:

Re: Unable too boot to Linux Mint 21 after install

Post by mikaelrask »

hey and welcome to the forum and linux mint, did you shrink the disk from windows before installing linux mint because linux have problem writing to ntfs filiesystem ?
kernal 5,15 adds some more support for ntfs system but don't know if it can write to it yet maybe.
CPU AMD Ryzen 9 7900
Graphic Card: AMD ATI Radeon RX 7900 XT/7900 XTX/7900M
Ram 32 GB ddr 5
Kernel: 6.5.0-14 generic
LM Cinnamon 21.3 edge
User avatar
AndyMH
Level 21
Level 21
Posts: 13752
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Unable too boot to Linux Mint 21 after install

Post by AndyMH »

From another post within the last couple of days - have you disabled TPM in BIOS, win demands it to install?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

I did not shrink anything; instead, I installed from USB stick to a clean SSD, which I formatted using the installer and Something Else. The installation appeared to complete OK, but after, whenever I boot, I get only the GRUB prompt. I can boot from Linux USB sticks without issue.

I went into the BIOS settings and confirmed that Secure Boot, Fast Boot, and TPM were all disabled.

I can't easily remove the Windows disks because they are NVMe sticks bolted to the motherboard and covered with heatsinks. So, I need to avoid any installation process (like AlongSide) that will mess with the Windows installations -- and when I have used Something Else in the past on MBR systems, the installations completed and I rebooted into Linux distros without any issue.
User avatar
AndyMH
Level 21
Level 21
Posts: 13752
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Unable too boot to Linux Mint 21 after install

Post by AndyMH »

Maybe 'teaching granny to suck eggs' but with something else you have to create the partitions you want and tell the installer what to use them for. I always pre-partition the drive with gparted.

UEFI boot - there was a bug in the LM20 installer, it would put grub in the first EFI partition it found not what you told it. Not tested LM21 for this yet.
In Something Else, I was careful to create a 512MB ESP partition on the new SSD
Did you set the flags esp & boot? That's how the system recognises it is your EFI partition.

Boot your install stick, use disks to mount your efi partition(s) and have a look inside, you should find an ubuntu folder with grub files inside.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

AndyMH: I only created the partition in Something Else, I did not set any flags.

In the meantime, I read a thread about using Mint 20.03 -- but the problem with that is that this new system has a 2.5Gb LAN chip and Mint does not see that. So, it looks like I am stuck with Mint 21.

I will reboot and reinstall using Mint 21 and look inside the EFI partition for the folder and files.

thanks
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3595
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Unable too boot to Linux Mint 21 after install

Post by Jo-con-Ël »

It is not clear for me what you expected to find on boot options as you talk about Linux Mint or Windows drives (UEFI boot options are not drives but Windows boot manger, ubuntu,.. only removable media as CD/DVD or USB are show as UEFI options). I mean it is not clear if Windows is installed on UEFI mode.

Because of Mint installer bugs (I do have tested on LM21), Linux Mint loader would be placed on Windows disk EFI partition as Andy said, never mind you boot and install Mint on UEFI or BIOS legacy mode. In that case LM UEFI boot option (ubuntu) would be detected by system.
Try to find Ubuntu option on computer setup (BIOS setup) maybe you have a BBS hard drive priority option where you can change default boot option from Windows to ubuntu.

If you can not find any ubuntu option on boot order or boot menu, something was wrong on installing loader (Installer had not access to Windows disk or there is not such EFI partition on Windows disk in case it is installed on BIOS mode, so Mint's installer would use EFI partition you created but if it is a MBR disk,...who knows).
Even if thinking on reinstalling, do as indicated and boot Linux Mint Live on UEFI mode and post back following codes result

Code: Select all

sudo fdisk -l
sudo blkid
sudo efibootmgr -v
Last edited by Jo-con-Ël on Mon Aug 08, 2022 5:45 am, edited 5 times in total.
Arrieritos semos y en el camino nos encontraremos.
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

I guess more explanation is in order.

First, I am not installing to a Windows disk. I have Windows installs, each on their own disk. I am installing to a blank SSD -- with no OS already on it.

Second, the Linux USB stick is formatted GPT and I am installing on a UEFI system, so I read instructions about creating the ESP using the Mint installer and I expected that to work OK, but apparently it does not because after the install, when I remove the USB stick and reboot, it does not boot into Mint. Furthermore, when I bring up the BIOS boot menu, it does not list the Mint disk as a boot option.

Third, I thought I would try an MBR (legacy) installation from Mint 20.03 but booting from that does not see my networking chip, so that is not an option.

Fourth, I have read now about files that should be present in the EFI System Partition if the Mint installer works correctly, so my next step is to reinstall Mint in UEFI mode, and if that does not reboot (again), then reboot using the Mint USB stick and looking at the contents of the ESP on the Mint disk to see if the files are there.

I will report back what I find.
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

UPDATE: AndyMH -- you were on the right track.

I searched the different EFI folders on the drives (using command prompt in Windows) and found out that the "ubuntu" folder containing the boot files actually exists on one of the Windows disks.

I am able to boot using that selection -- I had ignored it because I thought it was an error -- but I really want to move that ubuntu folder to the Mint disk EFI folder and don't know how to do that -- as I am very rusty on Linux commands.

UPDATE: I had a look at the fstab file and it says clearly in there that the files were written to the nvme disk -- the one holding Windows.

It's too late for me to attempt this today, but tomorrow, I will reinstall and be careful to check that I specify the correct drive. If this repeats, it looks like I will have to (move) the ubuntu folder to the EFI partition on the Mint disk and edit the fstab accordingly.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3595
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Unable too boot to Linux Mint 21 after install

Post by Jo-con-Ël »

Mark Phelps wrote: Sun Aug 07, 2022 7:59 pm I will reinstall and be careful to check that I specify the correct drive.
It looks like you misunderstood what I said on previous post and still don't understand what Mint installer does because the bug (me and other users have already tested on LM 21). You wont be able to select EFI partition on installing. It will install LM loader on main Windows disk EFI partition never mind you install on BIOS or UEFI mode and create a dedicated EFI partition...Reinstalling will only overwrite ubuntu folder on Windows EFI partition.
You need to apply a workaround (unplug/disconnect Windows disk or remove flags on its EFI partition) before installing/reinstalling in order EFI partition you have created on LM disk would be used and reconnect Windows disk or re-flag its EFI partition after installing.

Also, now Mint UEFI loader (ubuntu) is placed on Windows disk EFI partition and you will need to remove from there.
You don't need to reinstall, If you want LM booting from its own EFI partition it can be done from current Mint installation:
-remove /EFI/Ubuntu on wiindows disk, now on /boot/efi,
-replace UUID with LM EFI partition one on fstab efi line,
-unmount current EFI partition on /boot/efi,
-mount LM EFI one on /boot/efi,
-install grub on LM disk ,
-check boot order with efibootmgr and if needed change it.
Just provide codes result I was asking for (at least lsblk -f and sudo efibootmgr -v ) and wait for AndyMH detailed instructions. Good luck. :wink:
Arrieritos semos y en el camino nos encontraremos.
User avatar
AndyMH
Level 21
Level 21
Posts: 13752
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Unable too boot to Linux Mint 21 after install

Post by AndyMH »

An EFI partition needs to be size 100MB, format fat32 and flags esp & boot set.

Note - I am not an expert with UEFI boot, most of my systems boot legacy, there are others like by Jo-con-Ël who know more than I do. But...

I'm wondering if you copy the files from the EFI partition on your win drive to the EFI partition on your mint drive - will it work? Don't have a UEFI boot system to hand, from memory there are three folders in the EFI partition, boot, ubuntu and windows. If you copy the boot and ubuntu folders?

Success would be finding two 'ubuntu' entries in your BIOS boot list and both booting.

The other route would be to boot mint and re-install grub to your EFI partition on the mint drive. Might be the simplest. There is some guidance here:
https://help.ubuntu.com/community/Grub2/Installing
For legacy I know that this works

Code: Select all

sudo grub-install /dev/sdX  
replace X with the drive that mint is on. I do not know if this will work for UEFI boot. I would wait for others to advise.

You can boot your mint install stick and re-install grub that way:
https://askubuntu.com/questions/831216/ ... -partition
see answer 142.

Whichever route you choose, you can confirm which is the right ubuntu after booting with lsblk. It will show you your partitions and what is mounted, you are looking for the partition mounted at /boot/efi.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

OK, folks, I tried the grub-install, and despite it not showing any errors, when I reboot, there is no additional UEFI boot entry.

Here are the results of the fdisk command:

Code: Select all

 sudo fdisk -l
[sudo] password for bill:           
Sorry, try again.
[sudo] password for bill:           
Disk /dev/nvme1n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: Inland NVMe SSD                         
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: 4DC7244A-3F82-4DB2-BF1B-6D5D652A76FB

Device             Start       End   Sectors   Size Type
/dev/nvme1n1p1      2048    206847    204800   100M EFI System
/dev/nvme1n1p2    206848    239615     32768    16M Microsoft reserved
/dev/nvme1n1p3    239616 117065727 116826112  55.7G Microsoft basic data
/dev/nvme1n1p4 117065728 499140607 382074880 182.2G Microsoft basic data
/dev/nvme1n1p5 499142656 500117503    974848   476M Windows recovery environment


Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500P2SSD8                             
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: 1D7D0420-1583-03AF-0841-5FC760C5EB00

Device         Start       End   Sectors   Size Type
/dev/nvme0n1p1  2048 976766975 976764928 465.8G Microsoft basic data


Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SV300S3
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: 2BB44796-262E-11EC-ACA2-C7A2CC6B977D

Device         Start       End   Sectors   Size Type
/dev/sda1       2048    206847    204800   100M EFI System
/dev/sda2     206848    239615     32768    16M Microsoft reserved
/dev/sda3     239616 117938175 117698560  56.1G Microsoft basic data
/dev/sda4  117938176 119255039   1316864   643M Windows recovery environment
/dev/sda6  119255040 468856831 349601792 166.7G Microsoft basic data


Disk /dev/sdb: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SATA SSD        
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: 4DBBC8E0-54C6-03B1-38F2-6E933155EC00

Device         Start       End   Sectors  Size Type
/dev/sdb1   95289344 218818559 123529216 58.9G Microsoft basic data
/dev/sdb2  218818560 250068991  31250432 14.9G Linux swap
/dev/sdb3       2048    999423    997376  487M EFI System
/dev/sdb4     999424  95289343  94289920   45G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sdc: 232.89 GiB, 250059350016 bytes, 488397168 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: 2C382540-68F2-03AF-5009-0E8B3CDAEB00

Device         Start       End   Sectors   Size Type
/dev/sdc1       2048    206847    204800   100M EFI System
/dev/sdc2     206848    239615     32768    16M Microsoft reserved
/dev/sdc3     239616 135630847 135391232  64.6G Microsoft basic data
/dev/sdc4  135630848 136755199   1124352   549M Windows recovery environment
/dev/sdc5  136755201 488394752 351639552 167.7G Microsoft basic data


Disk /dev/sdd: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WD10EACS-00D6B1 
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: dos
Disk identifier: 0x9d57ced5
Device     Boot Start        End    Sectors   Size Id Type
/dev/sdd1        2048 1953523711 1953521664 931.5G 83 Linux
 
Here are the results of the blkid command:

Code: Select all

 sudo blkid
[sudo] password for bill:           
/dev/nvme0n1p1: LABEL="DataVol" BLOCK_SIZE="512" UUID="01D6A4B74C4DDCF0" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="00000093-ae00-8ec5-c18a-d70126010000"
/dev/sdd1: LABEL="Linux-Archives" UUID="39f3069d-3899-4f4b-9685-b4b2ead04e77" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="9d57ced5-01"
/dev/sdb4: UUID="d54b1956-7c68-4103-8ea7-67dae64a2308" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d900a3e2-e1d1-4246-bcd6-5a019c3f500d"
/dev/sdb2: UUID="5d767569-8e4c-420f-8fee-d7f4fee8f8be" TYPE="swap" PARTUUID="b6e83873-8bd3-4fc5-8cb2-8f3fb6cea118"
/dev/sdb3: UUID="B723-C4E5" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="fe373fb0-8e47-4a5c-ae3d-d71b01b6e530"
/dev/sdb1: LABEL="Ext-Share" UUID="c2c1ef58-82f3-4dcd-b4dd-7b245dc2ee54" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="27ffe470-aa63-01d8-38f2-6e933155ec00"
/dev/sdc5: LABEL="W11Storage" BLOCK_SIZE="512" UUID="01D875F4A0346D10" TYPE="ntfs" PARTUUID="2b21efc5-eaec-4db1-b9ea-2713b8182915"
/dev/sdc3: LABEL="W11Pro" BLOCK_SIZE="512" UUID="6618389318386469" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="74e00679-98da-4394-8d30-83c35533561f"
/dev/sdc1: UUID="DE37-844C" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="f9e20b78-5b19-41ef-9403-a6d0c99e3986"
/dev/sdc4: BLOCK_SIZE="512" UUID="01D884E24B21A0C0" TYPE="ntfs" PARTUUID="a49c04a7-90cc-401e-a31c-c86448edee46"
/dev/nvme1n1p4: LABEL="W10Storage" BLOCK_SIZE="512" UUID="01D80806EE7C5020" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="3d2727f0-c70f-01d7-f893-919e87e3eb00"
/dev/nvme1n1p5: BLOCK_SIZE="512" UUID="01D7C70F2B9FF8A0" TYPE="ntfs" PARTUUID="4b6d8bbc-01b3-4b0c-87fc-f01158c4242a"
/dev/nvme1n1p3: LABEL="W10Pro" BLOCK_SIZE="512" UUID="01D80806E576BE20" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="1bdd5563-6008-42bf-914b-11ee64d7db8e"
/dev/nvme1n1p1: UUID="A066-F9EE" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="25f04ad2-68ef-4bba-82ff-134fddbe3fd5"
/dev/sda4: BLOCK_SIZE="512" UUID="01D87854FC505A20" TYPE="ntfs" PARTUUID="482593ae-bc36-4d62-b7a9-9ccdb6742207"
/dev/sda3: LABEL="W11Beta" BLOCK_SIZE="512" UUID="01D7BA1AC8642000" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="35f33fd9-7bf4-4f4a-9aa0-5fd20a9b88a7"
/dev/sda1: UUID="A066-F9EE" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="49478cfd-7745-4332-ab7a-99ffc2d2b1a7"
/dev/sda6: LABEL="W11Insider-Storage" BLOCK_SIZE="512" UUID="01D8785505CB9150" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="29307827-e393-40d2-85ad-36bb6d4e6d0f"
/dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="80beb120-46b0-4b14-9710-8bbc2fbecd05"
/dev/nvme1n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="b7660a36-f9f3-4ae2-a1d3-ff94230fdc05"
/dev/sda2: PARTLABEL="Microsoft reserved partition" PARTUUID="be8037e9-5e6a-4a76-a4d8-7ba4444a7400"
bill@bill-desktop:~$ 
 
Here are the results of the efibootmgr command:

Code: Select all

 sudo efibootmgr -v
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0001,0003,0000
Boot0000* Windows Boot Manager	HD(1,GPT,f9e20b78-5b19-41ef-9403-a6d0c99e3986,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.}...a................
Boot0001* Windows Boot Manager	HD(1,GPT,49478cfd-7745-4332-ab7a-99ffc2d2b1a7,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)..BO
Boot0002* ubuntu	HD(1,GPT,25f04ad2-68ef-4bba-82ff-134fddbe3fd5,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0003* Windows Boot Manager	HD(1,GPT,25f04ad2-68ef-4bba-82ff-134fddbe3fd5,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)..BO 
Hope all that helps...
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

UPDATE: Used Gparted to identify the partitions and devices and copied the boot and ubuntu directories from the EFI partition on the Windows NVMe drive to the EFI partition on the Mint SSD. Checked the flags on the Mint SSD EFI directory to ensure they were efi and boot. Rebooted -- still no boot entry in BIOS list for Mint disk.

OK, so I tried reinstalling GRUB and I tried copying the boot folders, and neither of those seems to fix the issue.

I don't really want to start hacking around with fstab at this point because I'm liable to break something and then have to reinstall Mint all over again.
User avatar
AndyMH
Level 21
Level 21
Posts: 13752
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Unable too boot to Linux Mint 21 after install

Post by AndyMH »

As I said previously, not an expert with UEFI boot but
efibootmgr is saying:

Code: Select all

Boot0002* ubuntu	HD(1,GPT,25f04ad2-68ef-4bba-82ff-134fddbe3fd5,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)
which is pointing at

Code: Select all

/dev/nvme1n1p1: UUID="A066-F9EE" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="25f04ad2-68ef-4bba-82ff-134fddbe3fd5"
from the output from blkid. This is the EFI partition on your win nvme drive.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

AndyMH: That is correct. Since the Windows NVMe drive is the "first" in the system, its EFI directory was modified by Mint to include the files and folders needed for the Linux boot.

I was hoping that copying those files and folders to the EFI directory on the Mint disk, and rebooting, I would then see another BIOS boot entry, but for the Mint disk instead of the Windows drive.

I am reluctant to mess with fstab file because, unless I can see a BIOS boot entry for Mint, I would not be able to boot back into it once I changed it.

And, I know the "simple" solution would be to disconnect all the other drives and reinstall Mint -- which is how I used to do it -- but two of the Windows drives are NVMe SSDs that are bolted to the motherboard and covered with heatsinks -- removing the heatsinks would damage them and I can not afford to do that.

At least, the Mint installation did not damage the Windows boot on that drive, so I can still boot into it.

But -- I don't like mixed environments like this and would really move the Linux booting to where it should be -- the Mint drive, and them remove the ubuntu and boot folders from the Windows drive.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3595
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Unable too boot to Linux Mint 21 after install

Post by Jo-con-Ël »

You have messed something, notice sda1 has the same UUID as nvme1n1p1. You will need to change one of those UUID in any case.

Code: Select all

/dev/nvme1n1p1: UUID="A066-F9EE" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="25f04ad2-68ef-4bba-82ff-134fddbe3fd5"
(...)
/dev/sda1: UUID="A066-F9EE" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="49478cfd-7745-4332-ab7a-99ffc2d2b1a7"
Now I would need cat /etc/fstab and be sure what EFI partition is mounted when booting LM with lsblk -f.

Any way, following are datailed instruccions to get LM booting from its own EFI partition from current installed Mint (i.e w/o reinstalling).
-remove /EFI/ubuntu folder on nvme Windows disk, supposed it is mounted on /boot/efi (need to be sure it is mounting /dev/nvme1n1p1 as per lsblk -f) run

Code: Select all

sudo rm -R /boot/efi/EFI/ubuntu
-replace UUID with LM EFI partition one on fstab efi line,
Run

Code: Select all

 xed admin:///etc/fstab
and replace current UUID (UUID=A066-F9E??) with UUID="B723-C4E5". that is
UUID=B723-C4E5 /boot/efi vfat umask=0077 0 1
Save file and close editor
-unmount current EFI partition on /boot/efi,

Code: Select all

sudo umount /boot/efi
-mount LM EFI one on /boot/efi,

Code: Select all

sudo mount /dev/sdb3 /boot/efi
-install grub on LM disk,

Code: Select all

sudo grub-install /dev/sdb
-check boot order with efibootmgr.

Code: Select all

sudo efibootmgr -v
Then restart and see you can boot ubuntu option on boot menu w/o problem.
AndyMH wrote: Mon Aug 08, 2022 8:22 am The other route would be to boot mint and re-install grub to your EFI partition on the mint drive. Might be the simplest. There is some guidance here:
https://help.ubuntu.com/community/Grub2/Installing
For legacy I know that this works

Code: Select all

sudo grub-install /dev/sdX  
replace X with the drive that mint is on. I do not know if this will work for UEFI boot. I would wait for others to advise.
You can run those codes also to install loader on EFI partition, the only thing is EFI partition need to be mounted on /boot/efi as indicated before.

Also It is not probable firmware would show you two UEFI boot option pointing to the same system on boot menu , I mean if LM loader (ubuntu) is intalled one EFI partition (nvme1n1p1), it wont show another ubuntu on another EFI partition (sdb3 or whaterver alse), at least in my case unless it was pointing to different efi files (grubx64.efi not shimx64.efi).
Last edited by Jo-con-Ël on Mon Aug 08, 2022 7:58 pm, edited 8 times in total.
Arrieritos semos y en el camino nos encontraremos.
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

Jo-Con-El:

I did not miss that. The dev/nvme1n1p1 EFI partition is the one on the Windows drive that contains the Linux boot folders and files. The Mint installer wrote it there, ignoring my request to write it to /dev/sdb3.

I copied those same files manually to the EFI partition on /dev/sdb3, hoping that when I rebooted, that would show up in the BIOS boot screen as a selection -- but it does not. The BIOS boot screen only shows the option to boot Ubuntu from the Windows drive.

I already mentioned that I did the grub-install stuff, and while that wrote files, I still fail to get a boot selection on the BIOS boot screen for the Mint drive.

Right now, boot is working, even though its from a Windows drive. I don't want to remove that until I get boot working from the Mint drive -- and nothing I have done so far results in a Mint boot entry in the BIOS boot screen.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3595
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Unable too boot to Linux Mint 21 after install

Post by Jo-con-Ël »

Read final lines on last post and, please, do as indicated step by step.
Arrieritos semos y en el camino nos encontraremos.
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Unable too boot to Linux Mint 21 after install

Post by Mark Phelps »

Jo-con-Ël wrote: Mon Aug 08, 2022 7:43 pm Read final lines on last post and, please, do as indicated step by step.
OK ... understand. I now have to think about this ...

Thanks for the detailed instructions.

I will post the current contents of fstab when I get a chance to boot back into Mint.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3595
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Unable too boot to Linux Mint 21 after install

Post by Jo-con-Ël »

You have several options to boot an already installed system if you have mess its UEFI boot and solve the problem from inside that system (refind cd-rom or flahdrive is my favorite one as you boot installed system on UEFI modenver mind if you installed o BIOS mode, but also with Live supergrub2/recatux)

Also you can boot Linux Live USB connected to internet and run Boot Repair>BootInfo Summary option and postback url when offered to share. I do not recommend run Boot Repair Recommended repair option w/o knowing first what it will do when running recommended repair option as per Bootinfo summary final lines.

You don't need Boot Repair in any case (see pbear's instrucctions by example).
1)You will be able to mount any EFI partion on Windows disks with Disk (Menu>Accessories>Disks).
Notice with Disks you will be able to create a partition img file with any EFI partition and restore if needed (Select partition>Click on gears icon downside>... ).

Then with file browser as root remove their /EFI/Ubuntu folders .

Also mount EFI partiton on sdb (sdb3) and remove any file and folder you have moved inside that partition . Following grub-efi installation will recreate all it is needed.
2)Then from terminal

a)mount Mint partition and change fstab file .

Code: Select all

sudo mount /sdb4 /mnt
sudo nano /mnt/etc/fstab
replace efi partition UUID as indicated
UUID=B723-C4E5 /boot/efi vfat umask=0077 0 1

Save changes (Ctrl+O and then Enter to confirm) and close editor (Ctrl+X)
b)complete mounting and reinstall grub-efi on sdb

Code: Select all

sudo mount /sdb3 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo cp /etc/resolv.conf /mnt/etc
modprobe efivars
apt install grub-efi-amd64-signed shim-signed 
grub-install --recheck /dev/sdb
update-grub
exit
c)Unmount

Code: Select all

for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
sudo umount /mnt/boot/efi 
sudo umount -R /mnt
You can see now on sudo efibootmgr -v ubuntu boot option and where it is placed. Check UUID with sdb3 EFI PARTUUID on previous blkid results. i.e PARTUUID="fe373fb0-8e47-4a5c-ae3d-d71b01b6e530").
Boot000X* ubuntu HD(Y,GPT,fe373fb0-8e47-4a5c-ae3d-d71b01b6e530,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Reboot, choose that ubuntu option on boot menu and see results.
Arrieritos semos y en el camino nos encontraremos.
Locked

Return to “Installation & Boot”