[SOLVED] 20.3: split EFI and root partitions across different discs

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
multiSingularity
Level 1
Level 1
Posts: 36
Joined: Sat Feb 24, 2018 3:37 am
Location: Qld, Australia

[SOLVED] 20.3: split EFI and root partitions across different discs

Post by multiSingularity »

I have a dual boot system with LM20.3 and Win10, boot choice driven from the GRUB menu. Win10 is on a 480Gb SATA SSD and LM system was on a 256Gb SATA SSD which slowly started dying, so I cloned it to a 1Tb HDD I had lying around. Needless to say, LM is now ooooohhhh ssssoooooo ssssllloooooowwww!. My home partition I had migrated to a 1Tb NVMe connected to a PCIe riser card (motherboard around 10 yrs old, so no on-board M.2 slots). Both OSes boot UEFI.

I thought to myself, if it was so easy to clone the SSD to the HDD, why not get a nice fast 2Tb NVMe card and clone to that?

Great idea... except that my creaky old motherboard with its 2013 BIOS coudn't see the NVMe drive to boot from it. I tried all manner of workarounds to no avail, including using the ailing SSD's EFI as the boot device but having the root filesystem on the NVMe - wouldn't play, even with cloned partition UUIDs. Got myself into a huge mess with nothing booting any more... managed to unscramble the eggs and am now back to square one with both OSes booting again, LM running from the HDD but the home partition now lives on the 2Tb NVMe instead of the previous 1Tb NVMe. I updated the motherboard BIOS to the latest available (a 2018 beta) and while it then identified the drive as "ubuntu" in the boot order selection screen, still would not actually boot from the NVMe. I burnt days in the process of shuffling partitions, cloning/nuking/restoring drives, and mucking around with EFI partitions etc.

Here's what my storage looks like, now that I'm back to a working configuration:

Code: Select all

sda           8:0    0   2.7T  0 disk  (GPT HDD)
├─sda1        8:1    0   1.4T  0 part /mnt/821a01c6-c94f-4e1a-becc-044be4523bab  (Timeshift snapshots)
└─sda2        8:2    0   1.3T  0 part  (exFAT partition for sharing files between OSes)

sdb           8:16   0 931.5G  0 disk  (GPT HDD, cloned from MBR SSD and converted to GPT)
├─sdb1        8:17   0   512M  0 part /boot/efi  (Linux EFI partition, is physically second partition on drive)
├─sdb2        8:18   0  1007K  0 part  (reserved for ?MBR related stuff - 1st physical partition, hangover from original drive)
└─sdb5        8:21   0   238G  0 part  (Linux root partition) (has ~750Gb unallocated space after)

sdc           8:32   0 447.1G  0 disk  (GPT SSD from original Windows-only installation)
├─sdc1        8:33   0   400M  0 part  (Windows RE)
├─sdc2        8:34   0   200M  0 part  (Windows EFI)
├─sdc3        8:35   0   128M  0 part  (MS reserved)
├─sdc4        8:36   0 431.5G  0 part  (Windows 10)
└─sdc5        8:37   0   5.2G  0 part  (Windows RE)

nvme0n1     259:0    0   1.8T  0 disk  (GPT NVMe mounted on PCIe riser)
├─nvme0n1p1 259:1    0   238G  0 part  (cloned Linux filesystem, same content and UUID as sdb5, not mounted in working system)
├─nvme0n1p2 259:2    0  55.9G  0 part  (swap space)
└─nvme0n1p3 259:3    0   1.5T  0 part /home  (home)
I must confess to being a little confused about the two EFI partitions on sdb and sdc; they seemed to be quite tightly interlinked and I think may be the source of my problems - when the contents of sdb are moved onto the NVMe that EFI partition is not visible, so boot fails since it's trying to load GRUB even if I just want to start Windows which is purely on sdc. This seems to marry up with what I was seeing during the tits-up phase when I had to boot from a Windows USB recovery drive - using the Windows startup repair (on one occasion at least) enabled subsequent boots directly into Windows (presumably pointing UEFI straight at sdc2 instead of GRUB on sdb1).

