LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-30-2007, 07:45 AM   #1
linux_2007_
Member
 
Registered: Feb 2007
Posts: 80

Rep: Reputation: 15
USB External Hard Disk


I have recently got an external USB hard drive and connected it to the USB port of my computer. The operating system is SuSE Linux 10.0 with KDE 3.4. The first time that I connected it, a window popped up (like in Windows XP) and I could simply drag and drop the files I wanted to. I didn’t touch the setup or anything else at all. The location of this external HDD was in /media/. The day after, I turned on the computer and the hard drive, but no window popped up and there was no sign of it in /media/. Do you know what might have happened? And, how can I fix it?

The external USB hard disk is 'brand new' and all the cables and everything seem to be in perfect shape. The hard disk has no problem with my other system which has WindowsXP.

The USB port is fine and functional, for example when I connect a USB mouse, it gets detected easily. The problem is only with usb hard disk and usb flash memory (pen-drive).

Could anyone please help me out here. I really need to get this working soon.

Thank you!!
 
Old 12-30-2007, 11:37 AM   #2
Slick666
Member
 
Registered: Feb 2006
Distribution: Ubuntu 8.04; Debian Etch
Posts: 167

Rep: Reputation: 33
I think what is happening is that your drive is being connected but it is not being mounted automatically. To verify this try these commands.

Code:
df -h
This will show everything that is mounted and it's size. Take a moment and make sure the drive isn't already mounted some where you didn't expect then try

Code:
fdisk -l /dev/sdc
Make sure the device ('/dev/sdc') is the device that your usb drive come up as. Typically a usb drives comes up as a scsi drive (sdX) and usually 'a' is your hard drive and 'b' is your cdrom. This might be different for your system.

The last command should list your partition table or your external drive. If ti does than the problem your having is getting the system to auto mount your drive. You can do the manually with the mount command.
 
Old 12-30-2007, 12:03 PM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
If you have the device connected (USB cable connected) when you boot, it might affect. Some machines even refuse to boot with a USB media connected before the system is loaded; therefore you could try taking the drive completely off, then booting the machine, then connecting it, then powering it. If it doesn't help, check out if
Code:
dmesg
says something curious after you've plugged the drive in (the last lines). It should show if the system detects that the drive is connected, and some information about it. If it throws no errors, and you can manually 'mount' the drive, then it's just about automation.
 
Old 12-30-2007, 07:48 PM   #4
linux_2007_
Member
 
Registered: Feb 2007
Posts: 80

Original Poster
Rep: Reputation: 15
Thank you for the reply. It seems it is not being detected because it is not being mounted. In other words, although the cable is in the USB port, but the system does not consider it as "connected". But the usb ports are all fine and fuctional, it's easy to check, when I connect a USB mouse, it gets detected immediately. So, the problem is only with USB hard disks and flash memories.

"df -h" didn't show any sign of it either.

Also, " /sbin/fdisk -l " throws this message:

DEVICE BOOT START END BLOCKS ID SYSTEM
/dev/sda1/ * 1 13 104391 83 LINUX
/dev/sda2/ 14 38913 312464250 8e LINUX LVM



I tried dmesg as well, here are some parts of the output:

usb 2-7: device descriptor read/8, error -110
usb 2-7: device descriptor read/all, error -110
usb 2-7: new high speed USB device using ehci_hcd and address 6
usb 2-7: device descriptor read/8, error -110
usb 2-7: device descriptor read/all, error -110
usb 1-4: new full speed USB device using ohci_hcd and address 3
hub 1-4:1.0: USB hub found
hub 1-4:1.0: 4 ports detected
usb 1-4.1: new full speed USB device using ohci_hcd and address 4
hub 1-4.1:1.0: USB hub found
hub 1-4.1:1.0: 4 ports detected
usb 1-4.2: new low speed USB device using ohci_hcd and address 5
usb 1-4.1.1: new low speed USB device using ohci_hcd and address 6
usb 1-4.1.1: unable to read config index 0 descriptor/all
usb 1-4.1.1: can't read configurations, error -110
usb 1-4.1.1: new low speed USB device using ohci_hcd and address 7
usb 1-4.1.1: unable to read config index 0 descriptor/all
usb 1-4.1.1: can't read configurations, error -110
usb 1-4.1.1: new low speed USB device using ohci_hcd and address 8
.
.
.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.01:USB HID core driver
usb 2-6: new high speed USB device using ehci_hcd and address 7
Initializing USB Mass Storage driver...
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
Vendor: SAMSUNG Model: HD501LJ Rev:
Type: Direct-Access ANSI SCSI revision: 02 usb 2-6:
reset high speed USB
device using ehci_hcd and address 7 usb 2-6:
can't restore configuration #1 (error=-110) usb 2-6:
USB disconnect, address 7 scsi:
Device offlined - not ready after error recovery:
host 4 channel 0 id 0 lun 0 scsi4 (0:0):
rejecting I/O to offline device scsi4 (0:0):
rejecting I/O to offline device scsi4 (0:0):
rejecting I/O to offline device sdb : READ CAPACITY failed. sdb :
status=0, message=00, host=5, driver=04 sdb : sense not available.
sdb: assuming drive cache: write through Attached scsi disk sdb
at scsi4, channel 0, id 0, lun 0 Attached scsi generic sg1 at scsi4,
channel 0, id 0, lun 0, type 0 usb-storage: device scan complete usb 2-6:
.
.
.


