I messed up FSTAB and I cannot boot up my Pi 3B+

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

I messed up FSTAB and I cannot boot up my Pi 3B+

Post by /RaspberryPi »

A few days ago I was working on a project which involved my pi regularly backing up a file to a USB drive. I came across a tutorial on how to mount a usb drive automatically at boot and it involved adding a line to the end of FSTAB. Something went wrong with this and when I rebooted my pi, I could no longer SSH to it. I then plugged it into a monitor and got a "Cannot open access to console, root account is locked error". So I googled it and came across an article telling me to add init=/bin/sh to the end of the cmdline.txt on the SD card. It caused a kernel panic. I even changed it to say /bin/bash and the console froze at "random: crng init done".
I then tried getting the SD Card out of the pi and plugged it into my windows 11 machine, I installed Ext2fsd but it tells me "EXT2FSD COULD NOT BE STARTED".
I then got an older raspberry pi and tried to mount the SD card on it but then got an error saying "bad superblock on /dev/sda2".
I really am stuck for what to do now, all I need to do to fix this is to gain access to the fstab file and remove a line, but I can't figure out how to access that and fix my pi.

submitted by /u/20captainx12
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”