0

I have been trying to format my 640GB external Hard Drive in command-line and can't seem to get it working.

I have done the following in order:

sudo fdisk /dev/sda

(Deleted any partitions, created a new partition, toggled partition type (tried multiple, but not sure the best?), then wrote the partition and printed to make sure it was correct.

I then created the ext4 filesystem using: sudo mkfs.ext4 /dev/sda1

I tried to mount the partition using: sudo mount -t ext4 /dev/sda1 /mnt/640-hdd -o gid=XXXX,uid=XXXX

I then was given a mount error:

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail  or so

Any recommendations?

FSTAB info:

/dev/sda1       /mnt/640-hdd    ext4    defaults,uid=bwhite94,gid=bwhite94      0       0
  • Try using gparted – dgsleeps Mar 26 '15 at 0:50
  • 2
    Were there any errors on the mkfs.ext4 command? Did you check dmesg as the error suggests? – jordanm Mar 26 '15 at 0:58
  • mkfs.ext4 does not give any errors. It was giving a "Unrecognized mount option 'gid=1004' or missing value" error while trying to mount, so I removed that and bingo.. that worked. Now when I reboot, it's not mounting automatically. I'll edit the main question with info from my fstab. – Brandon White Mar 26 '15 at 1:07
  • eliminate gid and uid and use mount -a then check dmesg. – PersianGulf Mar 26 '15 at 2:23
  • 1
    Ah! I see the issue. Thanks @MohsenPahlevanzadeh for the tip. I removed the uid and gid from the fstab file and it works at boot. Since I am running an ext4 filesystem, it's unnecessary to assign ownerships, as this filesystem does that appropriately, unlike vfat. – Brandon White Mar 26 '15 at 3:30

Your Answer

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

Browse other questions tagged or ask your own question.