[Linux-disciples] Mounting a USB hard drive

Adam Kessel adam at rosi-kessel.org
Sat Mar 20 14:30:53 EST 2004


I'll start by assuming you're using a stock kernel with all the necessary
modules built. You'll need at least usb-storage, probably some of the
SCSI stuff, etc..

You should have at least 2.4.24, and you might even have better results
with 2.6.4.

The first thing to do is plug it in, turn it on, and see if anything pops
up at the end of dmesg.  This should give you some clues about how it
might be mounted.  Typically these things appear as /dev/sda or
/dev/sda1.

If it's never been partitioned before, you can't mount it.  mount mounts
partitions.  No partitions, no mount.

If you see which device it is in dmesg, try cfdisk /dev/sda (or whatever
it is).  You could of course partition it as a Windows drive and make a
FAT32 filesystem or whatever you ant.

In terms of permissions: only root has the ability to mount arbitrary
drives.  If you want other users to be able to mount and unmount, you
need to put the info in fstab (man fstab) and have option 'user' set.
You can also specify in fstab what user a drive will be mounted as, if
it's not a filesystem that inherently has uids with files.  The fstab and
mount manpages should pretty much answer everything about that.

On Sat, Mar 20, 2004 at 12:38:20PM -0500, Stephen R Laniel wrote:
> My landlord has a 160-gig hard drive inside of an enclosure
> connected to a USB port. All of its space is as yet
> unpartitioned. When he runs fdisk on his Windows box, the
> unpartitioned drive connected to the USB port shows up, but
> it appears to have only 25 gigs available. We're trying to
> figure out where the problem lies -- enclosure, OS, BIOS,
> controllers, etc. -- so he asked me whether he could attach
> the drive and enclosure to my USB port on my Linux box.
> 
> Question (too much prologue, really): which device file will
> I mount to mount the drive? Does the drive have to be
> partitioned before I can mount it? Do I need to mount it
> before I run fdisk, or can I just 1) connect the drive to
> the USB port, then 2) run fdisk?
> 
> I have hotplug running, and thus far I've only ever accessed
> my digital camera through my USB port. It's very easy,
> though, and it seems to Just Work. The only part that
> doesn't Just Work is that only root seems able to access the
> device. I assume there's some easy fix for this, probably
> involving the permissions on some device file. I'm not sure
> which device file is involved here, though, so I don't know
> which permissions to change or which groups to add people
> to.
> 
> Thanks for any and all help.
> 
> Steve
> 
> -- 
> "I almost approached him the other day to see if he had any
>  ideas regarding the general solution for the relativistic
>  force-free equation describing the structure of the pulsar
>  magnetosphere, but he was busy smearing a plastic doll
>  with glue."
> -http://theonion.com/news/index.php?i=1&n=3
> 
> _______________________________________________
> Linux-disciples mailing list
> Linux-disciples at lists.bostoncoop.net
> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples

-- 
Adam Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20040320/346065ad/attachment-0001.pgp


More information about the Linux-disciples mailing list