How do I remount my main drive from rescue mode?

I made a mistake trying to mount a second drive and accidentally unmounted my main drive with everything on it. Now I can’t log in, so I can’t use Yast to fix it. I presume this is because the system can’t write to, or even find, a greeter file it mentions not being able to write to whenever I try to login, before it fails.
I’ve managed to get into rescue mode, and I’m trying to mount the drive that had my stuff on it to /mnt so I can at least try to log in and fix it, but while I can find the device using lsblk or other commands, mounting it isn’t working. Mounting it by directory gives me a supremely unhelpful message listing a half-dozen possible issues including “other error,” and when I try to mount it by UUID, it says the device doesn’t exist.

I’m sure there’s an obvious solution to this, but my research isn’t turning up anything. Anyone know how to fix this?

Your whole story is not understood by me.

First I know that using terms like “mounting a drive” is used very often, but it’s meaning is mostly unclear. One mounts (and unmounts) file systems (and does so by providing amongst other things the place where the file system is to be found, e.g. a partitions, or a disk, or a logical volume, or …) Thus when you say

I am wondering. Do you mean you unmounted your / file system? That is not really possible, because it is in use and the umount will refuse to do that.

And even when you have incorrect mounts on the system at the moment, you just boot it again (shutdown when needed by pressing the power button) and it will use /etc/fstab at boot thus restoring the normal situation.

Thus maybe you better explain more exact and precise what you did.

Sorry about that. From what I remember, Yast said my main drive was mounted at /home, and I unthinkingly asked it to mount my second drive at the same place, which according to Yast mounted the original drive at home at /. I attempted to fix my mistake and from what I can tell from commands run in rescue mode, none of my nvme partitions are currently mounted.

I would have thought that fstab would work as you said, but as far as I can tell it doesn’t. I’m assuming this because whenever I start up the system or try to login, it says “Configuration file ‘/var/lib/sddm/.config/sddm-greeter-qt6rc’ not writable. Please contact your system administrator.” If I’m interpreting that incorrectly, and that has a different solution, that would be embarrassing but welcome.

I managed to find a solution. I was able to boot into the snapshot pre-yast action. Can’t believe I didn’t think of that.

I doubt that. To begin with AFAIK YaST does not use the term “main drive”.

Which would mean that now all the data on that file system can be found in /home and also that all the is in the original home file system can not bee “seen” anymore (but it is still there).

YaSt will never do such a thing out of itself.

When it wasn’t already clear from my post above, can you please stop talking about such things as “main drive” and “second drive”. The system does not know these expressions. It knows about e.g. /dev/sda (and partitions like /dev/sda1) or similar.

So start elling which disks you have how they are partitioned, what file systems are on the partitions and what they are for (like /dev/sda3 is a Btrfs file system for /, etc.)
We can really not look over your shoulder to see what you see.

When you can boot the system and after that can do not get the GUI login screen, then please use the CLI login (myabe after pressing Ctrl-Alt-F1 or another F.). Then you could execute commands like

cat /etc/fstab`
lsblk -f

and

mount

Try to catch the output on a USB stick to post here, or make photos and post them here.

OK! Nice you managed it.

Try to gather some information on what mass-storage devices you have, how they are partitioned and what those partitions are for (commands to get that above). Save keep those things. This should be part of your backup/restore policy.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.