Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
While I was trying to log in as root, i was trying to remove the .X0-lock file.
Accidently, i removed the /etc folder
Code:
rm -rf /etc/
Now my system shows the message(while booting up)
I tried 1, but didnt work.
--Is there any way to recover my machine (Debian Etch), without a reinstall?
You can get a list of installed package in /var and from this, reinstall all packages, including configuration files. You will have the default /etc directory for the install packages. The remaining missing files in /etc have to be manually recreated probably. Not impossible.
Quote:
--What about copying the /etc folder from another linux machine?
Thanx...
Yes, depends on how you modified your system.. moving an etch from fedora core to debian is not a good thing tho' prefer from debian to debian
I thought of copying a '/etc' from another system.
But, there is a problem.
How will I log into my machine. It asks for a 'runlevel'.
What should I enter here?
Is it not true that the .trash-root folder in /root would hold the deleted files temporarily until it is emptied?
Never restore files from there yet but I know all my deleted files are there taking up the storage and I have to go in from time to time to clean it out. Think that is the same way the recycle bin work in the MS system.
If that is the case just boot up a Live CD to restore the partition.
Don't spend half your life trying to fix it. Accidentally removing critical system files is part of the learning curve for new Linux users. If you built your system with /home on a separate partition (you should have), just reinstall around it. (During the partitioning dialog, identify the same /home partition, and do not format it.)
I always recommend that my newbie friends reinstall a few times at first. There is much to be learned in that process.
Don't spend half your life trying to fix it. Accidentally removing critical system files is part of the learning curve for new Linux users. If you built your system with /home on a separate partition (you should have), just reinstall around it. (During the partitioning dialog, identify the same /home partition, and do not format it.)
I always recommend that my newbie friends reinstall a few times at first. There is much to be learned in that process.
Agreed. Caution should always be used when toying around as root. Mistyped commands can mess up a lot, and there's no "Trash" with rm.
If you recently installed, the easiest but time consuming way would be to do it again (build around /home as rickh says in case you have files in there you do not want to have overwritten).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.