2

Model: Raspberry Pi 3 B

SD: 8GB MicroSDHC

For the past couple of weeks I've been stuck with my Pi not working. I've followed numerous guides. I've downloaded Raspbian Stretch With Desktop OS from the official site, Written the image with both EtcherIO and Win32DiskImager to the SD card, Set the IP and ssh file in the SD card, and then connected to it with Putty, everything alright so far. Now on the Pi itself, no matter how many times I repeat this process it keeps telling me that the PI is Read-Only. I've tried using sudo, and even logging as Root, and it's still Read-Only. enter image description here enter image description here

I've found that raspi-config gives an error that there's nothing mounted, tried mounting with "mount /dev/mmcblk0p1 /boot", and then atleast I can access raspi-config but can still not edit anything with Nano. Looking through Google I also noticed that my /etc/fstab file is completely empty, and should be filled with something else. enter image description here

Is this a problem with the SD card, the Pi itself or am I doing something wrong that I haven't noticed at all, because I'm completely done with this right now, I cannnot figure out why I'm having this problem.

Sven0567
  • 121
  • 1
  • 1
  • 2

2 Answers2

5

Since it seems that your /etc/fstab is missing, you may want to fill it in with the necessary information. You'll need to manually mount the root and boot partitions first:

sudo mount -o remount,rw /dev/mmcblk0p1 /boot
sudo mount -o remount,rw /dev/mmcblk0p2 /

And then create a new /etc/fstab

sudo echo -e "proc            /proc           proc    defaults          0       0\n/dev/mmcblk0p1  /boot           vfat    defaults          0       2\n/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1" > /etc/fstab

And the to verify that the above command worked:

$cat /etc/fstab

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1

And then change the root partition in your cmdline.txt to /dev/mmcblk0p2 You can do this on your Windows machine, just like you did to add the IP.

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
RubberStamp
  • 1,449
  • 1
  • 12
  • 16
0

I solved this issue by re-formatting the SD card using disk utility for MacOS, and then re-mounting the OS image (raspbian in my case) to the drive. I made sure to use MS-DOS format and GUID partition map:

enter image description here

Alex
  • 97
  • 2