LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2006, 03:52 AM   #1
tjgadu
Member
 
Registered: Jun 2005
Location: CyberIsland
Distribution: Debian and Fedora
Posts: 31

Rep: Reputation: 15
mount usb device on debian


how can i mount a usb device on debian?
 
Old 02-19-2006, 04:23 AM   #2
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
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.
 
Old 02-19-2006, 12:45 PM   #3
Dtsazza
Member
 
Registered: Oct 2005
Location: Oxford, UK
Distribution: Debian Etch (w/ dual-boot XP for gaming)
Posts: 282

Rep: Reputation: 30
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
 
Old 02-19-2006, 06:04 PM   #4
sklitzz
Member
 
Registered: Feb 2006
Location: Croatia, Split
Distribution: Ubuntu 7.10
Posts: 93

Rep: Reputation: 15
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'
 
Old 02-20-2006, 07:41 AM   #5
tjgadu
Member
 
Registered: Jun 2005
Location: CyberIsland
Distribution: Debian and Fedora
Posts: 31

Original Poster
Rep: Reputation: 15
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?
 
Old 02-20-2006, 02:28 PM   #6
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
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

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
 
Old 02-20-2006, 03:48 PM   #7
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
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.
 
Old 02-20-2006, 11:48 PM   #8
tjgadu
Member
 
Registered: Jun 2005
Location: CyberIsland
Distribution: Debian and Fedora
Posts: 31

Original Poster
Rep: Reputation: 15
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 : )
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB device automatic discovery and mount in KDE / Debian pinknick Linux - Hardware 0 01-18-2006 03:45 PM
Mount USB device teco Linux - Hardware 2 10-28-2004 01:56 PM
can't mount USB device rob_xx17 Linux - Hardware 2 01-26-2004 06:41 PM
how can I mount this device: da0: <USB 2.0 Storage Device alkad_mzu *BSD 2 11-15-2003 07:15 PM
mount USB Device finger Linux - Hardware 2 07-21-2002 01:20 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration