r/linuxquestions • u/lifelessvessel483 • 18d ago
Support linux drive not recognised as boot drive after removing and reinstalling the drive into the computer
i have arch linux on my 1 tb m.2 ssd and windows 10 on my 240 gb sata ssd, and i recently had to take the 1 tb m.2 out to test the functionality of a 256 gb m.2 ssd. i took my gpu out, i took the ssd out, i put the 256 in, i booted into my windows drive, and checked the health of the 256 m.2. after that i shut the computer down and removed the 256 and installed the 1 tb m.2 in its place. then, when i booted , for some reason my 1 tb wasn't in the boot options. i thought it didnt get recognised but no, if i boot into windows and check crystaldiskinfo, its clearly visible there. so wtf is going on?Pls help!!!
2
u/tanmaynargas2901 18d ago
probably nothing wrong with the drive. when you pulled it, the firmware saw the disk was gone and dropped its UEFI boot entry. windows still boots because its entry points at the sata drive, and crystaldiskinfo sees the m.2 because the drive itself is fine.
easiest fix first: go into the BIOS and look for something like "add boot option" or "boot from file", then point it at the EFI partition on the 1tb, \EFI\GRUB\grubx64.efi (or \EFI\systemd\systemd-bootx64.efi if you used systemd-boot).
if your board doesn't have that, boot the arch ISO from usb, mount your root to /mnt and the EFI partition where it normally goes (usually /mnt/boot), then:
running it once more with --removable also puts a copy at \EFI\BOOT\BOOTX64.EFI, so next time you swap drives the firmware can find it even without an entry.
lsblk -f will show which partition is the EFI one (vfat, usually around 512M).
1
u/ipsirc 18d ago
https://www.supergrubdisk.org/
1
u/MongooseWonderful198 18d ago
Before using the
grub-installcommand above, check which bootloader you originally installed. That command assumes GRUB and an EFI partition mounted at/boot.For a UEFI install, boot the Arch USB in UEFI mode and share
efibootmgr -vplusfdisk -l. Both only display information. The first shows any remaining loader entries; the second lets you identify the ESP by partition type. A FAT filesystem and approximate size alone aren't enough to identify it. ArchWiki's ESP guide covers checking the existing partition. That avoids choosing a reinstall command before we've identified your setup.1
u/3grg 17d ago
Normally, I would say SuperGrub2 Disk, but it does not always work well with Arch. You may need to go the archroot route and reinstall grub that way. Arch is kinda fussy that way.