Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cloned to NVMe, but won't show up in EFI boot manager.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Tue Jul 02, 2024 7:57 pm    Post subject: Cloned to NVMe, but won't show up in EFI boot manager. Reply with quote

So I bought an NVMe drive and I used Clonezilla to clone my old drive to the new NVMe. I had Ganto installation and Windows installation too, so it was dual booted. I was using GRUB, but when I cloned it the EFI boot entry didn't show up in When I tried to boot it, but then I installed the live ISO into my USB, I had CHROOTED into my actual installation, I did a GRUB install with the removable flag, but it still didn't showed up in booting, what could be the issue. I could put my fstab config or something but I don't think it's relevant here. What should I look for? How would I test it more? What can I do?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5089
Location: Bavaria

PostPosted: Tue Jul 02, 2024 10:16 pm    Post subject: Reply with quote

Is your ESP (EfiSystemPartition) marked as ESP ?

See nr. 4 of: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI#Prerequisites_for_an_UEFI_boot

If yes, we would need the output of "parted -l" OR "fdisk -l"
+ "lsblk" + "blkid" + "ls -lR /efi"
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Wed Jul 03, 2024 5:09 am    Post subject: Reply with quote

pietinger wrote:
Is your ESP (EfiSystemPartition) marked as ESP ?

See nr. 4 of: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI#Prerequisites_for_an_UEFI_boot

If yes, we would need the output of "parted -l" OR "fdisk -l"
+ "lsblk" + "blkid" + "ls -lR /efi"

What do you mean marked as ESP? Because you cannot mark partition as ESP like with the bootable flag for MBR. Do you mean the type of partition like when using CFdisk? Do you mean when you are setting a type like Linux partition or Microsoft basic data?
Back to top
View user's profile Send private message
BurningMemory
n00b
n00b


Joined: 17 Jan 2023
Posts: 54

PostPosted: Wed Jul 03, 2024 5:21 am    Post subject: Reply with quote

picarica wrote:
pietinger wrote:
Is your ESP (EfiSystemPartition) marked as ESP ?

See nr. 4 of: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI#Prerequisites_for_an_UEFI_boot

If yes, we would need the output of "parted -l" OR "fdisk -l"
+ "lsblk" + "blkid" + "ls -lR /efi"

What do you mean marked as ESP? Because you cannot mark partition as ESP like with the bootable flag for MBR. Do you mean the type of partition like when using CFdisk? Do you mean when you are setting a type like Linux partition or Microsoft basic data?


i'm guessing it means to select the partition type as "EFI System" (that's how i do it in fdisk, at least).
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Wed Jul 03, 2024 9:12 am    Post subject: Reply with quote

BurningMemory wrote:
picarica wrote:
pietinger wrote:
Is your ESP (EfiSystemPartition) marked as ESP ?

See nr. 4 of: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Boot_kernel_via_UEFI#Prerequisites_for_an_UEFI_boot

If yes, we would need the output of "parted -l" OR "fdisk -l"
+ "lsblk" + "blkid" + "ls -lR /efi"

What do you mean marked as ESP? Because you cannot mark partition as ESP like with the bootable flag for MBR. Do you mean the type of partition like when using CFdisk? Do you mean when you are setting a type like Linux partition or Microsoft basic data?


i'm guessing it means to select the partition type as "EFI System" (that's how i do it in fdisk, at least).

well then yes its that i tired doing that in parted in the moring parted /dev/nvmen1p1
set 1 boot on
and then just quit tried installing again and nothing
Back to top
View user's profile Send private message
BurningMemory
n00b
n00b


Joined: 17 Jan 2023
Posts: 54

PostPosted: Wed Jul 03, 2024 9:25 am    Post subject: Reply with quote

picarica wrote:
well then yes its that i tired doing that in parted in the moring parted /dev/nvmen1p1
set 1 boot on
and then just quit tried installing again and nothing


that happens with nvme drives, they confuse uefi somehow. you can try flipping the battery,
then you should have a fresh config with no boot entries. then try reinstalling grub and generating
the config. but before doing any of that, check if you do in fact have any entries via efibootmgr.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5089
Location: Bavaria

PostPosted: Wed Jul 03, 2024 11:15 am    Post subject: Reply with quote

BurningMemory wrote:
[...]. then try reinstalling grub [...] check if you do in fact have any entries via efibootmgr.

PO said he has installed grub with --removable option. This means to me that:

