You are not logged in.

#1 2024-05-17 22:04:22

bartoszw
Member
Registered: 2020-02-25
Posts: 10

[SOLVED] NVME is not bootable after swapping with Windows NVME

Hi,

What happened:

Around 8 months ago I physically removed 2 Nvme drives from mobo that I used with Linux and installed new Nvme drive to install Windows on it and work on some Windows stuff. After this time I removed Windows Nvme from mobo and installed again those 2 Nvme drives with Linux filesystem (they were not touched at all during "Windows time") on the same slots. Now those Linux drives are not bootable (but visible in BIOS in NVME devices section, not in Boot devices section) and I am super confused. I do not recall providing any changes in BIOS (but do not guarantee this, it was some time ago).
I have backups of all my critical data, but I would cry a lot if I should rebuild all of my 10 years of configuration of this system.

I tried:
* disabling fast boot
* legacy mode boot
* enabling CSM (PC wont boot at all, even bios settings)

My hardware:

* 512 GB NVME Arch main ext4
* 1TB NVME ext4 storage

* 1TB NTFS Windows

Asus Z390 mobo

Last edited by bartoszw (2024-05-25 19:26:36)

Offline

#2 2024-05-18 00:56:44

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] NVME is not bootable after swapping with Windows NVME

I'm pretty sure that by the UEFI standard boot entries are kept in a chip on the mainboard, and if a drive is removed then when the mainboard boots it removes the entry.  So, what you should be able to do is: boot off a recent install medium, attempt to mount the drives as they would be in use, and if you can see the contents that are supposed to be there then chrooting into the mounts and simply reinstalling whatever bootloader you used should work.

There is a bigger problem though, if those drives have been offline that long you're going to have to work through update problems, manual interventions that happened over time but are going to happen to you all at once.  You could probably work through this if you were determined enough but often with such a long time unsynchronized it's simpler to back up the data you want to keep and reinstall.

Last edited by headkase (2024-05-18 00:58:36)

Offline

#3 2024-05-25 17:46:54

bartoszw
Member
Registered: 2020-02-25
Posts: 10

Re: [SOLVED] NVME is not bootable after swapping with Windows NVME

Thank you! It was exactly that problem. I was able to successfully boot my system.

For future reference:

1) Prepare bootable medium. My choose was Ventoy with dropped Arch Linux recent ISO. Boot.
2) Next step is to mount EFI partition.

After successfull boot I checked available partitions with:

sudo lsblk -f

I mount my main partition:

sudo mount /dev/nvme0n1p3 /mnt

then I checked fstab record:

sudo cat /mnt/etc/fstab

it showed something like:

...fstab info

UUID=SOME_UUID /efi /vfat flags...

...

now I know where is my /efi partition localized. I have mounted it.

sudo mount /dev/nvme0n1p2 /mnt/efi

3) Chroot

sudo arch-chroot

4) Install bootloader of the choice

For my situation I picked grub:

grub install --target=x86_64-efi ---efi-directory=/efi --bootloader-id=GRUB

reboot and be happy with bootable system.

Now I backuped everything and I will try to update Arch, if it will be unpossible, I have taken my lesson and I will perform a fresh start.

Useful resources: https://wiki.archlinux.org/title/GRUB

Offline

#4 2024-05-30 19:07:25

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] NVME is not bootable after swapping with Windows NVME

bartoszw wrote:

Thank you! It was exactly that problem. I was able to successfully boot my system.

Right on, you're welcome.

Offline

Board footer

Powered by FluxBB