View Full Version : Crashed my system (Fedore 11)

6th August 2009, 10:51 PM
I was learning the bash shell, and playing around with scripts to remove files. I wrote a script, in ~/bin which read something like this: rm -dR $(ls $(~/Music2/*/* )) thinking that I would clear a bunch of worthless files from a test directory Music2. I was in ~/ when I ran the script - it did not act at all like I though and started removing all sorts of stuff. Hit ^C to no effect and then tried to shut it down, which it did in a really messed up way.

When I fired it back up it showed a long list of ext3 errors and at length came into a file system check which failed and dropped my into a shell. Looking in the home folders, everyone seems to be fine except my own - much of the personal stuff has been removed (not the end of the world) and I have this odd file called "Fedora Multi-Desktop" - which I had never seen before. Unfortunately I no longer have ~/bin or anything in it, thus I am not for certain that the above is exactly the script I ran as I can no longer look at it (if not it differs only in the -dR part, which perhaps was just -R)

So how do I get out of this one? Do I delete my user account (if so, how). Do I have to reload Fedora all over ?

Also - why did my script fail? Inside Music2 I had three directories - I thought it would open each directory in there, run a List on them and remove each one in the list so when it was done Music2 would have three directories in it, all of which would be empty. Clearly my test project failed!!!

6th August 2009, 11:40 PM
Option I see of hand. First, install autopsy and recover your deleted files if you lost something important. Install to a different harddrive. This of course will require a working system. If you infact did not lose anything worth having, just boot to bash, copy off your home folders and reinstall. Quicker than fixing probably

7th August 2009, 12:08 AM
There is a rather large file which appears to still be in the system that I do want (/usr/share/music ).

When I fire up the computer, after a forced file system check, it states the following:

Checking filesystems
/dev/VolGroup00/LogVo100 contains a file system with errors, check forced.
Inodes that were part of a corrupted orphan linked list found.

(i.e., without -a or -p options)
*** An error occurred during the file system check
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
*** Warning -- SELinux is active
*** Disabling security enforcement for system recovery.
*** Run 'sentenforce 1' to reenable.
Give root password ......
(after typing it in .....)
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
(Repair filesystem) 1#

When I go into the shell everything is "read only" so I can't seem to copy or move anything. With that said - is there a way to get it out of read only so I can move stuff around?

7th August 2009, 12:27 AM
Read only is most likely protecting your system so you can't overwrite anything. I would install FC to another disk, install autopsy, recover everything and reinstall. I'm not sure how to recover a deleted file without TSK or Autopsy.

Obligatory, please back stuff up statement.

7th August 2009, 12:29 AM
YES!!!! In the shell I typed in "fsck" and let it do its thing - said yes to everything and rebooted and she came back alive! I am missing a number of files in my $HOME - but that's no big thing.

Thanks much for your help.