So, if you made it through that long-winded explanation, here's my question - is there a way that I can uncouple sdb1 and sdb5, so that the EFI partition lives on some sort of basic SDD or even HDD that is readable by UEFI at bootload, while having the Linux root on my nice new, fast NVMe? Ideally, a solution that gave me a single EFI partition that managed both OSes would be ideal, but I'm not sure how to achieve that or if it's even possible. I did try doing a fresh Mint install using a custom configuration with the bootloader on sdb and root on nvme0n1 but that was completely screwed up, couldn't boot anything at all, I think because it trashed both the EFI in sdb1 and the Windows EFI in sdc2 in the process, requiring a manual rebuild of the Win10 EFI bootloader and a Linux boot-repair. Any suggestions gratefully received (other than "nuke everything and start from scratch" - too much time to rebuild and configure two OSes from the ground up!).
Last edited by LockBot on Fri Jul 28, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
multiSingularity
Level 1
Level 1
Posts: 36
Joined: Sat Feb 24, 2018 3:37 am
Location: Qld, Australia

Re: 20.3: split EFI and root partitions across different discs

Post by multiSingularity »

Conceptually, what I need is something like a symbolic link at the root level, that will point all references to the root directory on the HDD to the root directory on the NVMe. Or, a "partition link" that redirects references to one partition to a different one on a different drive. Conceptually...
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: 20.3: split EFI and root partitions across different discs

Post by Jo-con-Ël »

Boot Mint and post back following codes result.

Code: Select all

inxi -Fxxxzr
sudo parted -l
sudo blkid
sudo efibootmgr -v
cat /etc/fstab
multiSingularity wrote: Sat Jan 28, 2023 8:02 am my creaky old motherboard with its 2013 BIOS coudn't see the NVMe drive to boot from it. I tried all manner of workarounds to no avail, including using the ailing SSD's EFI as the boot device but having the root filesystem on the NVMe
I don't know about PCI configuration (PCI device power on and/or PCI ROM priority) on your firmware settings ( i.e. computer Setup, pressing F2 or Del), but you can not expect nvme to be offered as UEFI boot option it there is no efi loader on it (even it has not EFI partition), neither as BIOS boot option as it is a GPT drive and it has not a bios-boot partition.

I would try to make room on nvme and clone or, with Gparted, copy&paste EFI partition from sdb HDD (sdb1) to nvme and change clone/copy partition UUID. Then get into computer Setup and look for ubuntu UEFI option on that drive (maybe on UEFI BBS hard drive priority) or on computer boot menu.