1. He has a buggy UEFI which does not allow to create new UEFI entries, OR
2. He does not know the consequence of using this option: grub-installl will not try to create an UEFI boot entry because it will copy grubx64.efi as \boot\bootx64.efi
(see more: https://wiki.gentoo.org/wiki/EFI_System_Partition#Removable_media )

I gave a checklist ... paragraph 4 explains exactly what I have meant with ESP flag ... He said he did "set 1 boot on" (means to me: He used "parted" instead "fdisk").

@picarica

So, now my next question: Do you have NOW only this NVMe active, OR do you have your new NVMe + your old HD active in your system ? (and please dont forget my requested outputs)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Wed Jul 03, 2024 2:30 pm    Post subject: Reply with quote

For parted, boot and esp are 2 different things.

Code:
$ parted -l
...
Disk /dev/nvme0n1: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2149MB  2147MB  fat32        ESP   boot, esp


fdisk only shows esp (doesn't mention boot)
Code:
/dev/nvme0n1p1      2048    4196351    4194304    2G EFI System

_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Wed Jul 03, 2024 5:49 pm    Post subject: Reply with quote

Anon-E-moose wrote:
For parted, boot and esp are 2 different things.

Code:
$ parted -l
...
Disk /dev/nvme0n1: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2149MB  2147MB  fat32        ESP   boot, esp


fdisk only shows esp (doesn't mention boot)
Code:
/dev/nvme0n1p1      2048    4196351    4194304    2G EFI System

okay i am finally doing this so i got all the stuff
so i just cleanly formated my EFI partition after i verified that it has botth esp and boot flag and did grub install without --removable and i was able to boot, my windows partition was not shown up in grub, but i was unable to boot still
i dont even have this disk anywhere
this was before i formated it
and of course i made a backup, thats how i was able to boot into windows to post this i restored it weirdly that gentoo uefi entry is still there and broken weird

photo of blkid

so i got here blkid
lsblk
ls of boot
aaand parted again
so i am beffaled maybe if i could boot into gentoo it would detec my windows partition and work fine, but now i have two entried UEFI OS and gento entry which are both same grub that boots int gentooo that cant boot.

what can i do from now, i think i emptied my options
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Wed Jul 03, 2024 6:23 pm    Post subject: Reply with quote

If you have efibootmgr installed run it and show the output (shouldn't be a lot)

also what is the output of "ls -l /dev/nvme*"
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Wed Jul 03, 2024 6:54 pm    Post subject: Reply with quote

Anon-E-moose wrote:
If you have efibootmgr installed run it and show the output (shouldn't be a lot)

also what is the output of "ls -l /dev/nvme*"

Got all of it here
Efibootmg
paste.gentoo.zip/28vLLPG7
Ls nvme
paste.gentoo.zip/DVNY2dYM
Fstab
paste.gentoo.zip/NN6HRJqe
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Wed Jul 03, 2024 8:22 pm    Post subject: Reply with quote

Code:
BootCurrent: 0007
Timeout: 1 seconds
BootOrder: 0001,0000,0006,0003,0007,0008
Boot0000* gentoo   HD(1,GPT,67e4a10f-f495-4121-b646-79877df0f694,0x800,0x32000)/File(\EFI\GENTOO\GRUBX64.EFI)
Boot0001* Windows Boot Manager   HD(1,GPT,67e4a10f-f495-4121-b646-79877df0f694,0x800,0x32000)
Boot0003* Hard Drive   BBS(HD,,0x0)
Boot0006* UEFI OS   HD(1,GPT,67e4a10f-f495-4121-b646-79877df0f694,0x800,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
Boot0007* UEFI: KingstonDataTraveler 3.0PMAP, Partition 1   
Boot0008* USB   BBS(HD,,0x0)


So you're booting off the Kingston.

But boot order is Windows, Gentoo, Generic boot, sda, data traveller, sda (again)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5089
Location: Bavaria

PostPosted: Wed Jul 03, 2024 9:44 pm    Post subject: Reply with quote

picarica,

you can always boot from a GentooMinimal (or Admin, or Live)-CD ... and

1. delete some boot entries with "efibootmgr -B -b ..." ( https://wiki.gentoo.org/wiki/Efibootmgr#Deleting_a_boot_entry ), and
2. chroot into your Gentoo system ( https://wiki.gentoo.org/wiki/User:Pietinger/New_at_Gentoo#Pause_during_Installation ), and
3. check the mountpoint of your ESP ... I guess you use usually /boot/efi ... be aware: when you chroot into your system do the correct mounting of the ESP
4. Re-Install grub with "grub-install --efi-directory=/efi" OR "grub-install --efi-directory=/boot/efi" (depending of your mountpoint) .... AND
5. AND do a NEW configuration of grub with "grub-mkconfig -o /boot/grub/grub.cfg"
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Thu Jul 04, 2024 4:13 am    Post subject: Reply with quote

Anon-E-moose wrote:
Code:
BootCurrent: 0007
Timeout: 1 seconds
BootOrder: 0001,0000,0006,0003,0007,0008
Boot0000* gentoo   HD(1,GPT,67e4a10f-f495-4121-b646-79877df0f694,0x800,0x32000)/File(\EFI\GENTOO\GRUBX64.EFI)
Boot0001* Windows Boot Manager   HD(1,GPT,67e4a10f-f495-4121-b646-79877df0f694,0x800,0x32000)
Boot0003* Hard Drive   BBS(HD,,0x0)
Boot0006* UEFI OS   HD(1,GPT,67e4a10f-f495-4121-b646-79877df0f694,0x800,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f
Boot0007* UEFI: KingstonDataTraveler 3.0PMAP, Partition 1   
Boot0008* USB   BBS(HD,,0x0)


So you're booting off the Kingston.

But boot order is Windows, Gentoo, Generic boot, sda, data traveller, sda (again)

yes sorry if its confusing, i just boot manually now from uefi,

and
Quote:
you can always boot from a GentooMinimal (or Admin, or Live)-CD ... and

thats how i been doing it as i mentioned
Quote:
so i just cleanly formated my EFI partition after i verifi....

i already did it thats why there is a gentoo entry, i reformated EFI partition but when i booted that gentoo it showed grub with not window s entry but whatever but i couldnt boot due to this being there forever, i dont even know why its there not in my fstab anywheere got me little bit confused
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Thu Jul 04, 2024 4:37 am    Post subject: Reply with quote

Oh okay Well, I'm just stupid idiot, I just found out why it wouldn't boot, I had some GRUB resume entry in default config in GRUB, so I just removed it and it booted fine, I totally forgot about that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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