0

I have latest Raspbian Lite burned on a SD card. When I dd the image into the card I can mount the boot and the rootfs partitions on my Ubuntu to access the files.

However as soon as I use this card in Raspberry, the rootfs partition is not usable anymore on my Ubuntu. I get:

Error mounting /dev/sdc2 at /media/user/rootfs1: Command-line
`mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdc2"
"/media/user/rootfs1"' exited with non-zero exit status 32:
mount: wrong fs type, bad option, bad superblock on /dev/sdc2,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

The dmesg | tail returns:

[84253.709246] JBD2: Error -5 detected when updating journal superblock for sdc2-8.
[84253.709268] EXT4-fs error (device sdc2): ext4_put_super:815: Couldn't clean up the journal
[84253.709271] EXT4-fs (sdc2): Remounting filesystem read-only
[84253.709273] EXT4-fs (sdc2): previous I/O error to superblock detected     
[84253.744695] VFS: Dirty inode writeback failed for block device sdc1 (err=-5).
[84559.327185] sd 14:0:0:0: [sdc] 30318591 512-byte logical blocks: (15.5 GB/14.5 GiB)
[84559.332709]  sdc: sdc1 sdc2 [84559.333060] sdc: p2 size 30220288 extends beyond EOD, truncated
[84559.755070] EXT4-fs (sdc2): bad geometry: block count 3777536 exceeds size of device (3777535 blocks)
[84571.039961] EXT4-fs (sdc2): bad geometry: block count 3777536 exceeds size of device (3777535 blocks)

How to overcome this to access the files from the rootfs partition? Mind that it works perfectly fine on Raspberry nonetheless, it just won't mount on my computer.

  • What "rootfs partition"? What has this to do with Raspberry Pi? – Milliways May 24 '18 at 12:24
  • Is rootfs in fact an ext4 partition? If I remember correctly, it might be exFAT. Try mounting it without specifying the file system. – Bex May 24 '18 at 12:54
  • "I can mount the boot and the rootfs partitions on my Ubuntu to access the files." or " it just won't mount on my computer." ?? Which is it? – Gerard H. Pille May 24 '18 at 13:40
0

I've got quite different device names for the sd-card partitions:

/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 errors=remount-ro,noatime,nodiratime,commit=120 0 1
  • That seems to be entries for /etc/fstab on Raspberry Pi. There was nothing said about this. We are on ubuntu with normal /dev/etcX – Ingo May 24 '18 at 18:31
0

EXT4FS errors. On your root partition.

Stop unplugging your PI without shutting down your OS first.

FS errors can often be repaired if you do

sudo touch /forcefsck

before you use the reboot command.

Then you WAIT for it to finish.

This command tells the PI to do a forced fsck (file system check) on the root partition before next boot. And it will attempt repairs if FS seems healthy enough for autorepairs to be relatively safe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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