ascotguy
Posts: 3
Joined: Wed Nov 07, 2012 8:31 pm

Mounting USB Drive

Wed Nov 07, 2012 8:36 pm

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

broo0ose
Posts: 317
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Mounting USB Drive

Wed Nov 07, 2012 9:38 pm

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.

ascotguy
Posts: 3
Joined: Wed Nov 07, 2012 8:31 pm

Re: Mounting USB Drive

Thu Nov 08, 2012 8:42 am

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,

User avatar
tedhale
Posts: 114
Joined: Thu Sep 20, 2012 4:52 pm
Location: Williamsburg, VA, USA
Contact: Website

Re: Mounting USB Drive

Thu Nov 08, 2012 1:59 pm

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.
- Ted B. Hale
http://raspberrypihobbyist.blogspot.com

flyinghappy
Posts: 115
Joined: Mon Nov 05, 2012 5:31 pm

Re: Mounting USB Drive

Thu Nov 08, 2012 4:22 pm

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.
Pi with ArchLinux running a minidlna/samba home server

daviewales
Posts: 19
Joined: Wed Apr 25, 2012 12:22 am

Re: Mounting USB Drive

Mon Nov 12, 2012 2:43 pm

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?

ascotguy
Posts: 3
Joined: Wed Nov 07, 2012 8:31 pm

Re: Mounting USB Drive

Mon Nov 12, 2012 9:07 pm

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.

Return to “Beginners”