LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-12-2004, 02:52 AM   #1
Boogieman
Member
 
Registered: Sep 2003
Distribution: Debian GNU/Linux
Posts: 35

Rep: Reputation: 15
I just delete the /lib folder :(


Stupidly i did as a root

~$ rm -rf /lib

How can i recover my info ???
 
Old 07-12-2004, 03:26 AM   #2
flook
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Rep: Reputation: 0
Poor guy...
What filesystem?
 
Old 07-12-2004, 03:27 AM   #3
Boogieman
Member
 
Registered: Sep 2003
Distribution: Debian GNU/Linux
Posts: 35

Original Poster
Rep: Reputation: 15
ext3
 
Old 07-12-2004, 03:43 AM   #4
flook
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Rep: Reputation: 0
Sorry You've lost them all...
 
Old 07-12-2004, 03:57 AM   #5
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 64
Re: I just delete the /lib folder :(

Quote:
Originally posted by Boogieman
Stupidly i did as a root

~$ rm -rf /lib

How can i recover my info ???
Will apt/dpkg still work if so then dpkg --get-selections > selections.txt then edit the file so you have one long list of packages separated by a space on the same line (it is ok if it wraps you just cannot have a line break) then put apt-get install --reinstall at the front of the list of packages in the file make it executable and run it. eg. the file should look like this.

Code:
apt-get install --reinstall aalib1 adduser alien alsa-base .....
And it should reinstall everything.

Edit: You may have to install a different kernel as well I don't believe apt will install over a running kernel and if you are still running the install kernel that came with Woody (if this is what you use) then package system will know nothing about it so you have no choice but to install a new kernel.

Last edited by HappyTux; 07-12-2004 at 04:04 AM.
 
Old 07-13-2004, 12:51 PM   #6
Boogieman
Member
 
Registered: Sep 2003
Distribution: Debian GNU/Linux
Posts: 35

Original Poster
Rep: Reputation: 15
I can't run apt-get install --reinstall ... because i shutdown my computer and i can't load it again. I ask myself if there is a posibility of restore my information with a meta-distro (a cd-live districution) ... but when a type:
(the / of my debian distribution is in /dev/hda6)
~$ mount /dev/hda6 /mnt/debian
~$ chroot /mnt/debian
chroot: cannot execute /bin/bash: File or directory doesn't exist

I don't know what to do ....
 
Old 07-13-2004, 02:11 PM   #7
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
You've lost all your library files. It may be easier to just backup your important files and reinstall your system. The harder way is to reinstall the lost files. At the very least, you have to reinstall[list=1][*]libc6 [*]libpam-modules [*]libpam0g[*]libdb1-compat[*]libcap1[*]libgcc1[*]libncurses[/list=1] to be able to chroot and login.

Boot your live-cd then run
Code:
apt-get -d --reinstall install libc6 libpam-modules libacl1 \
libpam0g libdb1-compat libcap1 libgcc1 libncurses
Extract the packages into a temporary directory
Code:
dpkg -x /var/cache/apt/archives/package-name temp-directory
Then move the files back to /lib.
Code:
mount /dev/hda6 /mnt/debian
mkdir /mnt/debian/lib
cd temp-directory/lib
mv * /mnt/debian/lib
But then you'll still have the task of reinstalling the other library files that are missing.
 
Old 07-13-2004, 05:34 PM   #8
Boogieman
Member
 
Registered: Sep 2003
Distribution: Debian GNU/Linux
Posts: 35

Original Poster
Rep: Reputation: 15
i got a question a little off topic but anyway ... can i do a net-install of debian sid with an adsl connection?
 
Old 07-13-2004, 06:06 PM   #9
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 64
Quote:
Originally posted by Boogieman
i got a question a little off topic but anyway ... can i do a net-install of debian sid with an adsl connection?
Sure can that is how I have installed all my machines here although I usually use the Woody BF2.4 floppy images to do a base install then dist-upgrade to testing/unstable. For the last couple of machines I used the Sarge/testing beta4 floppy images and they seem to work fine. I use the ftp.debian.org mirrors and they usually always fill up the entire bandwith (150k/sec) of my connection.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
managed to delete /lib/libc.so.6 murder Linux - Newbie 5 09-30-2005 03:30 PM
seems like I delete my /etc folder. bladehaze Debian 9 09-12-2005 12:47 PM
How do I delete a folder and everything in it? wuya Linux - Newbie 3 04-22-2005 03:03 PM
delete source folder? machiner Linux - Software 2 07-27-2004 04:37 PM
How to delete the whole folder without being prompted anything conkhikho Linux - Newbie 1 10-27-2003 02:57 AM


All times are GMT -5. The time now is 06:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration