5

Upon rebooting using shutdown -rF now of my Raspberry Pi 3, I am presented with emergency mode, however, I am unable to run fsck -fy on the root partition.

I am presented with the following error:

[FAILED] Failed to start File System Check on Root Device.

Thus, I try to run fsck -fy after logging into maintenance mode, I get the following error:

...snip...
/dev/mmcblk0p2 is mounted.
e2fsck: Cannot continue, aborting.

So, I attempt to unmount the partition using umount -f /dev/mmcblk0p2, but I get the following error:

umount: /: target is busy

How do I fix this?

CC BY-SA 3.0
3

2 Answers 2

Reset to default
11

I was able to fix the issue using these steps:

  1. Modify: /etc/fstab

    #/dev/mmcblk0p2  / ext4 errors=remount-ro 0 1
    /dev/mmcblk0p2  /  ext4 ro 0 1
    

    This should mount the rootfs as read-only on the next reboot.

  2. Reboot system using: shutdown -rF now
  3. Run fsck -fy if the system hasn't already
  4. Remount the rootfs as read-write using:

    mount -o remount,rw /dev/mmcblk0p2
    

    We need to do this in-order to complete step 4.

  5. (IMPORTANT) Change /etc/fstab back to normal, thus:

    /dev/mmcblk0p2  / ext4 errors=remount-ro 0 1
    #/dev/mmcblk0p2  /  ext4 ro 0 1
    

    If /etc/fstab doesn't get changed back to normal, then the system will always mount the rootfs as read-only.

  6. Profit.
CC BY-SA 3.0
1
0

Additionally, you can fix the problem if you own a copy of Linux File System for Windows, by using the following steps:

  1. Insert Micro-SD card into a Micro-SD card reader and insert it into your PC.

  2. Open Linux File System for Windows and umount the SD card.

  3. Select the volume and click verify. This will run fsck -fy on the volume and fix any errors present.

  4. Eject Micro-SD card safely and insert it into the Raspberry Pi.

  5. Profit.

CC BY-SA 3.0

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

    Not the answer you're looking for? Browse other questions taggedor ask your own question.