LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-09-2006, 09:15 AM   #1
ckamheng
Member
 
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 75

Rep: Reputation: 15
mount usb hard drive


1) what is the command to mount usb hard drive manually?
2) Can i auto mount a usb hard drive? that means whenever i plug in the usb hard drive, it will automatic mount the drive and unmount once it is unplug?

thanks.
 
Old 03-09-2006, 10:03 AM   #2
dracae
Member
 
Registered: Feb 2006
Location: Oklahoma
Distribution: Debian Sid and Etch
Posts: 423

Rep: Reputation: 30
Assuming it is formatted with fat(vfat) and it is the only sata/scsi/usb drive connected(sda).
mount -t vfat /dev/sda1 /mnt

If you use gnome, install pmount and gnome-volume-manager to have it mounted automatically.

Also, the sync option does not work correctly with vfat so you should always unmount it before disconnecting it.

Last edited by dracae; 03-09-2006 at 10:04 AM.
 
Old 03-09-2006, 07:42 PM   #3
ckamheng
Member
 
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dracae
Assuming it is formatted with fat(vfat) and it is the only sata/scsi/usb drive connected(sda).
mount -t vfat /dev/sda1 /mnt

If you use gnome, install pmount and gnome-volume-manager to have it mounted automatically.

Also, the sync option does not work correctly with vfat so you should always unmount it before disconnecting it.
i do not have X windows/gnome/kde install. any idea to make it auto mount/unmount?
 
Old 03-09-2006, 09:14 PM   #4
dracae
Member
 
Registered: Feb 2006
Location: Oklahoma
Distribution: Debian Sid and Etch
Posts: 423

Rep: Reputation: 30
autofs? hotplug script?
 
Old 03-09-2006, 11:05 PM   #5
lavluda
Member
 
Registered: Jan 2006
Location: Dhaka, Bangladesh
Distribution: Debian sid, Suse 9.3 pro, Mandrake 10.0, Redhat 7-9, FC-2,3, Gentoo 2006,2006.1
Posts: 89
Blog Entries: 2

Rep: Reputation: 15
Quote:
Originally Posted by ckamheng
1) what is the command to mount usb hard drive manually?
2) Can i auto mount a usb hard drive? that means whenever i plug in the usb hard drive, it will automatic mount the drive and unmount once it is unplug?

thanks.
Before the boot you please plug in the usb hdd device.
And then check the output of "fdisk -l"
 
Old 03-15-2006, 10:21 PM   #6
cferron
Member
 
Registered: Jan 2006
Location: Trois-Rivières, Québec, Canada
Distribution: Slackware, Ubuntu
Posts: 74

Rep: Reputation: 15
Quote:
Originally Posted by dracae
Assuming it is formatted with fat(vfat) and it is the only sata/scsi/usb drive connected(sda).
If a SATA drive is present and it is normally assigned /dev/sda would this new connected USB drive automatically go under /dev/sdb?

Thanks

Claude
 
Old 03-16-2006, 10:13 AM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
tail -f /var/log/messages now plug in the USB drive and watch the scrolling messages to see what device was assigned to the drive..

Quote:
itg-debian:/etc/network# tail -f /var/log/messages

Mar 16 11:09:46 localhost kernel: usb 2-2: new full speed USB device using address 7
Mar 16 11:09:46 localhost kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Mar 16 11:09:46 localhost kernel: Vendor: OTi Model: Flash Disk Rev: 1.89
Mar 16 11:09:46 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02
Mar 16 11:09:46 localhost kernel: sda: Unit Not Ready, sense:
Mar 16 11:09:46 localhost kernel: Current : sense key Unit Attention
Mar 16 11:09:46 localhost kernel: Additional sense: Not ready to ready change, medium may have changed
Mar 16 11:09:46 localhost kernel: SCSI device sda: 128000 512-byte hdwr sectors (66 MB)
Mar 16 11:09:46 localhost kernel: sda: assuming Write Enabled
Mar 16 11:09:46 localhost kernel: /dev/scsi/host3/bus0/target0/lun0: p1
Mar 16 11:09:46 localhost kernel: Attached scsi removable disk sda at scsi3, channel 0, id 0, lun 0
Mar 16 11:09:47 localhost scsi.agent[18166]: sd_mod: loaded sucessfully (for disk)
Mar 16 11:09:47 localhost usb.agent[18157]: usb-storage: already loaded
so this device was detected as /dev/sda and would be mounted using /dev/sda1

Last edited by farslayer; 03-16-2006 at 10:17 AM.
 
Old 03-16-2006, 10:21 AM   #8
dracae
Member
 
Registered: Feb 2006
Location: Oklahoma
Distribution: Debian Sid and Etch
Posts: 423

Rep: Reputation: 30
So does /dev/sda1 exist?
 
Old 03-16-2006, 10:25 AM   #9
dracae
Member
 
Registered: Feb 2006
Location: Oklahoma
Distribution: Debian Sid and Etch
Posts: 423

Rep: Reputation: 30
Here is a howto for setting up autofs. http://www.greenfly.org/tips/usb_drive.html
 
  


Reply



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
Can't mount my USB 2.0 hard drive Iltbreg Linux - Hardware 4 03-02-2006 03:55 PM
How to mount usb hard drive NalinA Linux - Newbie 1 10-26-2005 10:07 PM
I can mount a usb hard drive fiacobelli Linux - Hardware 3 07-06-2005 01:52 PM
How do I mount an USB hard Drive? nandy70 Linux - Newbie 1 11-20-2003 12:29 PM
mount usb module then mount usb hard drive guanyu Linux - Hardware 1 10-08-2003 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:27 AM.

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
Open Source Consulting | Domain Registration