Page 1 of 1

Mounting USB Drive

Posted: Wed Nov 07, 2012 8:36 pm
by ascotguy
I have a 16gb HP USB drive I am trying to mount automatically.

I have been following this thread - http://www.raspberrypi.org/phpBB3/viewt ... 8&p=206459

I have the following line in /etc/fstab

/dev/sda1 /mnt/usbhd ext4 auto,user,rw,exe 0 3

But when I use "mount -a". I get;

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

Can anyone help with the next step? Many thanks

Re: Mounting USB Drive

Posted: Wed Nov 07, 2012 9:38 pm
by broo0ose
is it an ext4 filesystem? That's the linux default.

If the drive was formatted for Windows then it is probably NTFS, so the fstype should be ntfs.

Re: Mounting USB Drive

Posted: Thu Nov 08, 2012 8:42 am
by ascotguy
Thanks, I will try NTFS.

The only machine I have plugged the USB drive into is my PI but it may have been preformatted.

Is there any way to check the forward and if need be, any way to reformat to a different fs type?

Thanks,

Re: Mounting USB Drive

Posted: Thu Nov 08, 2012 1:59 pm
by tedhale
If it came pre-formatted, then it is probably FAT32 file system.
Windows could create an NTFS system, but I think it defaults to FAT32 for removable media to improve compatibility.

Try vfat as the file system type.

Re: Mounting USB Drive

Posted: Thu Nov 08, 2012 4:22 pm
by flyinghappy
Or if it is new and has nothing on it and will only be used with the Pi, just reformat it to ext4 and get yourself some good speeds. NTFS and FAT aren't very nice on Linux, they work, but ext4 works much better.

Re: Mounting USB Drive

Posted: Mon Nov 12, 2012 2:43 pm
by daviewales
Sometimes you don't have to specify the filesystem. Try the following, just to see what happens:

Code: Select all

mount /dev/sda1 /mnt/usbhd
Incidentally, have you created /mnt/usbhd yet?

Re: Mounting USB Drive

Posted: Mon Nov 12, 2012 9:07 pm
by ascotguy
Thanks for all your help. I now have it working - not really sure what I did.

I think the main thing was to format the usb drive as ntfs on my windows machine works.