Any idea that might help please? I am really stuck.

.

Last edited by linux_2007_; 12-30-2007 at 08:22 PM.
 
Old 12-30-2007, 08:27 PM   #5
linux_2007_
Member
 
Registered: Feb 2007
Posts: 80

Original Poster
Rep: Reputation: 15
I forgot to say, because the hard disk is not being connected, and the device name is not shown when I run this command:

dmesg

Therefore, I am not able to mount it manually (like: mount /dev/sda3 /newharddisk).


Honestly, I expected KDE to act smarter and detect it automatically. Any suggestions please?


.

Last edited by linux_2007_; 12-30-2007 at 10:52 PM.
 
Old 12-30-2007, 11:31 PM   #6
roy_lt_69
Member
 
Registered: Aug 2006
Location: Vancouver, BC, Canada
Distribution: Slackware, Mint, Debian
Posts: 238

Rep: Reputation: 29
I have seen this problem before.
Some systems auto-detects the new USB drive, mounts it, and makes a new entry in /etc/fstab.
But subsequent boots do not auto-mount it (I personally prefer this).
Also the entry in /etc/fstab may not match the entry in dmesg for the USB drive, eg in fstab it may be /dev/sdb but in dmesg it may be /dev/sdc.
So check dmesg & /etc/fstab.

I hope this helps.
 
Old 12-31-2007, 01:09 AM   #7
linux_2007_
Member
 
Registered: Feb 2007
Posts: 80

Original Poster
Rep: Reputation: 15
Thank you for the advice.

Quote:
Originally Posted by roy_lt_69 View Post
Some systems auto-detects the new USB drive, mounts it, and makes a new entry in /etc/fstab.
But subsequent boots do not auto-mount it (I personally prefer this).
What is the benefit of this, other than every time you have to go through a lot of hassle to get it mounted?

Quote:
Originally Posted by roy_lt_69 View Post
Also the entry in /etc/fstab may not match the entry in dmesg for the USB drive, eg in fstab it may be /dev/sdb but in dmesg it may be /dev/sdc.
So check dmesg & /etc/fstab.
You are right, but it appears to me that the USB ports of this machine (which is less than a year old) are not always HOT - referring to the term HOTPLUG -- and the problem is that it doesn't get HOT unless the device is something other than Hard Disk or Flash Memory (usb mouse, keyboards, etc are ok). That is why it can't be detected because there is no signal that tells kernel that a hard disk has been connected to USB port Number x........it just doesn't like external storage devices - which is disappointing.

Is it possible that there is something wrong with the USB controllers? If so, what would the solution be?

Is there any option/switch/command in KDE (or else where in linux) to fix this?


Thanks!


.

Last edited by linux_2007_; 12-31-2007 at 01:20 AM.
 
Old 12-31-2007, 01:14 AM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by roy_lt_69 View Post
Also the entry in /etc/fstab may not match the entry in dmesg for the USB drive, eg in fstab it may be /dev/sdb but in dmesg it may be /dev/sdc.
So check dmesg & /etc/fstab.
This is why one should use udev.
 
Old 12-31-2007, 03:57 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
SuSE does use udev. SuSE doesn't modify /etc/fstab automatically.

First double check that you don't have the kernel boot option "apci=no". If you do, then hal & dbus won't run.
Try restarting the hal and dbus daemons: e.g. "sudo /usr/sbin/rchal restart" & "sudo /usr/sbin/rcdbus restart".

