PDA

View Full Version : Mounting external USB drive



gx240
03-13-2007, 12:59 AM
I'm attempting to mount an external USB drive, but I'm not entirely sure how to do it. I've seen posts showing examples like,
mount -t ntfs /dev/hda1 /mnt/windows
but in my case /dev/hda1 is an internal hard drive. How do you know which /dev is which device? Is there a special way to mount a USB device, or do they appear as normal hard drives?

Harry Kuhman
03-13-2007, 01:30 AM
The different letters signify different types of drives/interfaces: hda1 is the first partition (1) on the first drive (a) on the IDE interface (hd). hdb2 would be a second partition on a second hard disk on the ide interface. The partition on your flash drive is likely sda1, although some people have reported other designations.

Insert the drive before booting Knoppix. Do you see an icon for it on the desktop? There generally is and you can open the partition by clicking on the icon. This open will default to read only. For read/write access see the info in answer #6 (http://www.knoppix.net/wiki/User:Harry_Kuhman).

gx240
03-13-2007, 01:43 AM
Insert the drive before booting Knoppix. Do you see an icon for it on the desktop?

Unfortunately, it doesn't seem to mount automatically, which is why im trying to figure out how to do it manually. I can see quite a few devices that start with "sd". sd[a-h][1-15] I tried mounting /dev/sda1, but it said "/dev/sda1 is not a valid block device." I tried /dev/sda and a few others as well, but they all say the same thing. You mentioned that it's different for some people. Any idea what else it might be?

Harry Kuhman
03-13-2007, 03:16 AM
Sorry, it's always sda1 for me, I've seen others give other designations but I don't recall what they were. I think I remember a "U" binging in at least one, but that isn't of much help. By the way, you certainly want something with a number in it, for example hda1 is the first partition on the IDE hard drive, but hda is the entire hard drive, not something that you would mount.

I'm hoping that my response may encourage someone else who knows the answer to join in the conversation.

And I'm assuming it's a standard flash device, not some "secure" device that has special windows-only drivers to access it. If it has special password or thumbprint security to gain access to the files you might not be able to access it with Linux.

hal8000
03-13-2007, 02:50 PM
If you see the message, "not a valid block device" then its either an incorrect filesystem type or bad line in your fstab.

If its an external drive then it should be recognised as sda1, as Harry has already said, (assuming that its alreadly formatted and partitioned)
What filesystem is on the drive? fat32 or ntfs or other?

Start knoppix then plug in your drive and type dmesg
here's what happens when I plug in my usb flash drive:

USB Mass Storage support registered.
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
Vendor: Model: USB Flash Memory Rev: 1.00
Type: Direct-Access ANSI SCSI revision : 02
usb-storage: device scan complete
SCSI device sda: 1001472 512-byte hdwr sectors (513 MB)
sda: Write Protect is off
sda: Mode Sense: 0b 00 00 08
sda: assuming drive cache: write through
SCSI device sda: 1001472 512-byte hdwr sectors (513 MB)
sda: Write Protect is off
sda: Mode Sense: 0b 00 00 08
sda: assuming drive cache: write through
sda: sda1
sd 0:0:0:0: Attached scsi removable disk sda


The drive is automatically listed and can be iewed in kde.
It may be the wrong fs type so try
mkdir /media/usbdrive
mount /dev/sda1 -t auto /media/usbdrive
as root to see if it mounts.