Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
This is not a request for help since I have already resolved the issue. I am just a little confused over what happened in the first place.
Last evening my wife casually told me that she couldn't use her computer, which is running PCLinuxOS 2007. The first thing I noticed when I looked at it was that the power was off. I went over and looked at mine, also running PCLinuxOS 2007, and it was also off. We had a thunderstorm during the afternoon so I just assumed a restart would fix everything.
Well, my computer booted up normally, but hers just booted up into a CL login prompt without X. After a couple of unsuccessful attempts at using startx command, I went to look at the xorg.conf file, and couldn't find it. I mean, even the /etc/X11 directory was gone. Now I'm not an X expert but even I know that it need the config stuff. I thought maybe I just forgot where it was supposed to be, since this installation is only a few weeks old, and I was previously using a different distro. So I looked at my /etc directory and there it was, just where I expected it to be on my system.
I spent the rest of the evening getting her computer back to a fully functioning condition.
Now I'm wondering what happened. Can an unexpected shutdown kill a directory like that, especially one with somewhat static content? I thought the risk of losing data was during times of disk update activity, which I don't thing would be happening within /etc when no one was using the computer. The only other alternative I can think of was that she inadvertently did something herself before the power outage. She insists that she didn't do anything unusual. The fact is, she wouldn't know how to go about deleting a file if she wanted to. She doesn't even use a file manager like konqueror. I do all that stuff for her.
Like I said, I'm not needing help. I just want to increase my understanding of things. Anyone have any thoughts?
That certainly is strange. As you suspected, the only real risk of losing data when the system powers off before unmounting the volumes is data that has recently been changed but not yet written to disk. As the X11 config directory should not have been changing, failing to unmount the drive should have had no effects. There could of course be some other culprit, like file system corruption or a bad drive, but you should be seeing collateral effects of an issue like that, not just a missing directory.
The only thing I can think of (and this is way out there) is that perhaps the system was installing an X update right before or during the power loss. I have never used PCLinuxOS, so I don't know if it will automatically install updates like that, but it is certainly not outside of the realm of possibility. Though even then...the chances of the whole directory just vanishing is pretty slim.
Does X only access the configuration when it starts? If so, then I guess the problem could have happened anytime during the past week or so since she leaves the computer up 24/7. I did do some installs via Synaptic a few days ago that had some problems, so maybe they somehow aborted with things out of sync. But deleting a whole directory out of /etc ???
Anyway, no harm was done except a couple of hours of me doing something I hadn't planned on. I have finally educated my wife to save everything on a nfs directory that sits on my Debian box, protected by a ups, and backed up hourly to our other two systems. So if the filesystem gets totally smashed, it's just a re-install to fix, MS Windows style.
X only reads the configuration at startup, it doesn't check it in real-time. But even then, reading the files during a hard shutdown is fine, the problem is when you are writing to a file and the drive is not properly unmounted.