[TriLUG] trouble mounting a USB drive

Smith, Brett bsmith at bloodhoundinc.com
Wed Apr 14 13:54:32 EDT 2004


What filesystem is it?
NTFS is not normally supported without compiling the driver in
vfat is sketchy sometimes about accessing the FAT table when created on a
W2K box...
sometimes you need to reformat the drive...

mkfs.msdos /dev/sda1

another thing is that Sometimes you can use auto in the fstab IF the
filesystem is supported.

Here is a write-up I did on this a while ago for usb keys...

## USB Key installation Instructions for RedHat 
## Beta Version 0.9
## Written by Brett Smith
## Use at own risk


You have a user id (UID) and a group id (GID) for your user in redhat these
can be found in the user manager Under System Settings Users and Groups.
or from cmdline run this
[bsmith at localhost bsmith]$ cat /etc/passwd | grep bsmith

bsmith:x:500:500::/home/bsmith:/bin/bash

Your UID is 500 
Your GID is 500

Find out what device your keychain is by plugging it in and running this.

[root at localhost bsmith]# su -
Password:

[root at localhost bsmith]# /sbin/fdisk -l
 
Disk /dev/hda: 20.4 GB, 20416757760 bytes
255 heads, 63 sectors/track, 2482 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      2417  19414521   83  Linux
/dev/hda2          2418      2482    522112+  82  Linux swap

[root at localhost bsmith]$ df -h 
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              19G  9.3G  8.1G  54% /
none                  125M     0  125M   0% /dev/shm

obviously the usb key is going to be /dev/sda and the file system will be
/dev/sda1.
If you have other scsi devices the usbkey will be the last device.
(/dev/sdc)
now make a directory for it

[root at localhost bsmith]#mkdir /mnt/usbkey

make sure the device is mountable so try this (/dev/sda1 is the file system
and it is what needs to be mounted) 

[root at localhost bsmith]# mount /dev/sda1 /mnt/usbkey

if it mounts than we can proceed...if it does not than try the next scsi
disk

Now we create the fstab line that includes the UID and GID

add this line to your fstab:::: and try it

/dev/sda1		/mnt/usbkey		auto
user,noauto,uid=500,gid=500	0 0


You should be able to mount and write to the device now without su 

-----Original Message-----
From: Joseph Tate [mailto:jtate at dragonstrider.com]
Sent: Wednesday, April 14, 2004 1:45 PM
To: Triangle Linux Users Group discussion list
Subject: Re: [TriLUG] trouble mounting a USB drive


Ryan Leathers wrote:

> I have a spankin' new hard drive and external USB 2.0 enclosure.
> I'm not smart enough to get the thing to mount.
> 
> I can "see" the device and fdisk it, but when I try to 
> mount /dev/sda1 /mnt/usb it complains thusly:
> mount: you must specify the filesystem type
> 
> So I added this to my /etc/fstab
> /dev/sda1  /mnt/usb  ext3  defaults 0 0
> but still get the error
> 

Silly question.  Did you run mke2fs on it?
-- 
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

This email message is for the sole use of the intended recipients(s) and may contain confidential and privileged information of Bloodhound Software, Inc.. Any unauthorized review, use, disclosure is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.



More information about the TriLUG mailing list