5

After hardly rebooting my raspberry pi 2 running raspian it does not work anymore, when I turn it on everything works fine until this error message shows up repeatedly.

[FAILED] Failed to start udev Kernel Device Manager

The machine then goes to emergency mode. I didn't find any answer online, any ideas?

  • Years ago, I had the same problem with udev after an Raspbian-update (it crashed, and/or reboot didn't work). But today, good news: I updated Raspbian, an udev seems to be working fine (even after reboots etc.)! So I assume the problem has been solved by now. – Chris Jul 19 '18 at 11:00
9

It might be interesting to know which version you are running, and if you happened to update packages recently.

I encountered a similar error message on my raspberry pi2 after upgrading to raspbian testing today (from stretch). However I fear that it may be caused by a full range of different reasons.

The more precise error message I got (from journalctl -u systemd-udevd) was:

Sep 27 16:33:46 raspberrypi systemd-udevd[10856]: /lib/systemd/systemd-udevd: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libarmmem.so: cannot restore segment prot after reloc: Operation not permitted

It does not seem to be related to lib/systemd/systemd-udevd itself. Indeed, if I systemctl restart another service, I get a similar error:

root@raspberrypi:/home/pi# systemctl restart systemd-timesyncd.service
Job for systemd-timesyncd.service failed because the control process exited with error code.
See "systemctl  status systemd-timesyncd.service" and "journalctl  -xe" for details.
root@raspberrypi:/home/pi# journalctl  -xe
[...]
Sep 27 18:54:50 raspberrypi systemd-timesyncd[26811]: /lib/systemd/systemd-timesyncd: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libarmmem.so: cannot restore segment prot after reloc: Operation not permitted
[...]

My understanding is that systemd runs binaries in an environment that clashes with a relocation that is used in libarmmem.so. That is either a bug in systemd (version 234-3 here), or in the package that provides libarmmem.so (raspi-copies-and-fills, version 0.6 from stretch here).

systemd of course is essential, while raspi-copies-and-fills is not (it's an important optimization, but the system can run without it). I solved my problem with the following interim solution:

root@raspberrypi:/home/pi# apt purge raspi-copies-and-fills

Clearly, I'll monitor the possible updates to raspi-copies-and-fills (so far at version 0.6), hoping to get both a bootable system and the fast memcpy's.

7

As of systemd 235-2 this still continues with the exact same error.


For people landing here from google:

If you see that after apt dist-upgrade that either udev, journald or even timesyncd are crashing,

Until raspi-copies-and-fills, is updated, purging it like Emmanuel Thomé suggested is the only viable solution so far.

2

Rebuilding raspi-copies-and-fills from https://github.com/bavison/arm-mem fixes this in buster.

  • Could you please elaborate on this how to do this? – Till Kolditz Feb 10 at 0:03
1

I had the same issue with my pi-3 and raspi-copies-and-fills installed. Udev/systemd 232-25+deb9u1 was the last working version. All updates to a newer udev version failed and i was always forced to revert to 232-25+deb9u1

Now i have removed raspi-copies-and-fills and updating to 239-7 worked without error.

0

I had a similar issue after upgrading from Raspbian 8 to Raspbian 9. After udev package was upgrading to latest backport version, the raspberry was booting in emergency mode :

Welcome to emergency mode! After logging in,type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or ^D
to try again to boot into default mode.
Give root password for maintainence
(or type control-D to continue):

removing raspi-copies-and-fills solve it !!

  • And why would that help? – RalfFriedl Jun 7 at 20:43
  • What is this raspi-copies-and-fills? Where is it? – Ingo Jun 8 at 23:50

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.