LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mount usb device on debian (https://www.linuxquestions.org/questions/linux-newbie-8/mount-usb-device-on-debian-417080/)

tjgadu 02-19-2006 02:52 AM

mount usb device on debian
 
how can i mount a usb device on debian?

anti.corp 02-19-2006 03:23 AM

Hi,

Plug in your usb device.

As root type this:
Code:

ls -l /dev/sd*
Now you should see your device listed. Make a note about the devicename/mountpoint.

Next make a mountpoint for your device:
Code:

mkdir /media/usb0
You probably want to access your usb device as a regular user, so change permission by typing this:
Code:

chgrp cdrom /media/usb0
chmod a+rw /media/usb0

Next open up your fstab using an editor:

Code:

nano /etc/fstab
Add this line to the end of the file:
Code:

/dev/sda1 /media/usb0 vfat rw,user,users,noauto,noatime,noauto 1 2
Now remember to change the 'sda1' into the info you got earlier when you typed the ls -l command.

That's it.

Dtsazza 02-19-2006 11:45 AM

If you use SCSI or SATA hard drives, they'll be assigned /dev/sd* names as well, so it might be tricky to work out which one is the USB device using 'ls -l'. Another way is to type
Code:

dmesg
in a terminal window - you should see the USB initialisation messages, along with a line telling you which /dev/hdx device it's been bound to.

HTH,
Andrzej

sklitzz 02-19-2006 05:04 PM

Quote:

Originally Posted by Dtsazza
Another way is to type
Code:

dmesg
in a terminal window - you should see the USB initialisation messages, along with a line telling you which /dev/hdx device it's been bound to.

HTH,
Andrzej

Just to add I think this is even better
Code:

dmesg | grep 'usb'

tjgadu 02-20-2006 06:41 AM

But if I want ot mount a ntfs usb
 
Hi,

thanx to your reply : )

But what if I want to mount an ntfs usb key?

Will I have to simply edit the fstab entry and replace the vfat by ntfs filesystem?

Or will I have to load modules prior to that?

anti.corp 02-20-2006 01:28 PM

Quote:

Originally Posted by tjgadu
Hi,

thanx to your reply : )

But what if I want to mount an ntfs usb key?

Will I have to simply edit the fstab entry and replace the vfat by ntfs filesystem?

Or will I have to load modules prior to that?

Your welcome.

No it's not as simple as that unfortunately :tisk:

For the easy way around it, just partition your usb key using fat32.

If you want to continue using ntfs you will have install ntfsmount and fuse.

Here is a good howto:
http://wiki.linux-ntfs.org/doku.php?id=ntfsmount

Have fun :)

David the H. 02-20-2006 02:48 PM

If I may ask, where did you get a usb key with NTFS on it? Almost every portable media sold comes formatted in FAT32. Did you reformat it yourself or can you actually buy them that way?

I agree with the above though. It's much easier just to put a FAT32 file system on it than to mess with NTFS. FAT support is almost universal, but NTFS is a nightmare outside of WindowsNT-based systems.

tjgadu 02-20-2006 10:48 PM

usb key with ntfs
 
I reformatted it... I was using it on Windows. It's only now that i'm trying to mount it on linux.

I'll try to mount it as ntfs just for fun :)
Thanx for the advice : )


All times are GMT -5. The time now is 06:54 PM.