Kernal panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2)

Will try.

after the SSD mounts as read only I am unable to run any commands though (assuming I am booted from the SSD)


Ran directly after boot from SSD (no failure yet)

/dev/sda2:
 setting Advanced Power Management level to disabled
 APM_level      = off

EMPTY

throttled=0x0

EDIT: It’s been running for about 12 hours now without crashing. The thing is, I haven’t done anything with the PI yet, so far (iirc) it never locked the fs just out of nowhere but when I was doing something such as copying a folder. One time it locked after unmounting (through drive manager) my HDD (I have a WD My Book External Desktop Hard Drive Storage 12 TB | Western Digital, with important data on it).

So I am not really sure how do I test if it’s fine now, maybe hdparm -B 255 /dev/sda2 did the trick? I am pessimistic so I don’t want to jump to any conclusions

EDIT 2:

uptime -p
# up 1 day, 11 hours, 57 minutes

But I will say again I have been busy and didn’t have time to do anything on the system so I still am not sure. Just updating since it can’t hurt. Also if it does suddenly lock the FS what should I do to extract useful information? Commands don’t run since they can’t be read. Anything that’s possible after a reboot? Not sure why I was also unable to run commands sometimes but it worked now

I made another comment since the previous one was getting long.

System locked again when trying to delete a folder with many files. I was able to run the commands @MichaIng gave me:

dmesg -l 0,1,2,3

:

[130093.024919] usb usb2-port1: connect-debounce failed
[130106.649177] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[151706.172920] hwmon hwmon1: Undervoltage detected!
[151796.892907] hwmon hwmon1: Undervoltage detected!
[152548.860868] hwmon hwmon1: Undervoltage detected!
[152875.452877] hwmon hwmon1: Undervoltage detected!
[153415.740852] hwmon hwmon1: Undervoltage detected!
[171221.055216] hwmon hwmon1: Undervoltage detected!
[261207.228552] hwmon hwmon1: Undervoltage detected!
[261271.068361] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261271.068450] xhci_hcd 0000:01:00.0: @00000005013e30f0 00000000 00000000 05000000 02088001
[261301.264146] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261301.264229] xhci_hcd 0000:01:00.0: @00000005013e3350 00000000 00000000 05000000 02088001
[261301.264568] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261301.264628] xhci_hcd 0000:01:00.0: @00000005013e3390 00000000 00000000 05000000 02088001
[261301.264961] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261301.265019] xhci_hcd 0000:01:00.0: @00000005013e33d0 00000000 00000000 05000000 02088001
[261301.265350] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261301.265407] xhci_hcd 0000:01:00.0: @00000005013e3410 00000000 00000000 05000000 02088001
[261301.265737] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261301.265794] xhci_hcd 0000:01:00.0: @00000005013e3450 00000000 00000000 05000000 02088001
[261301.266125] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261301.266184] xhci_hcd 0000:01:00.0: @00000005013e3490 00000000 00000000 05000000 02088001
[261301.266512] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261301.266569] xhci_hcd 0000:01:00.0: @00000005013e34d0 00000000 00000000 05000000 02088001
[261301.793613] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261301.793703] xhci_hcd 0000:01:00.0: @00000005013e37f0 00000000 00000000 05000000 02088001
[261331.972239] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261331.972321] xhci_hcd 0000:01:00.0: @00000005013e3a10 00000000 00000000 05000000 02088001
[261331.972661] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261331.972726] xhci_hcd 0000:01:00.0: @00000005013e3a50 00000000 00000000 05000000 02088001
[261331.973064] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261331.973125] xhci_hcd 0000:01:00.0: @00000005013e3a90 00000000 00000000 05000000 02088001
[261331.973457] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261331.973516] xhci_hcd 0000:01:00.0: @00000005013e3ad0 00000000 00000000 05000000 02088001
[261331.973849] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261331.973908] xhci_hcd 0000:01:00.0: @00000005013e3b10 00000000 00000000 05000000 02088001
[261331.974236] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261331.974297] xhci_hcd 0000:01:00.0: @00000005013e3b50 00000000 00000000 05000000 02088001
[261331.974623] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[261331.974682] xhci_hcd 0000:01:00.0: @00000005013e3b90 00000000 00000000 05000000 02088001
[262755.445781] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[262755.445871] xhci_hcd 0000:01:00.0: @00000005013defb0 00000000 00000000 05000000 02088000
[262786.046207] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[262786.046288] xhci_hcd 0000:01:00.0: @00000005013df0b0 00000000 00000000 05000000 02088000
[262786.046639] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[262786.046701] xhci_hcd 0000:01:00.0: @00000005013df0f0 00000000 00000000 05000000 02088000
[262786.047044] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[262786.047104] xhci_hcd 0000:01:00.0: @00000005013df130 00000000 00000000 05000000 02088000
[262786.579286] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[262786.579370] xhci_hcd 0000:01:00.0: @00000005013df380 00000000 00000000 05000000 02088000
[262817.295296] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[262817.295385] xhci_hcd 0000:01:00.0: @00000005013df750 00000000 00000000 05000000 02088000
[262878.709428] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[262878.709514] xhci_hcd 0000:01:00.0: @00000005013dfee0 00000000 00000000 05000000 02088000
[262909.083939] sd 0:0:0:0: [sda] tag#8 timing out command, waited 180s
[262909.085681] I/O error, dev sda, sector 806840 op 0x1:(WRITE) flags 0x4800 phys_seg 128 prio class 2
[262909.087315] Buffer I/O error on dev sda2, logical block 67831, lost sync page write
[262909.088969] Buffer I/O error on dev sda2, logical block 67832, lost sync page write
[262909.090579] Buffer I/O error on dev sda2, logical block 67833, lost sync page write
[262909.092172] Buffer I/O error on dev sda2, logical block 67834, lost sync page write
[262909.093767] Buffer I/O error on dev sda2, logical block 67835, lost sync page write
[262909.095329] Buffer I/O error on dev sda2, logical block 67836, lost sync page write
[262909.097139] sd 0:0:0:0: [sda] tag#9 timing out command, waited 180s
[262909.098750] I/O error, dev sda, sector 809912 op 0x1:(WRITE) flags 0x800 phys_seg 11 prio class 2
[262909.100458] sd 0:0:0:0: [sda] tag#10 timing out command, waited 180s
[262909.100468] EXT4-fs error (device sda2): ext4_check_bdev_write_error:218: comm rm: Error while async write back metadata
[262909.103703] Aborting journal on device sda2-8.
[262909.104903] I/O error, dev sda, sector 808888 op 0x1:(WRITE) flags 0x4800 phys_seg 128 prio class 2
[262909.106345] sd 0:0:0:0: [sda] tag#11 timing out command, waited 180s
[262909.107594] I/O error, dev sda, sector 807864 op 0x1:(WRITE) flags 0x4800 phys_seg 128 prio class 2
[262909.455282] EXT4-fs (sda2): Remounting filesystem read-only
[262909.457106] EXT4-fs error (device sda2) in ext4_orphan_add:188: Journal has aborted
[262909.459503] EXT4-fs error (device sda2) in ext4_reserve_inode_write:5839: Journal has aborted
[262909.461827] EXT4-fs error (device sda2): __ext4_unlink:3269: inode #4070387: comm rm: mark_inode_dirty error
[263057.916518] hwmon hwmon1: Undervoltage detected!

and:

vcgencmd get_throttled

:

throttled=0x50000

Seeing the many “hwmon hwmon1: Undervoltage detected!” and the fact that vcgencmd get_throttled reports that under-voltage and throttling has occurred makes me think I should try another power supply. It’s a bit odd since it’s rated to power the PI correctly and it’s the same one I have been using since I bought the PI 1 year ago.

I will try with a different power supply and hopefully this issue will be no more.

1 thing that does concern me a little bit is the first error lines:

[130093.024919] usb usb2-port1: connect-debounce failed
[130106.649177] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?

Do they mean anything? I doubt the USB cable is actually bad since it’s brand new (came with the enclosure) and also the locking has occurred with both enclosures (the second one uses a different cable). Can this be shrugged off as caused by undervoltage and throttling? Or there might be something wrong with the port/usb controller?

Any suggestions on how to proceed? For now I have shut down the PI

The USB drive is still using an own enclosure with own PSU? And you still get Undervoltage detected messages? In this case indeed check RPI PSU/cable.

This might be a side effect of the undervoltage issue

Yes this happened with the enclosure that supplies power externally!

I will get a new psu for the PI today. Do you have a suggestion on how to proceed on the next boot? Should i boot from the SD and do some checks (and possibly repairs) on the SSD after the recent crash?

Still am a bit confused about fsck and it’s various options. Thanks :slight_smile:

Yes that would be an option. Best is to keep the SSD only connected and not mounted.

This is hopefully my last comment on this issue!

I bought an official PSU and it still had the same error!
At this point I figured the only thing that could still be interfering is the case for some reason, since it’s the only thing between a brand new and official PSU and my PI. I plugged the PSU directly to the usb C port of the PI, instead of the case (which was supplying the PI power through the gpio pins) and so far so good. (I suppose it could be an issue with the gpio pins but who knows)

Thanks so much to everyone who helped me with this! I really appreciate it

I thought everything was okay until I had to reboot the system (for unrelated reason) and since then I wasn’t able to ssh in (even attempting to reboot again).
kex_exchange_identification: read: Connection reset by peer

I plugged an hdmi to investigate and this happens:

I really thought that was it since before the switch plugging the PSU directly, I was stuck at not even being able to install dietpi. Since then, I was able to use the system for a while including rebooting just fine and this happened “out of the blue”.

still issues and I/O errors with you USB device. Was that a fresh install?

Yes! In fact it happened with 2 fresh installs (using the psu directly), first one I thought maybe I did something wrong by cutting the power or something so I figured I would try again. Second time I rebooted the system using the reboot command and it just wouldn’t boot past. Showing the error above.

For the record, it did happen with after putting the PI in a new case (Amazon.com: Akasa Gem Pro, Pure Aluminum Raspberry Pi 4 Case, Heavy Duty Pi 4 Heatsink, Ultra Quiet Passive Cooling Raspberry Pi Housing, Supports Raspberry Pi 4 Model B, Silver, A-RA09-M2S : Everything Else). But this case doesn’t do any passthrough of anything, all cables are directly connected to the PI, it’s just a shell.

Someone left this review on the case:

At this point I began testing emulators and noticed random crashes. At this point I started investing by reseting pi back to stock clock and had the same issue, at this point I started to suspect the case, to verify this I took the pi out of the case and ran it again this time no issues at stock clock speeds. From what I can gather part of the metal from either the power or mini HDMI cable is touching the metal on the case because of the connection not seating properly due to the cutouts on the case this in turn is causing the board to short out at times. I’m not for curtain that’s what happening but I do know it is the case. So I returned the case to prevent any damage to the pi or my TV. I wanted to really keep the case as the cooling is great but I don’t want to take the risk. I purchased the ArgonOne case the temps look good for stock and overclock speeds. My advice would be to stay away from this case for now until they enlarge the ports so that the cables will connect better.

But it seems a bit too coincidental, like I just solved my issue to then run into the same issue but caused by a different reason? I am confused on how to proceed honestly.

Tried another fresh install, after a bit of tinkering I was getting the following errors (system didn’t lock/crash though) dmesg -l 0,1,2,3:

