-1

My RPI was running since a few years without any problem, but one day things are starting to get bad. It was running Raspbian from Noobs.

One day, Bash started to make error my completing (unsing the TAB key), and I was not able to create any file on the home. After some quick checks, it shows the partition is in read only mode. Looking a dmesg confirm this : some SD card error had forced the os to remount the partition in readonly.

So i reboot the Pi and things are going more bad : boot failed with error "unable to mount root fs on unkown-block(179,7)"

I use System Rescue CD on an other computer to explore the rPi SD card, it shows the following partition (from GParted) :

                       FS        name       Size 
/dev/mmcblk0           unallocated          4MB   
/dev/mmcblk0p1         fat32     RECOVERY   1.36GB   
/dev/mmcblk0p2         extended             13.47GB
    unallocated        unallocated          3.05MB
    /dev/mmcblk0p5     ext4      SETTINGS   32MB
    /dev/mmcblk0p6     fat16     boot       66MB
    unallocated        unallocated          2MB  
    /dev/mmcblk0p7/!\  ext4      root       13.37Gb

I was unable to mount /dev/mmcblk0p7 . GParted have a /!\ sign on the part name.

So I did a fsck on /dev/mmcblk0p7 : it fixes broken inode, recover from super block etc and I can mount this partition again. I dont know which files has been deleted by the fsck command.

After doing an fsck on all other partitions (no error found), I reinsert the SD card on the Pi, and now I have the following message : "not syncing : no working init found. Try passing init option to kernel. see Linux documentation for guidance".

Now i'm stuck, I dont know how can I recover from this error.

The cmdline.txt located in /dev/mmcblk0p6 (boot) contains :

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=readline fsck.repair=yes rootwait plymouth.enable=0

I dont know what is missing on the boot process. Also, I have access to the Noobs partition where a Raspbian folder contains boot.tar.xz and root.tar.xz but it is probably not a good idea to untar those files in the root partition.

I want to try to recover manually, and not formatting and reinstalling anything.

Any options ?

JayMore
  • 99
  • 1

1 Answers1

0

Firstly NOOBS is little used by experienced users, so you are unlikely to get much help on this Forum.

The error "unable to mount root fs on unknown-block(179,7)" is a common problem, indicating that the partition /dev/mmcblk0p7 is corrupted. It is likely the SD Card is worn out.

Anything you can do with the NOOBS menu will only overwrite your existing OS so I would suggest you do not do anything with these files.

The /dev/mmcblk0p6 and /dev/mmcblk0p7 are a more or less normal Raspbian, although you are obviously running some older version.

Unfortunately recovering from these kind of problems is challenging, even for an experienced Linux user, and most of us wouldn't bother - instead restoring from a backup.

I suggest you do a fresh installation (of Raspberry Pi OS) to a new SD Card.
You may then be able to recover your files from the old SD Card.

Milliways
  • 59,890
  • 31
  • 101
  • 209