1

Using a Raspberry Pi Zero W with Raspbian (last updated a few weeks ago).

I did a apt upgrade, but that broke.
I was asked about a new configuration file and I typed the key to compare them. Then I was not able to get out of that, so I typed everything: Esc, Ctrl+Z, Ctrl+C, Ctrl+D, and that kicked me right out the upgrade.

My USB is not working and my wifi is not working. The desktop starts and shows at the HDMI.

Is there a way that I can fix this on the micro SD memory card ?
I have already cleared the /tmp folder.
I forgot all the extra packages and settings that I have done, therefor I would rather not install a new Raspbian image and start all over again.

1
  1. The right combination to exit nano is Ctrl+X.

  2. If you accidentally killed apt upgrade (or it crashed on its own), try re-starting it right away. Deal with any error messages before you reboot, otherwise you may end up in the same state again.

  3. If you lost USB, you still have an option to login using a USB-to-UART dongle connected to UART pins. You will need to set enable_uart=1 in config.txt and console=serial0,115200 in cmdline.txt to enable UART and login prompt on UART respectively.

  4. If you have to start from scratch, save the .bash_history file from your home folder before overwriting the SD card. This file contains all commands you ever typed in your shell, hopefully including the installation commands you'll have to repeat on the new image.

-1

Can you try the below followed by a reboot?

sudo dpkg --configure -a

I had an identical problem and the above resolved after.

2
  • The USB is not working, so I can't type anything. I tried adding "dpkg --configure -a" to /etc/rc.local and also wrote something to a log file, but nothing happened, as if /etc/rc.local is not started. I think I have start all over with a new Raspbian image.
    – Jot
    Jul 16 '17 at 6:59
  • Yes, that's fair. I had to LAN the Pi and ssh in to get it working - if you can't do these things then you're going to have to start afresh.
    – Sunvic
    Jul 19 '17 at 12:42

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.