-1

My raspberry pi zero ran out of space on its microSD card and somehow corrupted part of the filesystem, as it doesn't boot properly. When I insert the microSD card into another computer, I can look at the /etc/fstab file and it looks like this:

PARTUUID=d271c287-01  /boot           vfat    defaults          0       2
PARTUUID=d271c287-02  /               ext4    defaults,noatime  0       1
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@

(Yes, the weird sequence at the bottom is not a mistake - it's what the file looks like). I'm imagining that maybe I can just delete this line and everything will work as normal? I was also thinking that this could maybe due to an odd interpretation of a slightly different charset by my computer, as I've never seen this kind of pattern before.

lriley
  • 11
  • 4
  • Unless you had changed it there are other things missing. Once your FS is corrupt patching files, particularly if disk full, is only going to make things worse. What does df -h show. Restore from your backup. – Milliways Dec 31 '21 at 23:48

2 Answers2

1

It may be that your SD card is having issues - they are subject to wear-out, and the cheaper ones die younger than (for example) SD cards made by SanDisk.

You should edit /etc/fstab to remove the bogus entry, but keep an eye out for other strange behavior. You should also consider making a backup of your system so that you can recover your system if it fails catastrophically. Here's one way to do that using image-backup

Seamus
  • 21,900
  • 3
  • 33
  • 70
0

I'd be tempted to manually remove the spurious line from /etc/fstab, mount the microSD card on a Linux box (or PC running a live Linux distro), and check the filesystem of each partition with fsck before attempting to boot from it again