# Trouble with the harddrive

## ONEEYEMAN

Hi, ALL,

I have a hard drive that I took out of one of my desktops. It has an information that I would like to retrieve.

I also have a laptop that I would like to attach to the hard drive.

I bought the KINGWIN USB -> IDE/SATA, however when I attach the connector to the laptop and to the hard drive

nothing happened.

Is there any option I need to check in the kernel? Im using 2.6.32-r7 gentoo-sources.

And what device I should use to mount the device?

Thank you.

```

Relevant portion of dmesg

[855796.445333] sd 0:0:0:0: [sda] Attached SCSI disk

[855796.550887] usb 1-5:1.0: uevent

[855796.551204] usb 1-5: uevent

[855796.579939] usb 1-5:1.0: uevent

igor@IgorsGentooWork ~/OE/openembedded/recipes/xorg-xserver/xserver-xorg-conf $ su   

Password: 

IgorsGentooWork xserver-xorg-conf # fdisk /dev/sda

Unable to read /dev/sda

```

----------

## krinn

hi,

You need usb support in kernel (well, i suppose you have it), you need usb mass storage support in kernel, check USB_STORAGE, you need partitions support and finally the fs support. This is for handling the disk

But i think your problem might just comes from udev, recent udev doesn't work with some kernel parameters (CONFIG_SYSFS_DEPRECATED<_V2>) and i suppose you have it enable, this might explain why your usb drive is detect as sda (because i would expect a kernel at least saying it's sdb, so i assume your kernel still use hd* for your hdd)

----------

## dE_logics

To see if this is really a kernel problem, I suggest using the System rescue CD kernel for the mean time.. just to see if the hdd is being detected or not. Actually should also try plug in a pendrive to see if something happens.

Also the cable might be faulty (QA of electronic goods have fallen way below the line nowadays), you should have bought a HDD case from a Linux friendly brand.

----------

## ONEEYEMAN

Hi, guys,

Thank you for the reply.

2krinn:

How do I check if its a udev problem? Original laptop harddrive known as a /dev/hda.

2dE_logics:

Can I try the Gentoo minimal?

Thank you.

----------

## chiefbag

You will need to mount the drive also. 

You can also emerge usb-utilis then run lsusb this should show you if the drive has been detected.

----------

## krinn

in your running kernel config (if saved)

zcat /proc/config.gz | grep SYSFS_DEPRECATED

in your running kernel config (if make install)

mount /boot && grep SYSFS_DEPRECATED /boot/config

in your running kernel sources

grep SYSFS_DEPRECATED /usr/src/linux-`uname -r`/.config

in your selected kernel sources

grep SYSFS_DEPRECATED /usr/src/linux/.config

----------

## ONEEYEMAN

krinn,

```

IgorsGentooWork temp # grep SYSFS_DEPRECATED /usr/src/linux/.config

# CONFIG_SYSFS_DEPRECATED_V2 is not set

```

Its not set.

chiefbag,

Re-read the OP. The disk can't be seen by fdisk.

Also, here is the result of lsusb:

```

IgorsGentooWork mini2440 # lsusb

Bus 002 Device 002: ID 1bcf:0535 Sunplus Innovation Technology Inc. 

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 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 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 001 Device 003: ID 05e3:0718 Genesys Logic, Inc. 

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

```

The laptop has a USB mouse connected and the USB->IDE harddrive switch.

It looks like Im just missing the proper driver in the kernel. Am I right?

Thank you.

----------

## ONEEYEMAN

And here is the relevant output of "lsusb -v" and "usb" options of the current kernel:

```

Bus 001 Device 003: ID 05e3:0718 Genesys Logic, Inc. 

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        64

  idVendor           0x05e3 Genesys Logic, Inc.

  idProduct          0x0718 

  bcdDevice            0.41

  iManufacturer           0 

  iProduct                1 USB Storage

  iSerial                 2 000000000033

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           32

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          0 

    bmAttributes         0xc0

      Self Powered

    MaxPower               96mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           2

      bInterfaceClass         8 Mass Storage

      bInterfaceSubClass      6 SCSI

      bInterfaceProtocol     80 Bulk (Zip)

      iInterface              0 

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0200  1x 512 bytes

        bInterval               0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x02  EP 2 OUT

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0200  1x 512 bytes

        bInterval               0

Device Qualifier (for other device speed):

  bLength                10

  bDescriptorType         6

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        64

  bNumConfigurations      1

Device Status:     0x0000

  (Bus Powered)

```

