Results 1 to 4 of 4

Thread: How do I fsck an external USB drive?

  1. #1
    Join Date
    May 2009
    Beans
    67
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Question How do I fsck an external USB drive?

    My external ext3 USB drive was mounted while my system crashed while I was messing around with a LiveCD. (Copying large files into your live user's home folder while booted from a LiveCD is a bad idea by the way. ).

    Anyway, how can I run a filesystem check on the disk? I tried "sudo tune2fs -c 1 /dev/sdc1" on the USB drive and mounted and unmounted it with no success. Also, am I supposed to use e2fsck or fsck and do I need to boot into single user mode? The dire warnings of possible file system corruption make me rather nervous.

    I did read https://help.ubuntu.com/community/Sy...istration/Fsck but it seems rather incomplete and it doesn't mention external drives.

    Edit: I did some digging around, and it looks like maybe I want to use fsck.ext3. However, should I use "fsck.ext3 /dev/sdb1" or "fsck.ext3 /dev/sdb"? Also does the warning about being in single user mode only apply to doing a fsck on your root filesystem?
    Last edited by learningcurb; June 28th, 2009 at 01:56 AM.

  2. #2
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu 17.10 Artful Aardvark

    Re: How do I fsck an external USB drive?

    Never run fsck on a mounted partition.

    Can you post the output of this command (run with your USB drive on):
    Code:
    sudo fdisk -l

  3. #3
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How do I fsck an external USB drive?

    Quote Originally Posted by learningcurb View Post
    My external ext3 USB drive was mounted while my system crashed while I was messing around with a LiveCD. (Copying large files into your live user's home folder while booted from a LiveCD is a bad idea by the way. ).

    Anyway, how can I run a filesystem check on the disk? I tried "sudo tune2fs -c 1 /dev/sdc1" on the USB drive and mounted and unmounted it with no success. Also, am I supposed to use e2fsck or fsck and do I need to boot into single user mode? The dire warnings of possible file system corruption make me rather nervous.

    I did read https://help.ubuntu.com/community/Sy...istration/Fsck but it seems rather incomplete and it doesn't mention external drives.

    Edit: I did some digging around, and it looks like maybe I want to use fsck.ext3. However, should I use "fsck.ext3 /dev/sdb1" or "fsck.ext3 /dev/sdb"? Also does the warning about being in single user mode only apply to doing a fsck on your root filesystem?
    For the command, use fsck. That works for every file system, as it detects what type the file system is and then calls the appropriate tool to do the actual checking.

    And for the main question, unmount the drive, and then, assuming it's still /dev/sdb1 simply run following command:
    Code:
    sudo fsck /dev/sdb1
    (and yes, the checking is doen for a partition, not for a drive, so you always check something like /dev/sda1, never /dev/sda)

  4. #4
    Join Date
    Feb 2005
    Beans
    33

    Re: How do I fsck an external USB drive?

    try gparted - it runs dosfsck -a -w -v

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •