Issues with the SSD on Linux
The Setup
For the second time this year there has been an issue on my Linux Mint installation after a kernel update. I have a mount point for /home
on a different ssd than /
. That mount point was linked to the device in /dev/sdc1
. When I got the kernel 5.4.0-122
installed, after restarting the computer, the SSD suddenly wasn’t there any longer, which meant that, after signing into my account, I got just a black screen with the mouse pointer.
This time around I knew what to do, but the previous time it happened I had to do the steps below a couple of times, due to the ssd switching between /dev/sdc1
and /dev/sdd1
after each reboot (until I realized what was the permanent fix).
The Temporal Fix
I want to document the temporal fix I did here.
First, I had to go into recovery mode. On Linux Mint you get a menu, where you can, between other things, show a system summary. On that system summary I could see that /
was mounted on /dev/sdb2
, and /boot/efi
was mounted on /dev/sdb1
. But not mention about /home
.
Time to go down into the terminal as root. Linux has multiple ways of showing you what devices are connected. I used fdisk -l
to get a list of devices with some information (as I have 3 SSD and one NVM I really need to know correctly which one is the one I am going to modify). With the above I was able to see that my drive was no longer /dev/sdc1
but /dev/sdd1
.
Next step was to modify the file /etc/fstab
. This file contains the configuration for the mount points that I have on my system (and some other important options). I just had to look for the line that contained /home
and change the device to /dev/sdd1
.
The Permanent Fix
Once that was done, I restarted once, and proceeded to update to Kernel 5.4.0-124
. After another restart, I did not have the issue with the flip-flopping of the device.
Regression?
Was this a regression in the Linux kernel? Not sure. My limited view here is that it was the case. The same issue happened with another 5.4.0 kernel, and once updated it stopped.
I suppose that I need to stop upgrading the kernel as soon as a new version is present.
I wonder if something else could be the reason of this strange behaviour. It seems unlikely as this happened twice just after a kernel update. If it happens again maybe I need to investigate a bit more.
The Update (2022-09-23)
So, the issue happened again after getting a new kernel update. So I decided to put Igor’s comment to test.
Lo and behold, at the top of the fstab they tell me to do the same thing (I have such awesome reading skills, sometimes). They even tell you which command to use (blkid
) to find the UUID that you need.
So all is setup, and working at the moment. If something goes sideways during the next two or three kernel updates I will indicate so. Otherwise, consider this the actual permanent fix.