Re-create rc5.d directory?

Discussion in 'Installation/Configuration' started by mpl, Feb 23, 2011.

  1. mpl

    mpl New Member

    Good Evening All,
    Had a power failure yesterday and server did not come down gently...UPS failed. Anyway, after I got the raid reassembled and filesystem checked the server came back up. The only issue I have found is while trying to install rsync I received the following error...
    Code:
    Setting up rsync (3.0.3-2) ...
    update-rc.d: chdir /etc/rc5.d: Input/output error
    dpkg: error processing rsync (--configure):
     subprocess post-installation script returned error exit status 5
    Errors were encountered while processing:
     rsync
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
    Then looking at /etc/rc5.d
    Code:
    drwxr-xr-x   2 root       root      4096 2011-02-10 17:57 rc0.d
    drwxr-xr-x   2 root       root      4096 2011-02-10 17:57 rc1.d
    drwxr-xr-x   2 root       root      4096 2011-02-10 17:57 rc2.d
    drwxr-xr-x   2 root       root      4096 2011-02-10 17:57 rc3.d
    drwxr-xr-x   2 root       root      4096 2011-02-10 17:57 rc4.d
    d?????????   ? ?          ?            ?                ? rc5.d
    drwxr-xr-x   2 root       root      4096 2011-02-10 17:57 rc6.d
    -rwxr-xr-x   1 root       root       306 2011-01-15 12:17 rc.local
    drwxr-xr-x   2 root       root      4096 2011-01-15 16:38 rcS.d
    Any idea how to repair or recreate this directory? On a side note, I have noticed other directories with this problem as well. Is there anyway to find all of these without "ls" the entire directory structure? There were a number of disk errors after the crash that fsck repaired. Thanks for any help in advance!
     
  2. falko

    falko Super Moderator ISPConfig Developer

    That's how mine looks on a Debian Lenny ISPConfig 3 Perfect Server:

    Code:
    server1:~# ls -la /etc/rc5.d
    total 12
    drwxr-xr-x  2 root root 4096 Aug 21  2010 .
    drwxr-xr-x 94 root root 4096 Feb 23 17:15 ..
    -rw-r--r--  1 root root  556 Aug 12  2008 README
    lrwxrwxrwx  1 root root   18 Aug 21  2010 S10sysklogd -> ../init.d/sysklogd
    lrwxrwxrwx  1 root root   13 Aug 21  2010 S16ssh -> ../init.d/ssh
    lrwxrwxrwx  1 root root   23 Aug 21  2010 S17mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm
    lrwxrwxrwx  1 root root   19 Aug 21  2010 S18mysql-ndb -> ../init.d/mysql-ndb
    lrwxrwxrwx  1 root root   16 Aug 21  2010 S19amavis -> ../init.d/amavis
    lrwxrwxrwx  1 root root   15 Aug 21  2010 S19mysql -> ../init.d/mysql
    lrwxrwxrwx  1 root root   22 Aug 21  2010 S19spamassassin -> ../init.d/spamassassin
    lrwxrwxrwx  1 root root   23 Aug 21  2010 S20clamav-daemon -> ../init.d/clamav-daemon
    lrwxrwxrwx  1 root root   26 Aug 21  2010 S20clamav-freshclam -> ../init.d/clamav-freshclam
    lrwxrwxrwx  1 root root   28 Aug 21  2010 S20courier-authdaemon -> ../init.d/courier-authdaemon
    lrwxrwxrwx  1 root root   22 Aug 21  2010 S20courier-imap -> ../init.d/courier-imap
    lrwxrwxrwx  1 root root   26 Aug 21  2010 S20courier-imap-ssl -> ../init.d/courier-imap-ssl
    lrwxrwxrwx  1 root root   21 Aug 21  2010 S20courier-pop -> ../init.d/courier-pop
    lrwxrwxrwx  1 root root   25 Aug 21  2010 S20courier-pop-ssl -> ../init.d/courier-pop-ssl
    lrwxrwxrwx  1 root root   17 Aug 21  2010 S20jailkit -> ../init.d/jailkit
    lrwxrwxrwx  1 root root   24 Aug 21  2010 S20modules_dep.sh -> ../init.d/modules_dep.sh
    lrwxrwxrwx  1 root root   17 Aug 21  2010 S20postfix -> ../init.d/postfix
    lrwxrwxrwx  1 root root   25 Aug 21  2010 S20pure-ftpd-mysql -> ../init.d/pure-ftpd-mysql
    lrwxrwxrwx  1 root root   15 Aug 21  2010 S20rsync -> ../init.d/rsync
    lrwxrwxrwx  1 root root   19 Aug 21  2010 S20saslauthd -> ../init.d/saslauthd
    lrwxrwxrwx  1 root root   18 Aug 21  2010 S20stunnel4 -> ../init.d/stunnel4
    lrwxrwxrwx  1 root root   16 Aug 21  2010 S20xinetd -> ../init.d/xinetd
    lrwxrwxrwx  1 root root   13 Aug 21  2010 S21fam -> ../init.d/fam
    lrwxrwxrwx  1 root root   18 Aug 21  2010 S21sendmail -> ../init.d/sendmail
    lrwxrwxrwx  1 root root   13 Aug 21  2010 S23ntp -> ../init.d/ntp
    lrwxrwxrwx  1 root root   14 Aug 21  2010 S89cron -> ../init.d/cron
    lrwxrwxrwx  1 root root   17 Aug 21  2010 S91apache2 -> ../init.d/apache2
    lrwxrwxrwx  1 root root   18 Aug 21  2010 S99fail2ban -> ../init.d/fail2ban
    lrwxrwxrwx  1 root root   18 Aug 21  2010 S99rc.local -> ../init.d/rc.local
    lrwxrwxrwx  1 root root   19 Aug 21  2010 S99rmnologin -> ../init.d/rmnologin
    lrwxrwxrwx  1 root root   23 Aug 21  2010 S99stop-bootlogd -> ../init.d/stop-bootlogd
    server1:~#
    But instead of creating the directory and the symlinks in it by hand, you can try the following:

    Code:
    cp -pfr /etc/rc3.d /etc/rc5.d
     
  3. mpl

    mpl New Member

    Thanks Falco! Tried it and.....
    Code:
    webserver:/etc# cp -pfr /etc/rc3.d /etc/rc5.d
    cp: accessing `/etc/rc5.d': Input/output error
    
    Unless there is a way to recover this directory, it looks like I might be reinstalling the OS.

    Running Debian Lenny. If I do an upgrade install will this repair?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Looks like a problem with your hard drive. Have you tried to repair the file system?
     
  5. mpl

    mpl New Member

    After the crash, I had to recreate and reassemble the raid and run fsck (no force) twice. Fsck found quite a few errors but reported them as repaired. The drive is reported clean at boot now. Should I run again? Any other suggestions? Thank you for your help Falco ;)
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Can you post the output of
    Code:
    ls -la /etc/rc*
    ?
     

Share This Page