```

IgorsGentooWork mini2440 # grep USB /usr/src/linux/.config

# CONFIG_AT76C50X_USB is not set

# CONFIG_USB_ZD1201 is not set

# CONFIG_USB_NET_RNDIS_WLAN is not set

# USB Network Adapters

# CONFIG_USB_CATC is not set

# CONFIG_USB_KAWETH is not set

# CONFIG_USB_PEGASUS is not set

# CONFIG_USB_RTL8150 is not set

# CONFIG_USB_USBNET is not set

# CONFIG_USB_HSO is not set

# CONFIG_I2C_TINY_USB is not set

# CONFIG_SND_USB is not set

# USB Input Devices

CONFIG_USB_HID=y

CONFIG_USB_HIDDEV=y

CONFIG_USB_SUPPORT=y

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_ARCH_HAS_OHCI=y

CONFIG_USB_ARCH_HAS_EHCI=y

CONFIG_USB=y

CONFIG_USB_DEBUG=y

CONFIG_USB_ANNOUNCE_NEW_DEVICES=y

# Miscellaneous USB options

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_DEVICE_CLASS is not set

# CONFIG_USB_DYNAMIC_MINORS is not set

CONFIG_USB_SUSPEND=y

# CONFIG_USB_OTG is not set

CONFIG_USB_MON=y

CONFIG_USB_WUSB=y

# CONFIG_USB_WUSB_CBAF is not set

# USB Host Controller Drivers

# CONFIG_USB_C67X00_HCD is not set

# CONFIG_USB_XHCI_HCD is not set

CONFIG_USB_EHCI_HCD=y

# CONFIG_USB_EHCI_ROOT_HUB_TT is not set

# CONFIG_USB_EHCI_TT_NEWSCHED is not set

# CONFIG_USB_OXU210HP_HCD is not set

# CONFIG_USB_ISP116X_HCD is not set

# CONFIG_USB_ISP1760_HCD is not set

# CONFIG_USB_ISP1362_HCD is not set

CONFIG_USB_OHCI_HCD=y

# CONFIG_USB_OHCI_HCD_SSB is not set

# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set

# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set

CONFIG_USB_OHCI_LITTLE_ENDIAN=y

CONFIG_USB_UHCI_HCD=y

# CONFIG_USB_SL811_HCD is not set

# CONFIG_USB_R8A66597_HCD is not set

CONFIG_USB_WHCI_HCD=y

# CONFIG_USB_HWA_HCD is not set

# USB Device Class drivers

# CONFIG_USB_ACM is not set

# CONFIG_USB_PRINTER is not set

# CONFIG_USB_WDM is not set

# CONFIG_USB_TMC is not set

# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may

# also be needed; see USB_STORAGE Help for more info

CONFIG_USB_STORAGE=y

CONFIG_USB_STORAGE_DEBUG=y

# CONFIG_USB_STORAGE_DATAFAB is not set

# CONFIG_USB_STORAGE_FREECOM is not set

# CONFIG_USB_STORAGE_ISD200 is not set

# CONFIG_USB_STORAGE_USBAT is not set

# CONFIG_USB_STORAGE_SDDR09 is not set

# CONFIG_USB_STORAGE_SDDR55 is not set

# CONFIG_USB_STORAGE_JUMPSHOT is not set

# CONFIG_USB_STORAGE_ALAUDA is not set

# CONFIG_USB_STORAGE_ONETOUCH is not set

# CONFIG_USB_STORAGE_KARMA is not set

# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set

CONFIG_USB_LIBUSUAL=y

# USB Imaging devices

# CONFIG_USB_MDC800 is not set

# CONFIG_USB_MICROTEK is not set

# USB port drivers

# CONFIG_USB_SERIAL is not set

# USB Miscellaneous drivers

# CONFIG_USB_EMI62 is not set

# CONFIG_USB_EMI26 is not set

# CONFIG_USB_ADUTUX is not set

# CONFIG_USB_SEVSEG is not set

# CONFIG_USB_RIO500 is not set

# CONFIG_USB_LEGOTOWER is not set

# CONFIG_USB_LCD is not set

# CONFIG_USB_BERRY_CHARGE is not set

# CONFIG_USB_LED is not set

# CONFIG_USB_CYPRESS_CY7C63 is not set

# CONFIG_USB_CYTHERM is not set

# CONFIG_USB_IDMOUSE is not set

# CONFIG_USB_FTDI_ELAN is not set

# CONFIG_USB_APPLEDISPLAY is not set

# CONFIG_USB_SISUSBVGA is not set

# CONFIG_USB_LD is not set

# CONFIG_USB_TRANCEVIBRATOR is not set

# CONFIG_USB_IOWARRIOR is not set

# CONFIG_USB_TEST is not set

# CONFIG_USB_ISIGHTFW is not set

# CONFIG_USB_VST is not set

# CONFIG_USB_GADGET is not set

# CONFIG_NOP_USB_XCEIV is not set

```

Thank you.

----------

