Fresh install of RetroPie 4.8 won't boot due to timeouts
-
Pi Model: 4 B
Power Supply used: Official Raspberry Pi Power Supply
RetroPie Version Used: 4.8
Built From: Pre made SD Image on RetroPie website
USB Devices connected: Microsoft Sidewinder X4 Keyboard, NESPi 4 case
Controller used: none (yet)
Guide used: https://retropie.org.uk/docs/First-Installation/
Error messages received:[FAILED] Failed to start Load Kernel Modules.
[FAILED] Failed to start Configure Bluetooth Modems connected by UART.
[FAILED] Failed to start dhcpcd on all interfaces.
How to replicate the problem:
I initially tried to update my dated version of RetroPie trough the retropie_setup.sh
script. That update didn't go well and resulted in similar errors. After I gave up trying to find out what the cause was, I did the following:- Formatted my SD card with SD Card Formatter (no quick format)
- Used 'Raspberry Pi Imager v1.7.2' to install 'RetroPie 4.8 (RPI 4/400)'
- Put SD card back into Pi and turn it on
- The initial boot of the Pi already ends in emergency mode with above errors
Here are more details regarding the error messages, I was in a hurry and only took a photo with my phone so I apologize for not pasting the actual text here:
I am grateful for any advice on how to proceed!
-
This looks like an issue with the card or the writing of the image file. Is the system working fine if you write another image - for instance the official Raspberry Pi OS from https://www.raspberrypi.com/software/ ?
-
I just tried your suggestion: The first boot of Pi OS already complains with "Failed to write wtmp record, ignoring: Read-only file system". After reboot the welcome screen is shown forever with "systemd.sysctl.service" in the corner, then it ends up in emergency mode as well.
So it seems the SD card is the problem, I'll try with a new card and report back whether it worked.
-
Just tried with a brand new SD card (SanDisk Extreme 64GB) directly out of the package.
As before, I installed RetroPie 4.8 via the Pi Imager. At first boot a disk check is timing out and again I am ending up in emergency mode:
A start job is running for /dev/disk/by-partuuid/7f2cbd05-01 ... [TIME] Timed out waiting for device /dev/disk/by-partuuid/7f2cbd05-01 [DEPEND] Dependency failed for File System Check ... [DEPEND] Dependency failed for /boot. [DEPEND] Dependency failed for Local File Systems.
From there I first increased the device timeout in /etc/fstab (x-systemd.device-timeout) for the partition, hoping that the check can run through next time.
I then also updated:
sudo systemctl daemon-reload sudo dhclient eth0 sudo ifconfig eth0 up sudo apt update sudo apt full-upgrade sudo systemctl reboot
Everything above works, then after reboot the check of the boot partition runs through successfully. But then I get the exact same errors / timeouts as in my initial post ...
I can't imagine that the RetroPie image isn't written successfully to the card as the Pi Imager's verify step completes without error.
-
Can you run a
dmesg
after an unsuccessful boot and save the output on the/boot
partition, then post it on pastebin.com ? You can rundmesg > /boot/dmesg.txt
and you'll can get the file from your PC. -
Actually, when I try to run
sudo dmesg > /boot/dmesg.txt
I just get the outputPermission denied
, is that normal?Anyway, I just put the file on the other partition, here it is:
https://pastebin.com/rNPWYJ8WIn line 232 it says:
[ 1.642532] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
And then in line 236:
[ 1.660679] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
Is the boot partition supposed to be mounted read-only?
Maybe that is the cause of my problems?Also, what I forgot to mention in my initial post: The Pi is inside a NESPi 4 case (which never caused any problems so far).
I have edited the initial post to include that information. -
The issue seems to be the communication with the USB disk (which you didn't mention about):
... [ 9.075648] sd 0:0:0:0: [sda] Unit Not Ready [ 9.075671] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] [ 9.075692] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 [ 39.394795] random: crng init done [ 39.394808] random: 7 urandom warning(s) missed due to ratelimiting [ 189.085669] sd 0:0:0:0: tag#0 timing out command, waited 180s [ 243.674499] INFO: task systemd-modules:131 blocked for more than 122 seconds. [ 243.674519] Tainted: G C 5.10.103-v7l+ #1529 [ 243.674535] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.674552] task:systemd-modules state:D stack: 0 pid: 131 ppid: 1 flags:0x00000001 [ 243.674586] Backtrace: [ 243.674633] [<c0b91740>] (__schedule) from [<c0b92118>] (schedule+0x68/0xe4) [ 243.674657] r10:c1205048 r9:c120f480 r8:c1356018 r7:c1205048 r6:00000000 r5:c2fc3e00 ... later on... [ 549.145730] sd 0:0:0:0: tag#0 timing out command, waited 180s [ 549.145797] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x00 driverbyte=0x08 [ 549.145819] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] [ 549.145840] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 [ 549.145867] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B) [ 549.145885] sd 0:0:0:0: [sda] 0-byte physical blocks [ 729.165631] sd 0:0:0:0: tag#0 timing out command, waited 180s [ 729.165699] sd 0:0:0:0: [sda] Test WP failed, assume Write Enabled [ 909.195633] sd 0:0:0:0: tag#0 timing out command, waited 180s [ 909.195853] sd 0:0:0:0: [sda] Asking for cache data failed [ 909.195875] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 909.250741] sd 0:0:0:0: [sda] Unit Not Ready [ 909.250767] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] [ 909.250788] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 [ 1089.265664] sd 0:0:0:0: tag#0 timing out command, waited 180s [ 1269.305667] sd 0:0:0:0: tag#0 timing out command, waited 180s [ 1449.345672] sd 0:0:0:0: tag#0 timing out command, waited 180s [ 1449.345743] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x00 driverbyte=0x08 [ 1449.345766] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] [ 1449.345786] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 [ 1629.355676] sd 0:0:0:0: tag#0 timing out command, waited 180s ...
Do you have an USB disc attached ? Looks like the communication with it fails - either the disc/USB port is faulty or the case's USB/Sata controller has issues (perhaps subject to the problems described in https://forums.raspberrypi.com/viewtopic.php?t=245931 ?).
-
No, there is no USB disk attached. The only device connected to the Pi is the NESPi 4 case, which I have set up as described in the manual (without SSD though):
https://retroflag.com/download/NESPi_4_CASE_Manual.pdfThe keyboard is connected to the single exposed USB 3.0 port of the case and that's it.
-
@mfretro Try removing the Pi from the case and see if you get the same timeouts. If not, then the issue may be caused by the case's USB hub/controller.
-
I just tried to boot with just the lid of the NESPi case removed, where the SATA-to-USB adapter is located, which was of course plugged into one of the Pi's USB 3.0 ports.
Now it boots without problems!
Since these problems started after I performed an update of RetroPie, I suspect an EEPROM update of the Pi made the SATA-to-USB adapter incompatible. I never would have suspected the case lid as it has worked without problems in the past.
At least we finally found the problem. I'll now try to fix this by updating the firmware of the adapter in the case lid and report back whether it worked.
Thanks for your help, mitu! :-)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.