Requested codes result will show Windows and ubuntu UEFI boot options (i.e. efi loaders on EFI partitions) but you can confirm those EFI partition content looking inside with file browser (you will need to mount them using Disks selecting partition and clicking on play icon downside. The one with ubuntu folder is where Mint efi loader is placed (and booted from) and the one with Microsoft folder is the Windows one.

Most probably is there are two or more EFI partitions with same efi loader (i.e. ubuntu or Microsoft folders on both EFI partitions) only one is shown on boot menu and you can decide which one will be shown or boot by default from boot options on computer Setup (boot order priority and/or BBS hard dive priority). Also you can create UEFI boot options with efibootmgr (see man efibootmgr) and sort them.
Arrieritos semos y en el camino nos encontraremos.
multiSingularity
Level 1
Level 1
Posts: 36
Joined: Sat Feb 24, 2018 3:37 am
Location: Qld, Australia

Re: 20.3: split EFI and root partitions across different discs

Post by multiSingularity »

inxi:

Code: Select all

System:    Kernel: 5.4.0-137-generic x86_64 bits: 64 compiler: gcc v: 9.4.0 Desktop: Cinnamon 5.2.7 wm: muffin 5.2.1 
           dm: LightDM 1.30.0 Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal 
Machine:   Type: Desktop Mobo: ASRock model: H77 Pro4/MVP serial: <filter> UEFI: American Megatrends v: P1.80 
           date: 03/14/2018 
Battery:   Device-1: hidpp_battery_0 model: Logitech MX Ergo Multi-Device Trackball serial: <filter> 
           charge: 55% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i7-3770 bits: 64 type: MT MCP arch: Ivy Bridge rev: 9 
           L2 cache: 8192 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 54277 
           Speed: 1596 MHz min/max: 1600/3900 MHz Core speeds (MHz): 1: 1596 2: 1596 3: 1596 4: 1596 5: 1596 6: 1596 
           7: 1596 8: 1596 
Graphics:  Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics vendor: ASRock driver: i915 v: kernel 
           bus ID: 00:02.0 chip ID: 8086:0162 
           Display: x11 server: X.Org 1.20.13 driver: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 21.2.6 compat-v: 3.0 
           direct render: Yes 
Audio:     Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: ASRock driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 chip ID: 8086:1e20 
           Sound Server: ALSA v: k5.4.0-137-generic 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASRock driver: r8169 v: kernel 
           port: e000 bus ID: 05:00.0 chip ID: 10ec:8168 
           IF: enp5s0 state: down mac: <filter> 
           Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: e000 bus ID: 06:00.0 chip ID: 8086:2723 
           IF: wlp6s0 state: up mac: <filter> 
Drives:    Local Storage: total: 4.99 TiB used: 1.01 TiB (20.3%) 
           ID-1: /dev/nvme0n1 vendor: Seagate model: BarraCuda 510 SSD ZP1000CM30001 size: 931.51 GiB 
           speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: STPSC014 scheme: PMBR 
           ID-2: /dev/nvme1n1 vendor: PNY model: CS3140 2TB SSD size: 1.82 TiB speed: 63.2 Gb/s lanes: 4 
           serial: <filter> rev: CS314211 scheme: GPT 
           ID-3: /dev/sda vendor: Western Digital model: WD30EZRX-00D8PB0 size: 2.73 TiB speed: 3.0 Gb/s 
           rotation: 5400 rpm serial: <filter> rev: 0A80 temp: 39 C scheme: GPT 
           ID-4: /dev/sdb vendor: Western Digital model: WD10EARX-00PASB0 size: 931.51 GiB speed: 6.0 Gb/s 
           serial: <filter> rev: AB51 temp: 42 C scheme: GPT 
           ID-5: /dev/sdc vendor: SanDisk model: SDSSDX480GG25 size: 447.13 GiB speed: 6.0 Gb/s serial: <filter> 
           rev: R201 temp: 37 C scheme: GPT 
Partition: ID-1: / size: 233.18 GiB used: 54.80 GiB (23.5%) fs: ext4 dev: /dev/sdb5 
           ID-2: /home size: 1.50 TiB used: 44.67 GiB (2.9%) fs: ext4 dev: /dev/nvme1n1p3 
           ID-3: swap-1 size: 58.59 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme1n1p4 
Sensors:   System Temperatures: cpu: 49.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     Active apt repos in: /etc/apt/sources.list 
           1: deb https://repo.nordvpn.com/deb/nordvpn/debian stable main
           No active apt repos in: /etc/apt/sources.list.d/additional-repositories.list 
           Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
           1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
           Active apt repos in: /etc/apt/sources.list.d/kelebek333-kablosuz-focal.list 
           1: deb http://ppa.launchpad.net/kelebek333/kablosuz/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/obsproject-obs-studio-focal.list 
           1: deb http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://packages.linuxmint.com una main upstream import backport
           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
           Active apt repos in: /etc/apt/sources.list.d/onedrive.list 
           1: deb https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_20.04/ ./
           Active apt repos in: /etc/apt/sources.list.d/slgobinath-gcalendar-focal.list 
           1: deb http://ppa.launchpad.net/slgobinath/gcalendar/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/spotify.list 
           1: deb http://repository.spotify.com stable non-free
           Active apt repos in: /etc/apt/sources.list.d/teamviewer.list 
           1: deb [signed-by=/usr/share/keyrings/teamviewer-keyring.gpg] https://linux.teamviewer.com/deb stable main
Info:      Processes: 382 Uptime: 1h 10m Memory: 23.19 GiB used: 6.47 GiB (27.9%) Init: systemd v: 245 runlevel: 5 
           Compilers: gcc: 9.4.0 alt: 7/9 Shell: bash v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 
parted:

Code: Select all

Model: ATA WDC WD30EZRX-00D (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name        Flags
 1      1049kB  1568GB  1568GB  ext4         Snapshots
 2      1568GB  3001GB  1432GB               CommonData  msftdata


Model: ATA WDC WD10EARX-00P (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 2      17.4kB  1049kB  1031kB               BIOS boot partition   bios_grub
 1      1049kB  538MB   537MB   fat32        EFI system partition  boot, esp
 5      539MB   256GB   256GB   ext4         Linux filesystem


Model: ATA SanDisk SDSSDX48 (scsi)
Disk /dev/sdc: 480GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  420MB  419MB   ntfs         Basic data partition          hidden, diag
 2      420MB   630MB  210MB   fat32        EFI system partition          boot, esp
 3      630MB   764MB  134MB                Microsoft reserved partition  msftres
 4      764MB   464GB  463GB   ntfs         Basic data partition          msftdata
 5      475GB   480GB  5557MB  ntfs         Basic data partition          hidden, diag


Model: Seagate BarraCuda 510 SSD ZP1000CM30001 (nvme)
Disk /dev/nvme0n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1000GB  1000GB                     msftdata


Model: PNY CS3140 2TB SSD (nvme)
Disk /dev/nvme1n1: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name        Flags
 1      1049kB  513MB   512MB   fat32           EFI-system  msftdata
 2      513MB   256GB   256GB   ext4            root
 3      256GB   1937GB  1681GB  ext4            home
 4      1937GB  2000GB  62.9GB  linux-swap(v1)  swap        swap
blkid:

Code: Select all

/dev/nvme0n1p1: LABEL="SharedData" UUID="FD85-2829" TYPE="exfat" PTTYPE="dos" PARTUUID="6962309f-d9fb-4efa-b617-622ebf47c510"
/dev/nvme1n1p1: LABEL_FATBOOT="EFI-SYSTEM" LABEL="EFI-SYSTEM" UUID="5390-E1B9" TYPE="vfat" PARTLABEL="EFI-system" PARTUUID="c4ab405d-3676-4366-9dab-bafa4044e619"
/dev/nvme1n1p2: LABEL="root" UUID="843f94f1-6c30-45b9-b447-3ed9ff81de53" TYPE="ext4" PARTLABEL="root" PARTUUID="0e42ac78-c88b-4b4c-92ed-e65999908f43"
/dev/nvme1n1p3: LABEL="home" UUID="9efd6161-a622-4e8d-87e3-00273b1c3804" TYPE="ext4" PARTLABEL="home" PARTUUID="c39df23f-884f-4b75-95b7-ef2717644367"
/dev/nvme1n1p4: LABEL="swap" UUID="8ffc2037-8556-4a10-8c20-1efb279451f1" TYPE="swap" PARTLABEL="swap" PARTUUID="a149851f-a876-4c32-9e9a-b1ca169a8196"
/dev/sda1: UUID="821a01c6-c94f-4e1a-becc-044be4523bab" TYPE="ext4" PARTLABEL="Snapshots" PARTUUID="c2372bac-d29e-4cb9-8dea-7cc284911382"
/dev/sda2: LABEL="CommonData" UUID="039D-3AE9" TYPE="exfat" PTTYPE="dos" PARTLABEL="CommonData" PARTUUID="9a7ef70f-1988-454b-bd91-ee7fd99f6efd"
/dev/sdb1: UUID="7751-3B6E" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="4e107686-b13c-4c0b-aa63-9ff0b0212962"
/dev/sdb5: UUID="ffa9b241-11f1-45a8-82e1-ce16ba5f3af0" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="44690540-21dd-412a-9036-e8e266e8311c"
/dev/sdc1: LABEL="Windows RE tools" UUID="FEFEC7C2FEC77187" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="d91387f5-485e-41e9-8bf5-8aacbbab1c43"
/dev/sdc2: LABEL="SYSTEM" UUID="88C7-A36E" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="6159c157-79a4-45a9-a04e-a372a74553cb"
/dev/sdc4: UUID="F20EB4430EB402A1" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="38d2f524-cd1b-4bcb-ab7e-8b5c72d2b65e"
/dev/sdc5: LABEL="Recovery image" UUID="EA42D12042D0F1F5" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="c6e50037-87a3-4eee-ac8f-2276ccd610f8"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/sdb2: PARTLABEL="BIOS boot partition" PARTUUID="16460259-e665-4e7c-9192-ad188174df7e"
/dev/sdc3: PARTLABEL="Microsoft reserved partition" PARTUUID="9bf5cb80-1961-4917-8f6e-8a2a4a09a143"
efibootmgr:

Code: Select all

BootCurrent: 0006
Timeout: 5 seconds
BootOrder: 0006,0007,0009,0004,000A
Boot0004* USB 	BBS(USB,,0x0)AMGOAMNO..........G.e.n.e.r.i.c. .S.T.O.R.A.G.E. .D.E.V.I.C.E. .0.9.0.3....................A...................................L..Gd-.;.A..MQ..L.G.e.n.e.r.i.c. .S.T.O.R.A.G.E. .D.E.V.I.C.E. .0.9.0.3......AMBOAMNO........y.G.e.n.e.r.i.c. .S.T.O.R.A.G.E. .D.E.V.I.C.E. .0.8.2.8....................A.......................L..Gd-.;.A..MQ..L.G.e.n.e.r.i.c. .S.T.O.R.A.G.E. .D.E.V.I.C.E. .0.8.2.8......AMBOAMNO........k.L.e.x.a.r. .J.u.m.p.D.r.i.v.e. .1...0.0....................A.......................>..Gd-.;.A..MQ..L.L.e.x.a.r. .J.u.m.p.D.r.i.v.e. .1...0.0......AMBO
Boot0006* ubuntu	PciRoot(0x0)/Pci(0x1c,0x7)/Pci(0x0,0x0)/Sata(0,65535,0)/HD(1,GPT,4e107686-b13c-4c0b-aa63-9ff0b0212962,0x800,0x100000)/File(\EFI\ubuntu\grubx64.efi)AMBO
Boot0007* Microsoft Windows	PciRoot(0x0)/Pci(0x1c,0x7)/Pci(0x0,0x0)/Sata(1,65535,0)/HD(2,GPT,6159c157-79a4-45a9-a04e-a372a74553cb,0xc8800,0x64000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)AMBO
Boot0009* Hard Drive 	BBS(HD,,0x0)AMGOAMNO........u.W.D.C. .W.D.1.0.E.A.R.X.-.0.0.P.A.S.B.0....................A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.Z.A.A.A.9.3.8.0.2.5......AMBOAMNO........u.S.a.n.D.i.s.k. .S.D.S.S.D.X.4.8.0.G.G.2.5....................A.................................>..Gd-.;.A..MQ..L.2.1.7.4.4.8.0.4.8.0.6.8. . . . . . . . ......AMBOAMNO........o.W.D.C. .W.D.3.0.E.Z.R.X.-.0.0.D.8.P.B.0....................A...........................>..Gd-.;.A..MQ..L. . . . .W. .-.D.M.W.4.C.1.N.9.5.4.8.0.7......AMBO
Boot000A* UEFI: Lexar JumpDrive 1.00	PciRoot(0x0)/Pci(0x14,0x0)/USB(5,0)/HD(1,MBR,0x2d7faf9b,0x280,0x1f40)AMBO
fstab:

Code: Select all

UUID=7751-3B6E  /boot/efi       vfat    defaults      0       1
UUID=ffa9b241-11f1-45a8-82e1-ce16ba5f3af0 / ext4 errors=remount-ro 0 1
/dev/disk/by-uuid/821a01c6-c94f-4e1a-becc-044be4523bab	/mnt/821a01c6-c94f-4e1a-becc-044be4523bab	auto	nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Snapshots,x-gvfs-icon=Snapshots	0	0
/dev/disk/by-uuid/9efd6161-a622-4e8d-87e3-00273b1c3804 /home auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/039D-3AE9 /mnt/CommonData auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=CommonData,x-gvfs-icon=CommonData,x-gvfs-symbolic-icon=CommonData 0 0
/dev/disk/by-uuid/FD85-2829 /mnt/SharedData auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=SharedData,x-gvfs-icon=SharedData,x-gvfs-symbolic-icon=SharedData 0 0
#
# NAS mounts x 7 follow (deleted from listing)
To convince myself 100% that it's not some configuration stuff-up and the problem really is what I think it is, I unplugged/removed all drives except for the single 2Tb NVMe, wiped it, and did a full clean install of 20.3 from Live USB using the default install option where it does everything including creating the EFI partition. On rebooting, no boot device was found. It's just not there as far as UEFI is concerned (doesn't even appear in the BIOS boot order config, so I think my earlier experiment that still had all drives connected and I saw "ubuntu" in the boot order must have been seeing the EFI on a different disc).

I think there is no solution to my dilemma since (a) I simply can't boot from NVMe since it wasn't even invented when my motherboard was designed, and (b) booting from HDD requires the OS to be on the HDD since the NVMe is only visible once the OS is loaded and running. I see no alternative but to buy a new SSD and clone the temporary HDD to it (at least until I'm forced to replace the motherboard/CPU/RAM some day, but aside from this issue it's otherwise still working perfectly well for me).
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: 20.3: split EFI and root partitions across different discs

Post by Jo-con-Ël »

multiSingularity wrote: Mon Jan 30, 2023 12:43 am On rebooting, no boot device was found. It's just not there as far as UEFI is concerned (doesn't even appear in the BIOS boot order config, so I think my earlier experiment that still had all drives connected and I saw "ubuntu" in the boot order must have been seeing the EFI on a different disc).
Notice there is no EFI partition on nvme1n1 as nvme1n1p1 is not flagled as esp,boot, but as generic msftdata
Model: PNY CS3140 2TB SSD (nvme)
Disk /dev/nvme1n1: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 513MB 512MB fat32 EFI-system msftdata
2 513MB 256GB 256GB ext4 root
3 256GB 1937GB 1681GB ext4 home
4 1937GB 2000GB 62.9GB linux-swap(v1) swap swap
You can do it on installed Mint with Gparted. Maybe it is not installed so install it (apt install gparted) and then select nvm1n1p1, right-click>Manage flags>and check esp (boot will be automatically checked and msftdata removed).

Then reboot and try it again and post back sudo efibootmgr -v in any case.
Last edited by Jo-con-Ël on Mon Jan 30, 2023 3:10 am, edited 2 times in total.
Arrieritos semos y en el camino nos encontraremos.
multiSingularity
Level 1
Level 1
Posts: 36
Joined: Sat Feb 24, 2018 3:37 am
Location: Qld, Australia

Re: 20.3: split EFI and root partitions across different discs

Post by multiSingularity »

Notice there is no EFI partition on nvme0n1 as nvme0n1p1 is not flagled as esp,boot, but as generic msftdata
Sorry, I didn't fully explain... after the experiment with the fresh install failed, I kept the EFI and OS partitions for future-proofing (maybe I'll replace the motherboard one day?), but removed the flags so as not to confuse grub that this contains a bootable OS. The first and second partitions are thus superfluous to current requirements; given I have tons of space I just left them there but I can always remove them and expand the third partition if needed.
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: 20.3: split EFI and root partitions across different discs

Post by Jo-con-Ël »

References to nvme on quoted text were wrong as they were on my last (it is not nvem0n1 but nvem1n1) before edited and correted.

I thought you want confirm your were/weren't able to boot from PCI nvme. Firmware boot manager wont detect loaders on nvme or anywhere if EFI partition is not flagged as esp,boot never mind loaders on that partition are pointing to Mint installed on sdb5.

GRUB wont be confused in the mean time you do not run sudo update-grub. You are booting LM from EFI partition on that drive (sdb2). It wont change but "maybe" also you can boot Mint from EFI partition on nvme. Once confirmed you can remove that flags again if you want. :roll:
Last edited by Jo-con-Ël on Mon Jan 30, 2023 4:36 am, edited 2 times in total.
Arrieritos semos y en el camino nos encontraremos.
multiSingularity
Level 1
Level 1
Posts: 36
Joined: Sat Feb 24, 2018 3:37 am
Location: Qld, Australia

Re: 20.3: split EFI and root partitions across different discs

Post by multiSingularity »

After the clean install the NVMe EFI partition was correctly flagged as esp + boot, yet the NVMe still failed to boot or be recognised at startup as the only installed drive. My thinking in removing those flags to avoid confusion is that my next job is upgrading to Mint 21, and I wouldn't be surprised if a GRUB update occurs during that process somewhere - a non-bootable drive that looks like a bootable one is perhaps asking for trouble?

Thanks for your input, I appreciate your help.
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: 20.3: split EFI and root partitions across different discs

Post by Jo-con-Ël »

multiSingularity wrote: Mon Jan 30, 2023 3:59 am After the clean install the NVMe EFI partition was correctly flagged as esp + boot, yet the NVMe still failed to boot or be recognised at startup as the only installed drive
What you see on boot menu or boot order on computer Setup can also be different because of another reasons (as I said on previous post be sure PCI ROM priority is not set on Legacy ROM). I only wanted to confirm what efibootmgr shows in such case.

In any case, If you can not boot from PCI nvme because of your old firmware you can try installing rEFInd as last resource. It can be installed from Windows (on Windws EFI partition) or from Mint (on Mint EFI partition or another) or used/installed from flashdrive/CD. This boot manger/pre-loader also is useful in case of boot problems because of other reasons as GRUB fails/misconfiguration.
multiSingularity wrote: Mon Jan 30, 2023 3:59 amMy thinking in removing those flags to avoid confusion is that my next job is upgrading to Mint 21, and I wouldn't be surprised if a GRUB update occurs during that process somewhere - a non-bootable drive that looks like a bootable one is perhaps asking for trouble?
Upgrading GRUB (assuming with mintupgrade tool) is not the same than placing loader on installing/reinstalling from scratch. In last case, a Installer bug causes you can not choose EFI partition and need to apply a workaround this problem. You have an EFI partition on Windows disk (sdc2) so it could happen to you in the same way, not only becuase that EFI partition copy on nvme.
Removing flags on unwished EFI partitions before installing and re-flagging them after installing is enough.

Also, after installing, it is not difficult removing Mint loader from unwished EFI partition and installing on correct one.

When upgrading GRUB (also before installing GRUB updates from Update Manager) you need to be sure you are booting on UEFI mode, EFI partition is mounted on /boot/efi and do not misunderstand when asked about replacing/conserve configuration files or placing loader.
Unless there is an known reason, you don't need to boot Mint on BIOS mode, so you don't need that bios-grub partition (sdb2) on internal disk. You can remove it from Linux Mint Live session with Gparted and so avoid the possibility to boot on BIOS Mode even more if CSM/Legacy support is enabled (you can also disable) on computer Setup.

As I said on last post you are booting current Mint installation on UEFI mode (as per inxi) from sdb1 EFI partition (as per efibootmgr).

That sdb1 EFI partition is on /etc/fstab but that option on mounting is not normal (it should be umask=0077 not defaults).
(...)
UUID=7751-3B6E /boot/efi vfat defaults 0 1
(...)
On previous lsblk it was shown mounted but it is not shown on inxi.

Code: Select all

 
Partition: ID-1: / size: 233.18 GiB used: 54.80 GiB (23.5%) fs: ext4 dev: /dev/sdb5 
           ID-2: /home size: 1.50 TiB used: 44.67 GiB (2.9%) fs: ext4 dev: /dev/nvme1n1p3 
           ID-3: swap-1 size: 58.59 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme1n1p4 
You can be sure in any case with mount | grep efi (it will show both efivars and efi partition).
Arrieritos semos y en el camino nos encontraremos.
multiSingularity
Level 1
Level 1
Posts: 36
Joined: Sat Feb 24, 2018 3:37 am
Location: Qld, Australia

Re: 20.3: split EFI and root partitions across different discs

Post by multiSingularity »

I will have a look at the PCI ROM priority when I am able - I had a disaster in the study today, the washing machine on the other side of the wall overflowed and flooded the carpet in the study, so everything is pulled out of the room including the PC in question. The blower fans have to stay on for five days before I can put the room (and the PC) back together again. When I can I will have a look at the PCI ROM priority - I don't recall seeing such a setting but perhaps it may be called something slightly different in my Asrock BIOS.

I haven't heard of rEFInd before - I will have to read up and learn what it is/does, sounds intriguing! I'm interested in why you feel it is a last resort? Does it have problems/risks?

I think the SSD that sdb2 was cloned from started life as a MBR disc that was subsequently converted to GPT so perhaps the BIOS partition is a hangover from that. It's definitely been a long time since I used BIOS booting, at least 10 years I think. As you say no reason for that partition to be there anymore - I've just ignored it since it seemed hardly worth the bother to reclaim the space and it didn't seem to be causing any problems - I only ever boot UEFI, including from Live USBs.

What effect is the defaults mount option for sdb1 (instead of umask=0077) likely to have? I'm not sure what would have made that change if it's non-standard, it's not something I remember doing. I can certainly fix it though, that's easy enough.

I'll be back in a week or so!
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: 20.3: split EFI and root partitions across different discs

Post by Jo-con-Ël »

In the mean time I only want to put on clear this matter.
multiSingularity wrote: Tue Jan 31, 2023 7:25 am I haven't heard of rEFInd before - I will have to read up and learn what it is/does, sounds intriguing! I'm interested in why you feel it is a last resort? Does it have problems/risks?
No, it is not risky. I meant a last resource in case of firmware problems wont let let you boot Linux UEFI options (i.e. certain firmware not fully comptatible with efibootmgr, the tool used by grub/linux when creating UEFI boot option and place it first on boor order priority, or when firmware boot manager's is hard coded to boot ony Windows or faulty,...).

In most cases it is not necessary to install rEFInd, but it is usefull (at least to keep at hand rEFInd flashdrive/CDROM) in case of problems and a recommended good reading to understand UEFI on deep in any case. :wink:
Arrieritos semos y en el camino nos encontraremos.
User avatar
grndplane
Level 4
Level 4
Posts: 245
Joined: Tue Jan 12, 2010 4:08 pm
Location: Sunny California - Where everything cost's twice what it should.

Re: 20.3: split EFI and root partitions across different discs

Post by grndplane »

The below is from a 2010 MSI Z77MA-G45 motherboard that can NOT detect NVME as a boot drive. I updated BIOS to late 2013, but still can not detect. I went down several rabbit holes trying to get this to work. The solution for me was this link
https://e1.pcloud.link/publink/show?cod ... JM0u2R9faV that came from here
https://www.hamishmb.com/booting-nvme-older-pc-refind/
this version of Clover has NVME boot detection built in. Just clone your old sata drive to the NVME, all partitions including EFI.
Then make a boot USB from the link above. After that it should work. You will need a boot usb and boot up takes an extra 5 seconds, but it is very fast after that. My drive is getting 3.3 gig transfer rate, and I suspect that is the limit of my old 3.0 PCIE bus.

fstab setup

# / was on nvme0n1p2 during installation
UUID=59e9777b-2e72-4e2b-ac7c-4c76c4ce69dc / ext4 errors=remount-ro 0 1

# /boot/efi was on nvme0n1p1 during installation
UUID=0B84-8EEC /boot/efi vfat umask=0077 0 1

# /home was on nvme0n1p3 during installation
UUID=246781cd-f70d-4d1d-a0b7-c5ea5dcedebb /home ext4 defaults 0 2

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS

nvme0n1 259:0 0 931.5G 0 disk
├─nvme0n1p1 259:1 0 487M 0 part /boot/efi
├─nvme0n1p2 259:2 0 139.7G 0 part /
└─nvme0n1p3 259:3 0 786.6G 0 part /home
-grndplane (Mike)
Linux Mint 21.x 64-bit
Kernel: 6.X-liquorix-amd64
WM: LeftWM
multiSingularity
Level 1
Level 1
Posts: 36
Joined: Sat Feb 24, 2018 3:37 am
Location: Qld, Australia

Re: 20.3: split EFI and root partitions across different discs

Post by multiSingularity »

Well hallelujah and praise be. Blessed day.

I finally have my NVME booting! Initially I tried the Clover bootable USB but initially it failed to find the NVME; a bit of stuffing around and I got it to a tty login screen and after logging in I could read/write my home directory, but I couldn't get the desktop to load. I then installed rEFInd to the HDD and added the NVME driver from Clover to the set of rEFInd drivers, updated my boot order and hey presto - successful boot from either HDD or NVME LM instances!
Now, the Clover USB boots the LM on NVME, so I really don't know what changed there. I might now try cloning the EFI partition from the HDD to a surplus SSD to see if I can do away with the HDD altogether without having to keep a USB stick hanging out of it.

Thank you Jo-con-Ël and grndplane for your help. I had just about given up on getting it to work and was going to buy an SSD.

Interestingly when I was testing read speed from the NVME before I was able to boot from it, I was getting around 3Gbps. Now, it's down to 1.6Gbps. I mean, that's still a very tidy improvement over the HDD, but I'm not sure why the significant performance drop since making it the boot drive. It does have a swap partition on it as well now (wasn't there when tested previously), I wouldn't have thought that should have mattered esp with my 24Gb RAM.
Locked

Return to “Installation & Boot”