0

i'm deep into a mess here. The pi was running fine for several days, (just for history) tried to install manually npm and node.js from git, made a make install , and I got warnings/issues. Humm.. tried a apt-get update / upgrade then everything got messy, several Illegal instruction appeared.

So I did shutdown the thing as I always do, sudo reboot. And nothing anymore. The thing was headless on wifi. No connection to the router, plug in rj-45, reboot, nothing yet.

I'm lucky I installed a "failsafe" ad-hoc network in case pi can't connect to a known network. I can access it through ssh again.


Now, I can't even use nano anymore => Segmentation failure, and alot of normal commands. BUT, it loads up. Apt-get returns me Illegal instruction when I try to uninstall stuff.

I suspect the filesystem is lightly/medium corrupted/faulty. Probably due to my passion to disconnect directly the power form the beast.


What are my options ?

  • I'm on Noob/Raspbian.
  • I can't reaccess the internet (connect to router)
    • But can launch an ad-hoc server (?)
  • I'd prefer to keep the current system in place (lots of work getting the right config)
  • If I could only reconnect the pi via eth0, it would give it access to the repos, normal access to ssh.

Is there a way to rebuild the system without touching my /home ? I'm kinda desperate, I'll probably reformat/install noobs at the end of the day if I manage to save my data. Else, if you have any idea, need to ask for info, please do so.

  • connect the SD card to another machine, do not mount it, duplicate it with dd and then mount the image dd creates, copy files you need from there. Find a windows machine and run the SD low level formatter. – rob Feb 7 '14 at 14:15
  • data saved = checked – DColl Feb 7 '14 at 16:52
1

I suspect the filesystem is lightly/medium corrupted/faulty.

Maybe; what it literally sounds like is there is a problem with the C library. That could be due to filesystem corruption. It could also have to do with having replaced it...

There are two partitions on the SD card. The second one is the one with the (potentially) corrupt filesystem. To check it, put the SD card in a linux box and use e2fsck.

If that shows a lot of issues, let e2fsck fix everything it can, run it again to be sure, and then try the card in the pi.

If e2fsck didn't show any errors, or repairing the fs does not solve the problem, try whereis libc. On raspbian, the output should reference only the man page (/usr/share/man/man7/libc.7.gz), since the actual library is outside of the normal whereis search path.

The only other thing apt-get and nano have in common is libdl, which would have been very weird to have messed with.

  • Hi, thanks for replying. I never used e2fsck, so maybe i'm not doing it correctly.. So here,s what i do, load in recovery mode (jumper on pin5+6). Then launch e2fsck -v /dev/mmcblk0p1|2|3|5|6 But then only mmcblk0p3 and 6 are read. mmcblkp2 (actual filesystem (I think)) asks if "is it a zero partition". doing sudo shutdown -F -r now returns nothing to concern in the log – DColl Feb 7 '14 at 16:51
  • There's no point using the userland from a potentially corrupt root filesystem to check if the root filesystem is corrupt. You need to do this in another computer without the partition mounted. – goldilocks Feb 7 '14 at 16:54
  • understood. though I could do it on recovery mode whereas everything is unmounted – DColl Feb 7 '14 at 17:44
  • Using what??? The root fs is not unmounted, it's mounted read-only. You can't do anything without a root fs. That's where the e2fsck binary is, and it's dynamically linked, too... – goldilocks Feb 7 '14 at 17:53
  • I was probably wrong with the name, it's "safe mode" (pin5-6). It appeared to me that only the partition mncsadfbar"4" was mounted. I don't know. But I didn't get the warning "must be unmounted" when I checked them – DColl Feb 7 '14 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.