# hd errors followed by missing start-stop-daemon

## doesntcount

I recently encountered some hd errors on my root filesystem (reiserfs) which i was able to fsck using a rescue disc. However, now during boot, there a failures starting many services because start-stop-daemon is missing. Seems it's supposed to be in /sbin, but i've find / -name start-stop-daemon with no luck.

How would i get a new copy of start-stop-daemon. What needs to be reinstalled to get this binary back?

Thanks for your help.

-Nathan.

----------

## massimo

 *doesntcount wrote:*   

> How would i get a new copy of start-stop-daemon. What needs to be reinstalled to get this binary back?
> 
> 

 

sys-apps/baselayout

----------

## tarpman

and if that doesn't do it, sys-apps/debianutils, which is where start-stop-daemon was before a custom one was written for Gentoo.

----------

## doesntcount

Great, that gets me a little closer. Still seems i'm missing files  :Sad: 

```

# /etc/init.d/sshd start

 * Starting syslog-ng ...

/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory

/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory/lib/rcscripts/sh/rc-daemon.sh: line 194: /bin/pidof: No such file or directory

 * Failed to start syslog-ng

```

Is there a way i can look up what packages these files would be a part of somehow. Seems like I might just have to rely on people's expertise here. Google isn't great at telling me which gentoo packages include certain binaries.

Really appreciate the help here.

----------

## doesntcount

From the pidof man page, I learned:

 *Quote:*   

>        pidof is simply a (symbolic) link to the killall5 program, which should
> 
>        also be located in /sbin.
> 
> 

 

found killall in /usr/bin, so i ln -s /usr/bin/killall /sbin/pidof and got one step further. But then:

```

# /etc/inid.d/sshd start

 * Starting syslog-ng ...

 * Failed to start syslog-ng

#

```

Obviously there's nothing in the logs, since syslog-ng isn't started. It's frustrating that there isn't more info given for the failed start.  :Sad: 

----------

## jcat

There's no telling what else you're missing, there is likely to be all sorts of stuff.  This is probably the time you learn about the importance of backup  :Smile: 

So job number 2 is:  Design, test, and implement an appropriate backup scheme.

Job number 1 is of course get your system running again.

Probably the best approach is to boot of a LiveCD, then chroot to your normal system environment.

Once their, make sure Portage is not missing any files.  You may find this recovery method helpfull:

http://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml

Then you should go about re-emerging the important system packages, like baselayout etc..

Once your system seems reasonably stable, should probably think about 

```
emerge -e system
```

 at least.

BTW  Without knowing the reason for the file system corruption, you have no reason to believe it's not going to happen again at some point soon.  So unless you investigate the reasons properly, you the repair my be a waist of time.

Cheers,

jcat

----------

## doesntcount

jcat, you're right. I will definitely be doing job number 2. Although, my portage does seem in tact. So I'm updating the world right now (something i hadn't done in a while). We'll see if that bears any fruit. Re-emerging just baselyaout only helped me get back start-stop-daemon. I'm hoping (possibly foolishly) that the emerge world will fix everything else.

If not, I'll probably have to reinstall from the livecd. As well, I really have no idea where to start digging to determine the root cause of this problem. Leading up to this, gentoo was freezing after running for a few hours, which lead to hard reboots. Not sure if the hard reboots are what caused the filesystem corruption or if the filesystem corruption caused the freezing. If it's the former, could be bad hardware (motherboard, cpu, memory) and if it's the latter then it could be the hd. My gut tells me hardware is the root problem here and I'm hoping it's just the harddrive, those are replaceable.

Since repairing the filesystem, however, the freezes have stopped (for now), which is suggesting to me that it's the harddisk.

jcat, do you have any tips of where to look for evidence to support my theories?

Thanks.

----------

## jcat

I'm not totally familiar with RiserFS, as I've always avoided it.  Without trying to start a "FS" war, I've heard many reports of problems under certain circumstances, so I always favoured ext3, it's at least a more matured FS.

Your system freezing issue may have caused some file corruption, but only if it froze while you were righting to a particular file(s) during the freeze (or just before).  So for files from baselayout to corrupted, you would have to have been updating baselayout during or just before the crash, whether that be updating the package or just editing some files manually.

If the above is not something you have done recently, then it suggests that your hard drive is dodgey.  However, you might have more than one issue happening, hard drive and some other hardware.  To help you try and track it down, there are some useful troubleshooting guide by Daniel Robbins (the original Gentoo Architect) as a starting point.

http://www.gentoo.org/doc/en/articles/hardware-stability-p1.xml

http://www.gentoo.org/doc/en/articles/hardware-stability-p2.xml

If you require any more assistance, please post back  :Smile: 

Cheers,

jcat

----------

## tarpman

 *doesntcount wrote:*   

> found killall in /usr/bin, so i ln -s /usr/bin/killall /sbin/pidof

 

/usr/bin/killall and /sbin/killall5 are not the same program.

----------

## doesntcount

Hehe, thanks tarpman, that's good to know.

Doesn't matter anyways, the whole system was unsalvagable and got that way due to a defective motherboard which has been replaced.

Thanks for everyone's help here. This has not been a fun problem to have.

----------

## jcat

Glad you got it sorted  :Smile: 

Cheers,

jcat

----------

