1

So I was buys performing an update and upgrade of the raspberry pi using

sudo apt-get update
sudo apt-get upgrade

While that was being performed The system accidentally shut down during the last few steps of the upgrade process. Now I receive the error on boot up

[FAILED] Failed to start Load Kernel Modules

See 'systemctl status systemd-modules-load.service' for details

The very weird thing is that the USB mouse and keyboard do not work. The wifi connection doesn't work but the Raspberry pi can boat perfectly fine into the Rasbian desktop GUI. I can even see the percentage of processing power changing as the Pi sits idle.

Is there a way to fix from this? I don't mind formating back to a prior backup if I have to but first I need to pull some data from the RPi as It hasn't been backed up since the last backup.

As a note: I can access the root@(none) and use keyboard by adding init=/bin/bash the cmdline.txt on the SD card.

2 Answers 2

1

The error message is not itself a cause of concern, BUT a crash during upgrade IS

Edit cmdline.txt and add init=/bin/sh to the end of that line. This will make Raspbian skip the normal boot up procedure and dump you into the root shell.

You should then be able to copy your files.

You COULD try apt upgrade but it is safer to restore from your backup (to a new card) then mount the old and copy files.

5
  • So I removed the init=/bin/bash and replaced it with the init=/bin/sh and I received an error. /bin/sh: 0: can't access tty; job control turned off. This is weird as booting can go through to the raspbian desktop which means the drive can be accessed Commented Nov 19, 2018 at 5:23
  • So I looked up the /bin/sh: 0: can't access tty; job control turned off error and many complaints involve the GPIO. which is weird as mine is an SD card problem. The recommendation is to add avoid_safe_mode=1 to the boot config.txt. Can access the drive now. Commented Nov 19, 2018 at 5:38
  • 1
    @Hojo.Timberwolf /bin/sh is the normal system shell; it used to be a symlink to bash, but Debian uses dash. It doesn't really matter, but if things like this are broken it is probably symptomatic of serious problems. it is safer to restore from your backup (to a new card) then mount the old and copy files
    – Milliways
    Commented Nov 19, 2018 at 5:47
  • I see. Once I have the files, I will restore from an old back. I can currently access all the directories except for the flash drive I plugged into the USB. I can see the files in home/pi/Desktop, just need to copy them now Commented Nov 19, 2018 at 5:50
  • As All I was really wanting to save was code, I just copied all the lines of code to my desktop. Now I will restore to a backup. As you mentioned to a new card. Does this mean the card which messed up is corrupted and can no longer be used? Commented Nov 19, 2018 at 6:41
-1

open: /etc/modules-load.d/*.conf by

sudo nano /etc/modules-load.d/*.conf

and commend all lines like:

# Parallel printer driver modules loading for cups
# LOAD_LP_MODULE was 'yes' in /etc/default/cups
#lp
#ppdev
#parport_pc
1
  • 2
    Why should the OP do that?
    – Ingo
    Commented Feb 14, 2019 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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