[    0.831919] mmc1: Controller never released inhibit bit(s).
[ 3243.575622] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3243.575718] xhci_hcd 0000:01:00.0: @00000005013ea270 00000000 00000000 05000000 02088001
[ 3273.726316] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.726396] xhci_hcd 0000:01:00.0: @00000005013ea2b0 00000000 00000000 05000000 02088001
[ 3273.760261] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.760337] xhci_hcd 0000:01:00.0: @00000005013ea860 00000000 00000000 05000000 02088001
[ 3273.760673] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.760734] xhci_hcd 0000:01:00.0: @00000005013ea8a0 00000000 00000000 05000000 02088001
[ 3273.761063] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.761121] xhci_hcd 0000:01:00.0: @00000005013ea8e0 00000000 00000000 05000000 02088001
[ 3273.761453] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.761513] xhci_hcd 0000:01:00.0: @00000005013ea920 00000000 00000000 05000000 02088001
[ 3273.761841] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.761901] xhci_hcd 0000:01:00.0: @00000005013ea960 00000000 00000000 05000000 02088001
[ 3273.762236] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.762295] xhci_hcd 0000:01:00.0: @00000005013ea9a0 00000000 00000000 05000000 02088001
[ 3273.762628] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.762686] xhci_hcd 0000:01:00.0: @00000005013ea9e0 00000000 00000000 05000000 02088001
[ 3273.763020] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.763078] xhci_hcd 0000:01:00.0: @00000005013eaa20 00000000 00000000 05000000 02088001
[ 3273.763410] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.763468] xhci_hcd 0000:01:00.0: @00000005013eaa60 00000000 00000000 05000000 02088001
[ 3273.763801] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.763858] xhci_hcd 0000:01:00.0: @00000005013eaaa0 00000000 00000000 05000000 02088001
[ 3273.764192] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.764250] xhci_hcd 0000:01:00.0: @00000005013eaae0 00000000 00000000 05000000 02088001
[ 3273.764580] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.764636] xhci_hcd 0000:01:00.0: @00000005013eab20 00000000 00000000 05000000 02088001
[ 3273.764967] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.765023] xhci_hcd 0000:01:00.0: @00000005013eab60 00000000 00000000 05000000 02088001
[ 3273.765357] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.765414] xhci_hcd 0000:01:00.0: @00000005013eaba0 00000000 00000000 05000000 02088001
[ 3273.765741] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.765799] xhci_hcd 0000:01:00.0: @00000005013eabe0 00000000 00000000 05000000 02088001
[ 3273.766125] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.766182] xhci_hcd 0000:01:00.0: @00000005013eac20 00000000 00000000 05000000 02088001
[ 3273.766507] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.766564] xhci_hcd 0000:01:00.0: @00000005013eac60 00000000 00000000 05000000 02088001
[ 3273.766903] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.766960] xhci_hcd 0000:01:00.0: @00000005013eaca0 00000000 00000000 05000000 02088001
[ 3273.767292] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.767350] xhci_hcd 0000:01:00.0: @00000005013eace0 00000000 00000000 05000000 02088001
[ 3273.767677] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.767736] xhci_hcd 0000:01:00.0: @00000005013ead20 00000000 00000000 05000000 02088001
[ 3273.768066] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.769835] xhci_hcd 0000:01:00.0: @00000005013ead60 00000000 00000000 05000000 02088001
[ 3273.771848] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.773594] xhci_hcd 0000:01:00.0: @00000005013eada0 00000000 00000000 05000000 02088001
[ 3273.775627] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.777406] xhci_hcd 0000:01:00.0: @00000005013eade0 00000000 00000000 05000000 02088001
[ 3273.779441] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.781199] xhci_hcd 0000:01:00.0: @00000005013eae20 00000000 00000000 05000000 02088001
[ 3273.783241] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.785009] xhci_hcd 0000:01:00.0: @00000005013eae60 00000000 00000000 05000000 02088001
[ 3273.787040] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.788818] xhci_hcd 0000:01:00.0: @00000005013eaea0 00000000 00000000 05000000 02088001
[ 3273.790862] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[ 3273.792638] xhci_hcd 0000:01:00.0: @00000005013eaee0 00000000 00000000 05000000 02088001

how is the external disk powered?

I haven’t stopped using the SSD enclosure that supplies power externally

For testing, you could crosscheck using plain Raspberry Pi OS.

OK, I believe this time it is it. Been up for a week. It was the USB port. It probably was a combination of that, the underpowered SSD at the start, and maybe the PI PSU itself even that made it hard to figure out the cause.

Why the USB port is not working, I don’t know. If anyone knows of a fix it would be nice since the PI only has 2 usb 3 ports and I am using 2 external drives. But it’s not high priority for me at the moment.

Thanks again for all of the help

ensure using external PSU for your drives and don’t power them via RPi USB ports alone.

I encountered roughly the same problem: moving DIetPi on my RPi4b from SDCard to external USB enclosure. I downloaded the latest RPi 4 image, wrote the image to the USB device (I am on LinuxMint, and I used “Make Bootable USB stick” option from the file explorer: this turned out to be a mistake). Unmounted the USB device, plugged into the RPi, and rebooted without the SDCard.

Ensure your USB enclosure has own PSU

This is incorrect procedure. Simply flash the DietPi image to your drive. Can be done using dd command on Linux.