# How to get to user files in single user mode



## dcole (May 22, 2014)

Hello,

For making a long story short - I accidentally deleted /usr/lib/*. Now, I have a tar of directory that I had created, and it is extracted in /home/user/libfolder. However, I can't log in because libpam is missing. So I am in single user mode, however /home is empty. 

How do I see all my user files while I am in single user mode so I can move the libraries into /usr/lib?


----------



## wblock@ (May 23, 2014)

Mount /usr and look in /usr/home.


----------



## fulano (May 23, 2014)

Or, better yet, type `mount -a`


----------



## SirDice (May 23, 2014)

Keep in mind when booting to single user mode that only the root (/) filesystem is mounted, read-only. Nothing else is loaded and no other filesystems are mounted.

Basic single user mode stanza:

```
fsck -y         # Check filesystems for errors
mount -u /      # re-mount root as read/write
mount -a -u ufs # mount all UFS filesystems
swapon -a       # Enable swap
```


----------



## dcole (May 23, 2014)

II had read that about the root file system being read only. I have tried to `mount -a` with no luck.
I gave up on trying to get this system back up, and just created a new VM. This one had minimal amounts of necessary files on it so at this point it was faster to just re-create those files than trying to get this system back in working order.


----------



## SirDice (May 23, 2014)

If it's a ZFS system you may need to run `zfs mount -a`. The `mount -a` command only works for filesystems that are in /etc/fstab (ZFS filesystems usually aren't).


----------



## dcole (May 23, 2014)

Ah. You are probably correct that's what the problem was. It was in fact a ZFS system. Thanks for the help! I'll remember for next time.


----------

