LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I get Debian to read my USB external HDD? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-get-debian-to-read-my-usb-external-hdd-713363/)

Hardcor3 03-21-2009 09:15 AM

How do I get Debian to read my USB external HDD?
 
I am loving learning Linux. Apt-Get, to me, is the greatest command ever.

But I installed Debian on a spare HDD, and I'm using an external HDD for storage.

I'm currently using the current businesscard image of Debian, installed.

How do I get Debian to recognize the drive? Thanks!

TITiAN 03-21-2009 10:13 AM

Have you installed a desktop? If not, you might want to mount the drive on the commandline. You can either mount it as root or make an entry in the file /etc/fstab.
Before you can do that, please post the output of:
Quote:

ls /dev/sd* /dev/hd*

Hardcor3 03-21-2009 01:41 PM

Code:

/dev/hda  /dev/hda2  /dev/hdc        /dev/sda1  /dev/sda5
/dev/hda1  /dev/hda5  /dev/sda        /dev/sda2

And I do have a desktop installed.

elsheepo 03-21-2009 01:48 PM

First, open a terminal and enter
Code:

sudo tail -f /var/log/messages
then plug in your external HDD, watch the output of /var/log/messages to find the device name in /dev/
then
Code:

sudo mkdir /mnt/externalHDD
sudo mount -t auto /dev/* /mnt/externalHDD

where * = w/e...sdb,sda.... whatever you saw in /var/log/messages

I think ;)

stratotak 03-21-2009 01:51 PM

I usually just install ntfs-3g and ntfsprogs and all is good.And if you have gnome and have gnome-volume-manager installed it will detect it when plugged in and automount it and create a icon on desktop..

TITiAN 03-21-2009 01:59 PM

Quote:

Originally Posted by stratotak (Post 3483336)
I usually just install ntfs-3g and ntfsprogs and all is good.and if you have gnome and have gnome-volume-manager installed it will detect it when plugged in and automount it and create a icon on desktop..

That's what you need when you have NTFS partitions. FAT partitions should work out of the box. ntfs-3g + ntfsprogs are also required for r/w support on command line mounts.

Hardcor3 03-21-2009 02:03 PM

To elsheepo:
I get;
Code:

mount: you must specify the filesystem type
To stratotak:
I'm not sure how to get gnome-volume-manager installed. Would it be
Code:

apt-get install gnome-volume-manager
?

Thanks to all so far.

TITiAN 03-21-2009 02:09 PM

hardcore: when it tells you to specify the fs type, it usually means that you didn't choose a valid partition (e.g. a whole drive like /dev/sda or an extended partition etc.). I suggest you try to mount the different /dev/sd* devices. mount usually autodetects the fs type. "apt-get install gnome-volume-manager" isn't a bad idea, either, it will make things a lot easier.

elsheepo 03-21-2009 02:12 PM

if its a NTFS drive
Code:

sudo mount -t ntfs /dev/* /mnt/externalHDD/
if its a FAT32 drive
Code:

sudo mount -t vfat /dev/* /mnt/externalHDD/
if its a Linux drive
Code:

sudo mount -t ext3 /dev/* /mnt/externalHDD/
Under Linux the -t could also be reiser or ext2 w/e you chose when you formated the disk

TITiAN 03-21-2009 02:20 PM

elsheepo: the -t switch is not really necesairy on these file system types. mount autodetects these (so are my experiences).

elsheepo 03-21-2009 02:22 PM

Indeed, thats right, mount dose auto detect as long as you leave out -t. Thanks :)

stratotak 03-21-2009 03:55 PM

Quote:

Originally Posted by Hardcor3 (Post 3483345)
To elsheepo:
I get;
Code:

mount: you must specify the filesystem type
To stratotak:
I'm not sure how to get gnome-volume-manager installed. Would it be
Code:

apt-get install gnome-volume-manager
?

Thanks to all so far.

Yes..
Code:

strat@frostbite:~$ su
Password:
frostbite:/home/strat# aptitude install gnome-volume-manager
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Reading extended state information     
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done       
The following NEW packages will be installed:
  gnome-app-install{a} gnome-volume-manager gstreamer0.10-plugins-ugly{a}
  gthumb{a} gthumb-data{a} libepc-1.0-1{a} libepc-ui-1.0-1{a} libgalago3{a}
  libgmyth0{a} libgtkhtml2-0{a} libiptcdata0{a} libopenraw1{a}
  libopenrawgnome1{a} libsidplay1{a} lsb-release{a} python-apt{a}
  python-gdata{a} python-gdbm{a} python-gst0.10{a} python-gtkhtml2{a}
  python-gtkmozembed{a} python-sexy{a} python-xdg{a} totem{a}
  totem-common{a} totem-gstreamer{a} totem-mozilla{a} totem-plugins{a}
0 packages upgraded, 28 newly installed, 0 to remove and 3 not upgraded.
Need to get 10.4MB of archives. After unpacking 33.0MB will be used.
Do you want to continue? [Y/n/?] y


TITiAN 03-21-2009 04:07 PM

oh BTW gnome-volume-manager is for gnome, other desktop environments should have other volume-managers....

elsheepo 03-21-2009 04:15 PM

Okay, after some research I think I've got it. If you could please run this command
Code:

sudo tail -f /var/log/messages
and plug in your external HDD, then copy/paste the output here please. With that information we can fill in the * in the mount command
Code:

sudo mount -a /dev/sd* /mnt/externalHDD/
where /dev/sd* = output from tail /var/log/messages
most likely, assuming you have no other SCSI devices in your system it should be /dev/sda1

Hardcor3 03-21-2009 06:21 PM

Code:

Mar 21 14:56:02 chloe kernel: [84483.503896] usb 2-1: Manufacturer: Western Digital
Mar 21 14:56:02 chloe kernel: [84483.503900] usb 2-1: SerialNumber: 57442D574341554830333031343331
Mar 21 14:56:07 chloe kernel: [84488.504211] scsi 2:0:0:0: Direct-Access    WD      5000AAV External 1.75 PQ: 0 ANSI: 4
Mar 21 14:56:07 chloe kernel: [84488.516220] sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
Mar 21 14:56:07 chloe kernel: [84488.521290] sd 2:0:0:0: [sda] Write Protect is off
Mar 21 14:56:07 chloe kernel: [84488.526258] sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
Mar 21 14:56:07 chloe kernel: [84488.535290] sd 2:0:0:0: [sda] Write Protect is off
Mar 21 14:56:07 chloe kernel: [84488.535320]  sda: sda1 sda2 < sda5 >
Mar 21 14:56:07 chloe kernel: [84488.576663] sd 2:0:0:0: [sda] Attached SCSI disk
Mar 21 19:17:42 chloe kernel: [100183.736067] usb 2-1: USB disconnect, address 5
Mar 21 19:18:07 chloe kernel: [100208.528018] usb 2-1: new full speed USB device using uhci_hcd and address 6
Mar 21 19:18:07 chloe kernel: [100208.668004] usb 2-1: configuration #1 chosen from 1 choice
Mar 21 19:18:07 chloe kernel: [100208.688786] scsi3 : SCSI emulation for USB Mass Storage devices
Mar 21 19:18:07 chloe kernel: [100208.697211] usb 2-1: New USB device found, idVendor=1058, idProduct=1100
Mar 21 19:18:07 chloe kernel: [100208.697226] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 21 19:18:07 chloe kernel: [100208.697231] usb 2-1: Product: My Book       
Mar 21 19:18:07 chloe kernel: [100208.697235] usb 2-1: Manufacturer: Western Digital
Mar 21 19:18:07 chloe kernel: [100208.697239] usb 2-1: SerialNumber: 57442D574341554830333031343331
Mar 21 19:18:12 chloe kernel: [100213.700419] scsi 3:0:0:0: Direct-Access    WD      5000AAV External 1.75 PQ: 0 ANSI: 4
Mar 21 19:18:12 chloe kernel: [100213.720140] sd 3:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
Mar 21 19:18:12 chloe kernel: [100213.722472] sd 3:0:0:0: [sda] Write Protect is off
Mar 21 19:18:12 chloe kernel: [100213.727446] sd 3:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
Mar 21 19:18:12 chloe kernel: [100213.730456] sd 3:0:0:0: [sda] Write Protect is off
Mar 21 19:18:12 chloe kernel: [100213.730485]  sda: sda1 sda2 < sda5 >
Mar 21 19:18:12 chloe kernel: [100213.769828] sd 3:0:0:0: [sda] Attached SCSI disk



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