Sulforaphane
Posts: 49
Joined: Mon Sep 02, 2019 8:29 am

Latest update made my RasPi4 stop working.

Sat Oct 12, 2019 3:23 pm

Hello.

I just updated my Raspberry Pi 4 as I always do, and suddenly it stopped at:
Unpacking raspberrypi-kernel-headers (1.20190925+1-1) over (1.20190819-1)

The connection went, no SSH and no screen connection.

I then tried rebooting and now it gives me three green LED flashes, and pauses and repeats itself.

I'm assuming some important system files got corrupted. The question is, can I fix this or is the only solution to reformat the SSD-card?

Thanks in advance

User avatar
DougieLawson
Posts: 38527
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Latest update made my RasPi4 stop working.

Sat Oct 12, 2019 3:54 pm

Get a copy of plain Raspbian Buster Lite and write that to a new SDCard

Boot that, insert your broken system SDCard in a USB reader, mount that in your RPi

From a command line run the following commands.

sudo fdisk -l /dev/sda to tell us whether it's plain Raspbian or NOOBS

sudo -s
to open a root shell (means you don't have to prefix everything with sudo).

if plain Raspbian
umount /dev/sda1
umount /dev/sda2


if NOOBS
umount /dev/sda5
umount /dev/sda6


Don't worry if those commands fail because the filesystem isn't mounted.

if plain Raspbian
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot


if NOOBS
mount /dev/sda6 /mnt
mount /dev/sda5 /mnt/boot


mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -t proc /proc /mnt/proc


We can now run a chroot (note the trailing full stop).

chroot .

In there run
apt update
apt dist-upgrade -y

to repair the broken system

Then exit the chroot and poweroff
exit
poweroff


Swap the SDCards back and boot normally.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Sulforaphane
Posts: 49
Joined: Mon Sep 02, 2019 8:29 am

Re: Latest update made my RasPi4 stop working.

Sat Oct 12, 2019 6:21 pm

DougieLawson wrote:
Sat Oct 12, 2019 3:54 pm
Get a copy of plain Raspbian Buster Lite and write that to a new SDCard

Boot that, insert your broken system SDCard in a USB reader, mount that in your RPi

From a command line run the following commands.

sudo fdisk -l /dev/sda to tell us whether it's plain Raspbian or NOOBS

sudo -s
to open a root shell (means you don't have to prefix everything with sudo).

if plain Raspbian
umount /dev/sda1
umount /dev/sda2


if NOOBS
umount /dev/sda5
umount /dev/sda6


Don't worry if those commands fail because the filesystem isn't mounted.

if plain Raspbian
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot


if NOOBS
mount /dev/sda6 /mnt
mount /dev/sda5 /mnt/boot


mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -t proc /proc /mnt/proc


We can now run a chroot (note the trailing full stop).

chroot .

In there run
apt update
apt dist-upgrade -y

to repair the broken system

Then exit the chroot and poweroff
exit
poweroff


Swap the SDCards back and boot normally.
Wow thanks, but this is what it says when i run the command "chroot ." - chroot: failed to run command ‘/bin/bash’: No such file or directory

User avatar
DougieLawson
Posts: 38527
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Latest update made my RasPi4 stop working.

Sat Oct 12, 2019 7:00 pm

Oh dear. Your root filesystem has been destroyed - that's probably not salvageable.

You may want to test that your SDCard is not a fake.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Sulforaphane
Posts: 49
Joined: Mon Sep 02, 2019 8:29 am

Re: Latest update made my RasPi4 stop working.

Sat Oct 12, 2019 7:07 pm

DougieLawson wrote:
Sat Oct 12, 2019 3:54 pm

Swap the SDCards back and boot normally.
I got it working by changing chroot from "chroot ." to "chroot /mnt/" and booting the Pi again.

However, while it is still working, everytime i run the sudo apt upgrade from the Pi itself it shows this in the terminal and just doesn't move:

Code: Select all

Preparing to unpack .../raspberrypi-kernel-headers_1.20190925+1-1_armhf.deb ...
Unpacking raspberrypi-kernel-headers (1.20190925+1-1) over (1.20190819-1) ...

Progress: [ 11%] [################.......................................................................................................................................]
I have attached an image showing it.
Attachments
Raspi4_problem.png
Raspi4_problem.png (4.06 KiB) Viewed 269 times

Sulforaphane
Posts: 49
Joined: Mon Sep 02, 2019 8:29 am

Re: Latest update made my RasPi4 stop working.

Sat Oct 12, 2019 7:15 pm

DougieLawson wrote:
Sat Oct 12, 2019 7:00 pm
Oh dear. Your root filesystem has been destroyed - that's probably not salvageable.

You may want to test that your SDCard is not a fake.
No no, I got it working. I just had to change

Code: Select all

chroot .
to

Code: Select all

chroot /mnt/
and following the rest of your steps.

Return to “Troubleshooting”