One of those rare bugs

I can’t login to my Raspberry PI3. When I ssh into it the password is rejected. When I plugged a keyboard and HDMI cable in the login would fail silently at first and then after reboot it would tell me the password was wrong.

Fearing the worst, that the small machine had been hacked, I plugged it out and attempted to go into single user mode but even that didn’t work. I tried various cmdline.txt changes, I saw an odd message saying:

sh: can't access tty; job control turned off

That wasn’t the worst. I even managed to generate a kernel panic once!

When I was just about ready to give up I plugged in the HDMI cable again and saw a strange libcrypt error show up.

/sbin/sulogin error while loading shared libraries: libcrypt.so.1: cannot open shared object file: no such file or directory

A quick search for that message brings me to the one thread on the Internet about it.

Unfortunately, I don’t have another Linux machine handy to copy libc6 from but I do have a backup of the SD card and that worked. I made a backup with Disk Utility (yes, don’t sneer, I can use dd too) and after making a new backup I restored the old backup with Etcher.

The last time I did an apt upgrade was just before a recent trip where I was depending on the RPI3 for my Plex music. Luckily the Plex server hadn’t restarted in that time and must have been using the old libc6!

Another tool that was useful here was ext4fuse which I installed through Homebrew. It’s even possible to mount an ext4 partition from an SD card image by first mounting the boot partition with Disk Utility, checking the device with df -h and then using the very next device number like this:

ext4fuse /dev/disk9s2 /Volumes/rpi -o allow_other

Read only access to the Raspberry PI/Linux part of the image! Strangely enough it doesn’t show in Finder but df shows it is mounted.

Now to make a new SD card backup before I update anything else with apt.

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close