# Segmentation fault

## kahlesss351

After the / filesystem ran out of space and after a few hard resets, a lot of the /bin files are causing Segmentation faults. Another symptom is none of the /etc/init.d scripts are running on reboot ( cause of /bin files ). What can I emerge to correct the files in /bin?

Cheers,

----------

## -Craig-

everything you've installed, I guess...you could check that out with "equery"... als try revdep-rebuild

----------

## kahlesss351

thanks, both commands don't work on my build. I guess what i am asking is what package looks after the common  /bin file?

----------

## -Craig-

???

Check if you've installed gentookit.

There is no package that "looks after the common /bin file".

----------

## i92guboj

 *kahlesss351 wrote:*   

> After the / filesystem ran out of space and after a few hard resets, a lot of the /bin files are causing Segmentation faults. Another symptom is none of the /etc/init.d scripts are running on reboot ( cause of /bin files ). What can I emerge to correct the files in /bin?
> 
> Cheers,

 

First, if you ran out of space in /, you should not boot into it, hard resets might have corrupted some files, if the system libs are corrupted, all programs will segfault, except for those using static linking, usually almost none  :Razz: 

Boot from a livecd, and before mounting the partition check is with fsck, and repair all the errors, then mount it, try to chroot into it and see if the programs work or not. You might need to reinstall. To use hard reboots on a completelly full drive is usually not a good thing to do.

----------

## kahlesss351

Thanks guys, yeah hard resets are bad, tried telling the guy but some people won't listen. I have already did a fsck on the "/" mount and can get the system up and running after a reboot buy manually restarting network interfaces etc. i get that problem with all my /etc/init.d/scripts #

* Please run:

 *   # /sbin/depscan.sh

 * to try and fix this.

 * Re-caching dependency info (mtimes differ)...

Whats the best way to rebuild it without having to modify conf files and emerge packages back the way it was?

ie don't want to have to start from scratch again!

----------

## bLUEbYTE84

 *kahlesss351 wrote:*   

> Thanks guys, yeah hard resets are bad, tried telling the guy but some people won't listen. I have already did a fsck on the "/" mount and can get the system up and running after a reboot buy manually restarting network interfaces etc. i get that problem with all my /etc/init.d/scripts #
> 
> * Please run:
> 
>  *   # /sbin/depscan.sh
> ...

 

I think emerge -e system and then emerge -e world will do.

----------

## kahlesss351

Thanks for that, will give it a go.

----------

## mv

 *kahlesss351 wrote:*   

> * Please run:
> 
>  *   # /sbin/depscan.sh
> 
>  * to try and fix this.

 

Did you try this suggestion? I would attempt "/sbin/depscan.sh -u"

----------

## kahlesss351

i tried /sbin/depscan.sh -u ..same results

emerge -e system

/usr/lib/portage/bin/ebuild.sh: line 1347:  1477 Segmentation fault      chmod g+w "${T}/eclass-debug.log" >&/dev/null

>>> Unpacking source...

>>> Unpacking patch-2.5.9.tar.gz to /var/tmp/portage/patch-2.5.9/work

tar: Child died with signal 11

tar: Error exit delayed from previous errors

!!! ERROR: sys-devel/patch-2.5.9 failed.

!!! Function unpack, Line 375, Exitcode 2

!!! failure unpacking patch-2.5.9.tar.gz

!!! If you need support, post the topmost build error, NOT this status message.

is what i get after the emerge -e system,

anything else i can try? coz most of the files is /bin seg fault and as you can see emerge uses chmod

----------

## bLUEbYTE84

The situation looks bad. I'm afraid a reinstall seems to be the only way to go.

Edit: Maybe unpacking the stage tarball over your partition can be the last hope. But obviously this will take your system to a very weird state. Dunno, you could try doing this and then retry the two recommendations. Then you should do a emerge -e system followed by emerge -e world.

----------

## kahlesss351

Hmm, the main problem is that chmod seg fault, can someone just send me the chmod file, that way emerge might work?

----------

## coolsnowmen

for someone to do that, they would have to know alot more about your system....

but the easiest would be to copy it off your live cd...

----------

## mv

 *kahlesss351 wrote:*   

> Hmm, the main problem is that chmod seg fault, can someone just send me the chmod file, that way emerge might work?

 

You might try to use temporarily (until you succeed to recompile the libs/binaries)

```
cd /bin

mkdir /bin.bak

mv chmod chown ... /bin.bak

ln -s bb chmod

ln -s bb chown

...
```

(bb might also be called busybox.static or busybox on your system - if you have several versions use the longest one which is probably the static one)

----------

## coolsnowmen

 *mv wrote:*   

> 
> 
> (bb might also be called busybox.static or busybox on your system - if you have several versions use the longest one which is probably the static one)

 

Use "ldd", its a useful tool anyways

----------

