LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-17-2007, 05:56 AM   #1
pjmaggitti
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
Mounting an External Hard Drive Manually Using Terminal


What terminal command should I use to mount an external hard drive that Ubuntu 6.10 did not recognize during installation? I understand that I should use either /mnt/hdb1 or /media/hdb1, but do I just open terminal and plop one or the other of those commands into the first blank space, or do I need to be at a specific location in terminal to which I do not know how to navigate as yet? Right now when I open terminal, what I see is -- pjm@pjm-desktop:~$ What do I do after that?

Thank you for your patience, you're going to need it.

Phil
 
Old 02-17-2007, 06:56 AM   #2
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
Just open a terminal and type:
Code:
mount /dev/<insert device> /mnt/hdb1
You don't have to be anywhere in the terminal. You could be in /usr/share/doc/xxx/docs/html for all the shell cares. As long as you put a leading "/" on it, it will know to go to the top of the heirarchy and you won't have a problem.
 
Old 02-17-2007, 07:13 AM   #3
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
First un-plug this external hard drive from the system (this is a USB hard drive correct??) Then plug the external drive back in. As root or equivalent check the tail end of /var/log/messages;

tail /var/log/messages

Example:
Code:
$ sudo tail /var/log/messages
Feb 17 08:00:13 Aspire5000 kernel: scsi 5:0:0:0: Direct-Access     WDC WD80 0VE-75HDT1       0000 PQ: 0 ANSI: 0
Feb 17 08:00:13 Aspire5000 kernel: SCSI device sdc: 156301488 512-byte hdwr sectors (80026 MB)
Feb 17 08:00:13 Aspire5000 kernel: sdc: Write Protect is off
Feb 17 08:00:13 Aspire5000 kernel: sdc: assuming drive cache: write through
Feb 17 08:00:13 Aspire5000 kernel: SCSI device sdc: 156301488 512-byte hdwr sectors (80026 MB)
Feb 17 08:00:13 Aspire5000 kernel: sdc: Write Protect is off
Feb 17 08:00:13 Aspire5000 kernel: sdc: assuming drive cache: write through
Feb 17 08:00:13 Aspire5000 kernel:  sdc: sdc1
Feb 17 08:00:13 Aspire5000 kernel: sd 5:0:0:0: Attached scsi disk sdc
Feb 17 08:00:13 Aspire5000 kernel: sd 5:0:0:0: Attached scsi generic sg2 type 0
As you can see from the example the USB hard drive is seen as device sdc and has one partition (sdc1) so this external hard drive and partition is device: /dev/sdc1

To mount this device as root or equivalent type something like;

mkdir /mnt/USB
mount -t auto /dev/sdc1 /mnt/USB -rw

The first command creates the location to mount the device to, the second mounts the device to this location (mountpoint) as read/writeable. you should be able to access the directories and files by looking in this location /mnt/USB, for example; ls -al /mnt/USB

To un-mount the device type something like; umount /mnt/USB

See the manpages for the details and additional information;

man mount
man tail
man mkdir
man umount
 
Old 02-17-2007, 07:57 AM   #4
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
Oh, just so you know if you get errors about "the device being busy" when you try to unmount it, make sure you aren't in the directory where you mounted it. For example, if I mount my USB pendrive to /mnt, and I want to unmount it, I have to leave /mnt before I can unmount the drive.
 
  


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
How Do I Unrar From An External Hard Drive in Terminal? Anthony1uk Linux - Newbie 2 07-28-2006 09:25 AM
Mounting my external hard drive... Azzath Linux - Hardware 8 02-26-2005 03:27 AM
mounting an external hard drive adin Linux - Hardware 1 01-04-2005 04:18 AM
external hard drive mounting blahJake Debian 3 04-02-2004 06:30 PM
Mounting external hard drive gadgetboy Linux - Newbie 3 02-02-2003 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:52 PM.

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