You are not logged in.

#1 2011-10-25 15:28:38

jgreen1tc
Member
From: St. Louis
Registered: 2011-05-16
Posts: 251

I removed a file, now my filesystem is read only

Yesterday, when running pacman -Syu, I got the error described here. I didn't know the procedure to solve the issue at the time, and in my haste to get the update started so I could get to class, I just removed the file before checking if it was owned by another package. Everything worked for a while afterwards, and then my system completely froze. I gave it a hard reboot and now my filesystem is read-only.

I'm assuming another (important) package owned this file? If I were to find out what file I removed, would I be able to find the package that owned it and transfer the file somehow to my computer?

I will edit this post with the file I removed after I walk back to my room to check my pacman log...if that is important at all...

Offline

#2 2011-10-25 15:49:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: I removed a file, now my filesystem is read only

We need to know what file was that. Was it http://www.archlinux.org/news/initscrip … -required/ ?


If in doubt, postpone an update until you have time to think - especially if it involves unusual steps, doubly so if you're removing stuff.

Offline

#3 2011-10-25 16:03:17

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: I removed a file, now my filesystem is read only

How do you know it's read-only? If you right click something - Properties - Permissions, does it say which user it belongs to?

Are you part of the "storage" group?

$ groups jgreen1tc   (or whatever name you use to log in)

When in doubt, use "mv /path/to/source/file /path/to/destination/and/or/file" instead of rm. It basically moves it, and you can also "move" it in the same directory with the ".bak", ".backup", ".old", etc., extension.

Last edited by DSpider (2011-10-25 16:03:46)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#4 2011-10-25 18:02:43

jgreen1tc
Member
From: St. Louis
Registered: 2011-05-16
Posts: 251

Re: I removed a file, now my filesystem is read only

karol wrote:

We need to know what file was that. Was it http://www.archlinux.org/news/initscrip … -required/ ?


If in doubt, postpone an update until you have time to think - especially if it involves unusual steps, doubly so if you're removing stuff.

I couldn't find it in the log but I am 90% sure that was it. I'm going to read up on that and be more careful in the future. Teaches me to not read the front page I guess.

DSpider wrote:

How do you know it's read-only? If you right click something - Properties - Permissions, does it say which user it belongs to?

Are you part of the "storage" group?

$ groups jgreen1tc   (or whatever name you use to log in)

When in doubt, use "mv /path/to/source/file /path/to/destination/and/or/file" instead of rm. It basically moves it, and you can also "move" it in the same directory with the ".bak", ".backup", ".old", etc., extension.

I know it's read only because many commands tell me so. I cannot right click anything as I startx through my .xinitrc file and it is read only. I am stuck in tty1.

Good advice with the second part. I'll keep that in mind. I'll post back after I read through karols link if I need any help.

Offline

#5 2011-10-25 18:06:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: I removed a file, now my filesystem is read only

-rwxr-xr-x 1 1,5K 10-10 06:53 .xinitrc

These are my .xinitrc permissions, what are yours?

Can you create or edit some file?

Offline

#6 2011-10-25 21:39:02

jgreen1tc
Member
From: St. Louis
Registered: 2011-05-16
Posts: 251

Re: I removed a file, now my filesystem is read only

karol wrote:
-rwxr-xr-x 1 1,5K 10-10 06:53 .xinitrc

These are my .xinitrc permissions, what are yours?

Can you create or edit some file?

Now that I'm looking around, I'm starting to notice this error when I log in as user

No directory, logging in with HOME=/

So I have no .xinitrc or anything in my users /home directory for that matter.  Even as root, my files are read only.

I'm starting to think about doing a clean install and being more careful. Would I even be able to fix it without editing any files?

Offline

#7 2011-10-26 15:22:56

meph
Member
Registered: 2011-06-06
Posts: 160

Re: I removed a file, now my filesystem is read only

The error message you see means that the login command can't find a home directory for the user in your /etc/passwd file and uses / instead.

Your /etc/passwd might be corrupt, your problem might have nothing to do with the update and your removing a file. This would also explain why even root doesn't have write access to the whole filesystem, as its UID is read from /etc/passwd file as well. Your /etc/shadow might still be intact and that would be why login command lets you actually log in any user with its respective password, but missing info from /etc/passwd confuses it into thinking that even root is a regular user.

You can manually check contents of /etc/passwd, or there's a tool for that, called pwck.


Running arch is like raising a puppy - if you spend a bit of time with it each day and do just a bit of training you'll end up with the most loyal partner you could want; if you lock it in a room and don't check on if for several days, it'll tear apart your stuff and poop everywhere.

Offline

Board footer

Powered by FluxBB