LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   SSD unable to be found despite booting into it (https://www.linuxquestions.org/questions/linux-hardware-18/ssd-unable-to-be-found-despite-booting-into-it-4175735428/)

wynprice 03-28-2024 08:46 PM

SSD unable to be found despite booting into it
 
Hello all,

I have an SSD with a boot partition, and an encrypted root partition. Since yesterday, trying to boot from my SSD gives the following:
Code:

Waiting 10 seconds for device /dev/disk/by-uuid/2a...2ed to appear.........
failure /dev/disk/by-uuid/2a...2ed is unavailable

This booted me into a shell. There doesn't appear to be any devices attached, there is no `/dev/sdX` or `/dev/nvme...`, or `/dev/disk` files, `fdisk -l` is empty, `cat /proc/partitions` is empty, `blkid` is empty, and `df -a` doesn't even show the root filesystem exists:
Code:

~ # df -a
Filesystem    1K-blocks    Used Available Use% Mounted on
devtmpfs          391020        0    391020  0% /dev
devpts                0        0        0  0% /dev/pts
tmpfs            3910184        0  3910184  0% /dev/shm
proc                  0        0        0  0% /proc
tmpfs            1955092        4  1955088  0% /run
ramfs                  0        0        0  0% /run/keys
tmpfs            3910184        0  3910184  0% /run/wrappers
sysfs                  0        0        0  0% /sys

Things I've tried
  • Booting into a live USB - it can't detect the SSD at all, and dmesg appears fine
  • Using an M.2 to USB adapter - I'm unable to boot with it, but if I boot into a live USB I can mount the device and navigate it fine.
  • Testing the SSD on another machine - works perfectly

I'm not even sure how this could be possible? How can I boot from the device but it not exist?

It may be related, but I did a force shutdown before this issue occurred.

Any help would be appreciated, worst comes to worst I'll buy a new SSD and copy the data over.

business_kid 03-30-2024 07:14 AM

Hello, wynprice & welcome to LQ.

It sounds like it can't find a kernel. The BIOS doesn't know anything about encryption.
Unless I'm very much mistaken, the Bios can't apply decryption. And if it could, the system wouldn't be very secure anyhow. So what did you think was going to happen? Did you think it through?

It went looking for the kernel, and didn't find it. So it dumped you into a busybox shell, and you have the basic bits of a few utilities.

If you get your kernel on the /boon partition, it might load the kernel. Booting will then puke on mounting the / partition. You might have had
Quote:

root=/dev/uuid=<Long alphanumeric string>
But depending on how you encrypted /, the long alphanumeric string might even be encrypted :hattip:

If you can decrypt it, do. If you can't, re-partition and restore a backup. Presuming you don't have a backup, reinstall. Make a partition for home, and encrypt that if you must.

wynprice 03-30-2024 09:42 AM

Hi buisiness_kid,

Thanks for the response. It's my understanding the the boot process is as follows:
  • Start on the unencrypted boot partition
  • Wait for the encrypted partition to appear (`/dev/disk/by-uuid/2a...2ed)`
  • Prompt for the passkey
  • Decrypt and mount the partition as `/`
  • Boot

The boot partition and encrypted root partition both exist on the same device. Turning on the computer puts me into GRUB, with my different configurations available (NixOS), so it clearly CAN read off the boot partition. But then it fails waiting for the encrypted partition to appear.

I think the fact the partition is encrypted is irrelevant, it's not even getting to the stage where it prompts for a decryption passkey, as the encrypted partition never appears.

The main issue I'm confused about, is how it's possible to go into the boot partition, yet neither fdisk nor blkid know that the device is connected. And again, how can `df` not show that there *is* a root filesystem, despite being able to read and write from it.

Some things I've tried since the original post:
  • Re-formatting the SSD - now I can fully boot from the M.2 to USB adapter, but not if I put the SSD inside the computer
  • Putting a different SSD inside my computer, and booting from a live USB - The device does not show up in `blkid` or `lsblk`
  • Trying the SSD on a different computer - one computer worked, another didn't.

I think there must be something wrong with both the SSD, and my motherboard, as the SSD in other computers has the same issue, and a different working SSD in the computer also doesn't appear from a live USB.

So confusing! :confused:

jefro 04-03-2024 03:49 PM

We might need to know if this is a uefi system.

business_kid 04-04-2024 08:17 AM

And also if /boot is on the SSD. Because if /boot or any other partitions can be read, on the SSD, and / cannot, that fingers the SSD. But if it's an 'all or nothing' situation, it would point at the motherboard.

There's also issues with mounting certain NVMEs in certain motherboards. Lack of height is a common complaint. If you approach the Motherboard/SSD with the understanding that there's a fault and try to fix it, you might get somewhere.

Jan K. 04-04-2024 03:22 PM

Quote:

Originally Posted by wynprice (Post 6492927)
Re-formatting the SSD - now I can fully boot from the M.2 to USB adapter, but not if I put the SSD inside the computer

My board manual states M.2 socket shares bandwidth with SATA ports (5/6), so both can't be used at the same time...

Just a guess, of course! :D


All times are GMT -5. The time now is 10:23 AM.