0

i am using ubuntu to try and repair a damaged sdhc card. the card has two partitions and i want to fix the ext4 partition:

ubuntu@ubuntu:/dev$ mount | grep /media
/dev/sdb1 on /media/1AF7-904A type vfat (rw,nosuid,nodev,uid=999,gid=999,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)
/dev/sdb2 on /media/8fe3c9ad-c8f5-4b39-aec2-f6e8dba743e0 type ext4 (rw,nosuid,nodev,uhelper=udisks)
ubuntu@ubuntu:/dev$ df -h | grep /media
/dev/sdb1        56M   34M   23M  61% /media/1AF7-904A
/dev/sdb2        30G  2.1G   26G   8% /media/8fe3c9ad-c8f5-4b39-aec2-f6e8dba743e0

i think fsck is the way to do this. but i cannot do an fsck while the partition is mounted, so i unmount the ext4 partition, but then i cannot find the partition to run the fsck against! how can i run the fsck?

ubuntu@ubuntu:/dev$ umount /media/8fe3c9ad-c8f5-4b39-aec2-f6e8dba743e0 
ubuntu@ubuntu:/dev$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/cow            880M   89M  792M  11% /
udev            873M  4.0K  873M   1% /dev
tmpfs           352M  860K  351M   1% /run
/dev/sr0        696M  696M     0 100% /cdrom
/dev/loop0      667M  667M     0 100% /rofs
tmpfs           880M   52K  880M   1% /tmp
none            5.0M  4.0K  5.0M   1% /run/lock
none            880M   80K  880M   1% /run/shm
/dev/sdb1        56M   34M   23M  61% /media/1AF7-904A
2
  • 1
    You run fsck against the device representing the raw partition. This appears to be /dev/sdb2 from above.
    – chronitis
    Jun 4, 2013 at 12:54
  • @chronitis - Can you post that as an answer
    – Panther
    Jun 4, 2013 at 19:06

1 Answer 1

0

You run fsck against the device representing the raw partition. This appears to be /dev/sdb2 from above.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .