[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help repairing a corrupted system



Hi all,

I try to be short:
When running a normal update (using aptitude) on my testing system, I had a system crash. Thought it was X, but the box could not be reached via network. So I resetted it.. At start I got the init prompt:

INIT: version 2.86 booting
cannot execute "/etc/init.d/rcS"
Entering runlevel: 3
cannot execute "/etc/init.d/rc"

I booted the system with an install CD of Debian (pretty old one), and ran a fsck on my root partition, because I could not mount it without error (...Wrong free blocks count in super block / Wrong free inodes count in super block...). The filesystem check reported problems with the /bin/bash file, the rbash and others. I answered yes at every prompt

Rebooting did not change the behaviour. Looking at the root partition, I notice that /bin did not contain bash or sh. I copied the ash from my rescue cd as sh and linked bash on it. Now my system can boot again :)

I would like to reinstall the bash, tried apt-get install --reinstall bash, but it complains with the following output:

-----------------------------------
# apt-get install --reinstall bash
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up bash (3.1-5) ...
cat: /etc/shells: No such file or directory
Either another instance of /usr/sbin/add-shell is running, or it was previously interrupted.
Please examine /etc/shells.tmp to see if it should be moved onto /etc/shells.
dpkg: error processing bash (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 bash
E: Sub-process /usr/bin/dpkg returned an error code (1)
-----------------------------------

Now there is no file named /etc/shells.tmp, and I do not know what to do to have a "heal" system again. 
Possibly, other programs were corrupted during this crash, is there a way to check the base system?

Any help or pointers would be greatly appreciated,

Dimitri



Reply to: