LinuxQuestions.org
Register a domain and help support LQ
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 09-26-2011, 04:02 PM   #1
Lionlinux
LQ Newbie
 
Registered: Sep 2011
Posts: 5

Rep: Reputation: Disabled
Unable to mount USB external hard drive on Linux


Hello Everyone,
I am new to Linux and try to mount external hard drive on Linux machine. Please help me finding out how can I do it? Here is the info so far I got.
[root@linux1 /]# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
[root@linux1 /]# cat /var/log/messages |grep usb
Sep 26 02:32:24 linux1 kernel: usbcore: registered new driver usbfs
Sep 26 02:32:24 linux1 kernel: usbcore: registered new driver hub
Sep 26 02:32:24 linux1 kernel: usbcore: registered new driver hiddev
Sep 26 02:32:24 linux1 kernel: usbcore: registered new driver usbhid
Sep 26 02:32:24 linux1 kernel: drivers/usb/input/hid-core.c: v2.0:USB HID core driver
[root@linux1 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 8.7G 7.6G 716M 92% /
none 505M 0 505M 0% /dev/shm
/dev/sda6 175G 83G 84G 50% /oradata
/dev/sda2 9.7G 55M 9.1G 1% /redolog
/dev/sda5 2.0G 35M 1.8G 2% /temp
/dev/sdb 109G 3.3G 100G 4% /restore
[root@linux1 /]# dmesg |grep usb
usbcore: registered new driver usbfs
usbcore: registered new driver hub
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
SELinux: initialized (dev usbfs, type usbfs), uses genfs_contexts
SELinux: initialized (dev usbdevfs, type usbdevfs), uses genfs_contexts

Thanks,
Lion
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-26-2011, 04:04 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Hello,

What distro are you using, and what kind of hard drive is it? Run the following before you plug your USB hard drive in, and after the fact, plug it in, and you will see live results of your messages file:
Code:
tail -f /var/log/messages
Cheers,

Josh
 
1 members found this post helpful.
Old 09-26-2011, 04:06 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,956

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by Lionlinux View Post
Hello Everyone,
I am new to Linux and try to mount external hard drive on Linux machine. Please help me finding out how can I do it? Here is the info so far I got.
Ok...we'll be glad to help, but need some useful details. What version/distro of Linux? What kind of external hard drive? How big is the drive? What have you done/tried so far? What desktop environment?

Most distros will either automatically mount the drive for you, or at least present it so you can mount it easily through a GUI or command line.

EDIT: Corp769..you beat me to it...was typing while you were too.
 
1 members found this post helpful.
Old 09-26-2011, 05:34 PM   #4
Lionlinux
LQ Newbie
 
Registered: Sep 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hello Josh
Here is the output for your query.
tail -f /var/log/messages
[root@linux1 /]# tail /var/log/messages
Sep 26 04:45:27 linux1 kernel: hub 2-0:1.0: 2 ports detected
Sep 26 04:45:28 linux1 udevd[1507]: udev done!
Sep 26 07:38:18 linux1 sshd(pam_unix)[8012]: session closed for user root
Sep 26 13:51:54 linux1 dhclient: DHCPREQUEST on eth0 to 192.168.1.254 port 67
Sep 26 13:51:54 linux1 dhclient: DHCPACK from 192.168.1.254
Sep 26 13:51:54 linux1 dhclient: bound to 192.168.1.90 -- renewal in 41698 seconds.
Sep 26 16:51:41 linux1 sshd(pam_unix)[9587]: session opened for user root by (uid=0)
Sep 26 16:51:41 linux1 sshd[9589]: gethostby*.getanswer: asked for "xpremoteserver.gateway.2wire.net IN AAAA", got type "A"
Sep 26 17:14:34 linux1 sshd(pam_unix)[9659]: session opened for user root by (uid=0)
Sep 26 17:14:34 linux1 sshd[9661]: gethostby*.getanswer: asked for "xpremoteserver.gateway.2wire.net IN AAAA", got type "A"

[root@linux1 /]# uname -a
Linux linux1.titan.net 2.6.9-89.0.0.0.1.ELhugemem #1 SMP Tue May 19 04:38:38 EDT 2009 i686 i686 i386 GNU/Linux

So far I have connected using USB to my Host server and add the USB driver to the guest machine. After that I am not sure if that has created any mount point by it self.
The hard drive is external USB Segate 270G.

Thanks for the help
Lion
 
Old 09-26-2011, 09:07 PM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Hmm... Something doesn't seem right here. What output do you get when you type "mount" at the command line?
 
1 members found this post helpful.
Old 09-26-2011, 09:37 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,361
Blog Entries: 12

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try running lsusb from the command line to see whether the drive is detected.

Also try funning fdisk -l to list the partitions.

If the drive is formatted NTFS, that may be the issue. Not all distros include NTFS drivers by default. I know that Debian does not, because I had a similar issue with a non-Seagate drive.
 
2 members found this post helpful.
Old 09-26-2011, 10:37 PM   #7
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by frankbell View Post
Try running lsusb from the command line to see whether the drive is detected.

Also try funning fdisk -l to list the partitions.

If the drive is formatted NTFS, that may be the issue. Not all distros include NTFS drivers by default. I know that Debian does not, because I had a similar issue with a non-Seagate drive.
Almost forgot about that.... To the OP: If this is the case, you need to install ntfs-3g on your system.
 
1 members found this post helpful.
Old 09-27-2011, 01:28 PM   #8
Lionlinux
LQ Newbie
 
Registered: Sep 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hello Frank/Corp
Here is the ouput for commands you requested.
#mount
/dev/sda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/sda6 on /oradata type ext3 (rw)
/dev/sda2 on /redolog type ext3 (rw)
/dev/sda5 on /temp type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/sdb on /restore type ext3 (rw)


[root@linux1 /]# fdisk -l

Disk /dev/sda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1147 9213246 83 Linux
/dev/sda2 1148 2422 10241437+ 83 Linux
/dev/sda3 2423 2677 2048287+ 82 Linux swap
/dev/sda4 2678 26108 188209507+ 5 Extended
/dev/sda5 2678 2932 2048256 83 Linux
/dev/sda6 2933 26108 186161188+ 83 Linux

Disk /dev/sdb: 118.1 GB, 118111600640 bytes
255 heads, 63 sectors/track, 14359 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

[root@linux1 /]# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

Thanks
 
1 members found this post helpful.
Old 09-27-2011, 01:40 PM   #9
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
How many hard drives do you have installed on your system, not including your external hard drive?
 
Old 09-27-2011, 03:00 PM   #10
Lionlinux
LQ Newbie
 
Registered: Sep 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Corp

I have installed two hard drives as shown in my previous post
Disk /dev/sda: 214.7 GB
Disk /dev/sdb: 118.1 GB

Thanks
 
Old 09-27-2011, 08:33 PM   #11
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,361
Blog Entries: 12

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Hmmmmm. That drive does seem to be invisible. I'm assuming you have tried it in different USB ports.

Do you have access to another computer for testing the drive itself?
 
Old 09-27-2011, 08:36 PM   #12
Lionlinux
LQ Newbie
 
Registered: Sep 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
That USB drive is working in Windows. I tried it on windows 2007 and able to upload few files.
 
Old 09-28-2011, 09:47 AM   #13
ghoultek
Member
 
Registered: Sep 2011
Location: New York City
Distribution: Testing Ubuntu/XUbuntu/KUbuntu 12.04, Mint 13 (all flavors)
Posts: 56

Rep: Reputation: 2
I hope the following question isn't a dumb one but it's related to the OP's issue... wouldn't the Linux box treat/view an USB key and the OP's external USB hard drive the same? Windows reports my 4GB and 8GB USB keys as "USB Mass Storage" devices. On Windows 7 my Dell Digital DJ (big o' brick MP3 player) and my son's IPod are reported as USB mass storage devices. I have an old Acom Data external USB/Firewire drive (170GB I believe). I'll pull it out and test it as well.

<--- is a Linux newbie running Slackware v13.37 with KDE.

Update:
I plugged in my 4GB Kingston Data Traveler USB key which has a formatted FAT32 partition with data files on it.
tail -f /var/log/messages gives me the following:
Code:
Sep 28 09:37:24 p424slack1337 kernel: [89195.533919] usb 1-5: SerialNumber: 001BFC03F054BA7050000000
Sep 28 09:37:24 p424slack1337 kernel: [89195.537217] scsi7 : usb-storage 1-5:1.0
Sep 28 09:37:25 p424slack1337 kernel: [89196.563225] scsi 7:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
Sep 28 09:37:25 p424slack1337 kernel: [89196.563551] sd 7:0:0:0: Attached scsi generic sg3 type 0
Sep 28 09:37:25 p424slack1337 kernel: [89196.974990] sd 7:0:0:0: [sdb] 7774208 512-byte logical blocks: (3.98 GB/3.70 GiB)
Sep 28 09:37:25 p424slack1337 kernel: [89196.976736] sd 7:0:0:0: [sdb] Write Protect is off
Sep 28 09:37:25 p424slack1337 kernel: [89196.997553]  sdb: sdb1
Sep 28 09:37:25 p424slack1337 kernel: [89197.001604] sd 7:0:0:0: [sdb] Attached SCSI removable disk
uname -a gives me:
Code:
Linux p424slack1337 2.6.37.6-smp #2 SMP Sat Apr 9 23:39:07 CDT 2011 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux
mount gives me:
Code:
/dev/root on / type ext4 (rw,commit=0)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda3 on /distros/ubuntu_v11.04 type ext4 (rw,commit=0)
tmpfs on /dev/shm type tmpfs (rw)
lsusb gives me:
Code:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 009: ID 0951:1603 Kingston Technology DataTraveler 1GB/2GB Pen Drive
/sbin/fdisk -l gives me:
Code:
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x68a368a3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     7813119     3905536   82  Linux swap
/dev/sda2         7813120    85938175    39062528   83  Linux
/dev/sda3   *    85938176   164062270    39062047+  83  Linux

Disk /dev/sdb: 3980 MB, 3980394496 bytes
9 heads, 9 sectors/track, 95977 cylinders, total 7774208 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        8064     7774207     3883072    b  W95 FAT32
cat /etc/fstab gives me:
Code:
/dev/sda1        swap             swap        defaults         0   0
/dev/sda2        /                ext4        defaults         1   1
/dev/sda3        /distros/ubuntu_v11.04 ext4        defaults         1   2
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
FYI: Ubuntu hasn't been installed yet. I just created a partition for it when I installed Slack.

The device notifier in the system tray gave me the following error:
Code:
org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call",
sender=":1.93" (uid=1000 pid=5356 comm="kdeinit4: kded4 [kdeinit]) 
interface="org.freedesktop.Hal.Device.Volume" member="Mount" error name="(unset)" requested_reply=0 
destination="org.freedesktop.Hal" (uid=0 pid=1661 comm="/usr/sbin/hald))
dmesg |grep sd gives me:
Code:
...
[89196.563551] sd 7:0:0:0: Attached scsi generic sg3 type 0
[89196.974990] sd 7:0:0:0: [sdb] 7774208 512-byte logical blocks: (3.98 GB/3.70 GiB)
[89196.976736] sd 7:0:0:0: [sdb] Write Protect is off
[89196.976742] sd 7:0:0:0: [sdb] Mode Sense: 03 41 00 00
[89196.976745] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[89196.982604] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[89196.997553]  sdb: sdb1
[89197.001596] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[89197.001604] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[91778.037876] VFS: Can't find a valid FAT filesystem on dev sdb.
mount /dev/sdb /home/jqpdev/Desktop/Jump_Drive gives me:
Code:
mount: /dev/sdb: can't read superblock
I think "The can't find a valid FAT filesystem on dev sdb" response from VFS is the issue. My USB key was formatted in Windows 7 which may have formatted the partition in a way that is subtly different than Windows 95 would have. However, Win7 reports it having a FAT32 partition.

Last edited by ghoultek; 09-28-2011 at 11:02 AM.
 
Old 09-28-2011, 11:21 AM   #14
linux2001
Member
 
Registered: Sep 2011
Posts: 32

Rep: Reputation: Disabled
Try
Code:
#mount /dev/sdb1 /home/jqpdev/Desktop/Jump_Drive
 
1 members found this post helpful.
Old 09-28-2011, 12:27 PM   #15
ghoultek
Member
 
Registered: Sep 2011
Location: New York City
Distribution: Testing Ubuntu/XUbuntu/KUbuntu 12.04, Mint 13 (all flavors)
Posts: 56

Rep: Reputation: 2
Strange or maybe not so strange...
I originally tried #mount -t vfs /dev/sdb1 /home/jqpdev/Desktop/Jump_Drive before running /sbin/fdisk -l -u /dev/sdb and it failed (something about the superblock...). I then starting google searching and while googling the system tray notifier popped up again reporting that there was a USB device attached but it still failed to mount. I figured the auto-mount feature was implemented via simple polling which caused the additional notification. However when I re-ran the fdisk command without the -u option it read partition tables on my hard drive and the USB key. Running mount without the -t vfs worked. I'll test the ACOM Data drive in a few minutes and report back.
 
  


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
Unable to mount USB external hard drive Irene Chan Linux - Newbie 11 03-13-2010 02:02 PM
Unable to mount external hard drive JenovaProject Linux - Hardware 1 04-06-2008 04:14 PM
Unable to mount iStore USB External Hard Drive LupisYonderboy Linux - Newbie 3 10-20-2007 10:12 AM
how do I mount an external USB hard drive hykhoshn Linux - Hardware 1 06-01-2006 11:14 AM
How to mount external USB hard drive? zyzyis Linux - Newbie 6 02-01-2006 10:37 PM


All times are GMT -5. The time now is 05:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration