View previous topic :: View next topic |
Author |
Message |
lazydog n00b
Joined: 26 Feb 2007 Posts: 64
|
Posted: Sat Jul 15, 2023 9:52 am Post subject: [SOLVED] cannot dual boot - two identical PARTUUIDs |
|
|
I successfully installed Gentoo on a new nvme drive. It is the second drive in my PC, the first contains a Windows installation. All drives use GPT and UEFI-boot (no CSM).
However, i cannot boot the Gentoo system with both drives installed, only Windows boots. When I remove the Windows drive, everything is ok. I swapped both drives, installed the Gentoo drive in the first M.2 slot on my mainboard, and the Windows drive in the second slot. Then I can't boot Windows, only Gentoo (the mainboards UEFI only lets me select the drive in the first M.2 slot)
Taking a closer look at the efivars (with efibootmgr -v) i discovered this:
Code: | Boot0007* UEFI OS HD(1,GPT,9314c06b-09c5-4c92-a994-1d1089399520,0x800,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
...
Boot0008* Windows Boot Manager HD(1,GPT,9314c06b-09c5-4c92-a994-1d1089399520,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
|
and when I execute blkid i get this:
Code: | /dev/nvme0n1p1: UUID="CA7C-109B" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="9314c06b-09c5-4c92-a994-1d1089399520"
/dev/nvme1n1p1: UUID="A4CF-A023" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="9314c06b-09c5-4c92-a994-1d1089399520" |
nvme0n1p1 is the boot-partition for Gentoo (on a Samsung 970 EVO)
nvme1n1p1 is the boot-partition for Windows (on a Samsung 980 PRO)
Both have the same PARTUUID and i have no idea how that happened. While installing Gentoo i followed the handbook and installed GRUB as instructed, I did nothing special (the Windows drive was present, but I did not touch it).
What would be the best way to solve this problem? Is it possible to change the PARTUUID of the Gentoo boot partition? What else would I have to do then?
Last edited by lazydog on Mon Jul 17, 2023 7:38 am; edited 2 times in total |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1681
|
Posted: Sat Jul 15, 2023 12:39 pm Post subject: |
|
|
Use only one EFI System Partition (ESP) per system. Place Windows and Gentoo images onto the same ESP. Windows won't touch Gentoo and Gentoo won't touch Windows.
This assumes you use a different file path than \EFI\BOOT\BOOTX64.EFI for both as this is the fall-through default location. |
|
Back to top |
|
|
lazydog n00b
Joined: 26 Feb 2007 Posts: 64
|
Posted: Sat Jul 15, 2023 7:42 pm Post subject: |
|
|
I see. So I moved the contents of my Gentoos boot parition to the other drives efi partition, reinstalled grub, adjusted fstab, deleted the boot partition of the Gentoo drive and that works, I can boot one or the other system with my mainboards UEFI boot menu, thank you!
I thought it would be possible to have two totally independent installations, perhaps I made a mistake somewhere. |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 374
|
Posted: Sun Jul 16, 2023 8:58 am Post subject: |
|
|
lazydog wrote: | I thought it would be possible to have two totally independent installations, perhaps I made a mistake somewhere. |
Using the same ESP does not mean, that the systems depend now on each other. The ESP is not made for the operating systems, but for the firmware to be able to find and boot a EFI binary (often a bootloader or a EFI stub kernel). |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2014
|
Posted: Sun Jul 16, 2023 5:04 pm Post subject: Re: cannot dual boot - two identical PARTUUIDs |
|
|
lazydog wrote: | ...Is it possible to change the PARTUUID of the Gentoo boot partition? What else would I have to do then? |
As you have a working system now, it might not be worth changing. Personally, I'd worry about two partitions with the same ID, and change it, in case something breaks mysteriously some time in the future!
This article on the Arch forums explains how to change PARTUUID. Note that the console log listing is scrollable in their forum software, and the interesting bits are at the bottom.
Probably only safe to change the Gentoo partition - who know what Windows will rely on
Of course, you need to alter your Gentoo setup - perhaps /etc/fstab, and definitely the EFI boot record, to the new values. I guess if you have an entry in fstab you could duplicate it with the new UUID before rebooting after changing the PARTUUID, ditto the efibootmgr setting. Otherwise you might need a bootable USB key to let you tweak the settings to get a bootable system. _________________ Greybeard |
|
Back to top |
|
|
lazydog n00b
Joined: 26 Feb 2007 Posts: 64
|
Posted: Mon Jul 17, 2023 7:36 am Post subject: Re: cannot dual boot - two identical PARTUUIDs |
|
|
Goverp wrote: |
As you have a working system now, it might not be worth changing. |
I "changed" it by deleting the boot partition on the Gentoo drive. I either resize the root partition or use it for something else.
Thanks to everyone for comments and suggestions! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|