I don't know if this will help. I just inserted a 2GB card into a usb reader:
Code:
Dec 31 03:18:30 hpamd64 sudo: jschiwal : TTY=pts/1 ; PWD=/var/lib ; USER=root ; COMMAND=/usr/bin/tail -f /var/log/messages
Dec 31 03:18:47 hpamd64 kernel: usb 2-3.2: new high speed USB device using ehci_hcd and address 6
Dec 31 03:18:47 hpamd64 kernel: usb 2-3.2: new device found, idVendor=0781, idProduct=9919
Dec 31 03:18:47 hpamd64 kernel: usb 2-3.2: new device strings: Mfr=3, Product=4, SerialNumber=5
Dec 31 03:18:47 hpamd64 kernel: usb 2-3.2: Product: ImageMate 5 in 1 Reader/Writer
Dec 31 03:18:47 hpamd64 kernel: usb 2-3.2: Manufacturer: SanDisk
Dec 31 03:18:47 hpamd64 kernel: usb 2-3.2: SerialNumber: 0302258591
Dec 31 03:18:47 hpamd64 kernel: usb 2-3.2: configuration #1 chosen from 1 choice
Dec 31 03:18:47 hpamd64 kernel: scsi6 : SCSI emulation for USB Mass Storage devices
Dec 31 03:18:47 hpamd64 kernel: usb-storage: device found at 6
Dec 31 03:18:47 hpamd64 kernel: usb-storage: waiting for device to settle before scanning
Dec 31 03:18:48 hpamd64 kernel: scsi 6:0:0:0: Direct-Access     Generic  STORAGE DEVICE   9312 PQ: 0 ANSI: 0
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] 7876608 512-byte hardware sectors (4033 MB)
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] Write Protect is off
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] Mode Sense: 03 00 00 00
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] Assuming drive cache: write through
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] 7876608 512-byte hardware sectors (4033 MB)
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] Write Protect is off
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] Mode Sense: 03 00 00 00
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] Assuming drive cache: write through
Dec 31 03:18:48 hpamd64 kernel:  sdd: sdd1 sdd2
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: [sdd] Attached SCSI removable disk
Dec 31 03:18:48 hpamd64 kernel: sd 6:0:0:0: Attached scsi generic sg6 type 0
Dec 31 03:18:48 hpamd64 kernel: usb-storage: device scan complete
Dec 31 03:18:50 hpamd64 kernel: EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
Dec 31 03:18:50 hpamd64 hald: mounted /dev/sdd1 on behalf of uid 1000
Dec 31 03:18:50 hpamd64 kernel: EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
Dec 31 03:18:50 hpamd64 hald: mounted /dev/sdd2 on behalf of uid 1000
Here is the output of "udevmonitor":
Code:
udevmonitor
udevmonitor will print the received events for:
UDEV the event which udev sends out after rule processing
UEVENT the kernel uevent

UEVENT[1199093243.481175] add      /block/sdd/sdd1 (block)
UEVENT[1199093243.486603] add      /block/sdd/sdd2 (block)
UDEV  [1199093243.570136] add      /block/sdd/sdd2 (block)
UDEV  [1199093243.701014] add      /block/sdd/sdd1 (block)
If a device node is created for the external drive, then udev is probably working. There is a kde daemon that is supposed to be involved in mounting devices.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">

<kcfg>
  <kcfgfile name="mediamanagerrc"/>
  <group name="Global">
    <entry name="HalBackendEnabled" type="Bool">
      <label>Enable HAL backend</label>
      <whatsthis>When HAL (Hardware Abstraction Layer) support is enabled, KDE will use it to gather information on the storage media available in your system.</whatsthis>
      <default>true</default>
    </entry>
    <entry name="CdPollingEnabled" type="Bool">
      <label>Enable CD polling</label>
      <whatsthis>Allows KDE to poll CD-Rom or DVD-Rom drives itself in order to detect medium insert.</whatsthis>
      <default>true</default>
    </entry>
    <entry name="AutostartEnabled" type="Bool">
      <label>Enable medium application autostart after mount</label>
      <whatsthis>Allows KDE to autostart application after a medium mount if it contains an Autostart or an Autoopen file.</whatsthis>
      <default>true</default>
    </entry>
  </group>
</kcfg>
Section 8.1.1 of the KDE User Guide may have useful information in this regard:
http://docs.kde.org/stable/en/kdebas.../userguide.pdf

More information can be found at:
http://wiki.kde.org/tiki-index.php?p...US+for+KDE+3.x
Quote:
You will need to start the D-BUS daemon when the system starts. The command to start it correctly for our purposes is:

dbus-daemon-1 --system


This will create two files in /usr/local/var/run/dbus named pid and system_bus_socket, the latter being a named pipe and not an actual file. D-BUS daemon will fail to start if either of these files is present before it runs. Make sure they are deleted from the system on shutdown.
On SuSE, these files are in /var/run/dbus/ and not /usr/local/var/run/dbus/. One thing that might be worth a try is shutting down the dbus daemon, and then deleting /var/run/dbus/pid and /var/run/dbus/system_bus_socket if they still exist. Then start the dbus daemon again.

You can use ksystemguard to see which processes are running. You need to run this as root to kill root processes however. It would be easier to run "sudo /usr/sbin/rcdbus stop".
There are two processes that you may want to look for: hald-addon-storage & hald-addon-acpi.

Here is the irony of making a system user-friendly. It entails so much complexity.


Good Luck!

Last edited by jschiwal; 12-31-2007 at 04:36 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
60GB laptop hard disk & 200GB external USB hard disk linux compatibility powah Linux - Hardware 0 03-07-2006 10:55 AM
USB external hard disk draggin Linux - Hardware 1 12-28-2005 04:33 PM
usb controller dies mounting external usb hard disk komasoftware Linux - Hardware 4 11-30-2005 01:18 PM
External USB Hard Disk Nishy Linux - Hardware 2 09-28-2005 06:35 AM
external partitioned usb hard disk mr_a_ali Linux - Hardware 2 08-14-2004 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:08 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