LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-15-2009, 10:23 PM   #1
trainee
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 142

Rep: Reputation: 16
External hard drive, how do I mount it?


This is a newbie question, but I have to ask here cause I have never had a chance to touch an external hard drive before.

I've just got an external hard drive, brand new (never plugged in any Windows machine). How should I mount it? Do I treat it like any USB stick or do I have to add something to the file /etc/fstab to mount it?

Thanks
 
Old 08-15-2009, 10:52 PM   #2
micxz
Senior Member
 
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Plug it in. Watch dmesg to get the device name then you can format it or try to mount it right off. Once you get it mounted the way you like add an entry to fstab then you can mount it easier in the future.
 
Old 08-15-2009, 11:04 PM   #3
trainee
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 142

Original Poster
Rep: Reputation: 16
Thank you.
 
Old 08-16-2009, 03:15 AM   #4
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
File managers using HAL should be able to mount it without using fstab. For example Thunar (of XFCE) will do that, the device should get mounted under /media (this should work on Slack 12.2).
 
Old 08-16-2009, 03:28 AM   #5
rob.rice
Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 795

Rep: Reputation: 119Reputation: 119
do a "cat /etc/mtab"
from slackware-12.2 that I know of running KDE-3.5 just plug it in and IF it has a file system slackware understands watch the magic happen
then do a "cat /etc/mtab" and make note of where /dev/??? is the hard drive will be auto mounted to /media/something
 
Old 08-16-2009, 03:33 AM   #6
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,987

Rep: Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555
You can also use fdisk -l (as root) to see what the device node is.
 
Old 08-16-2009, 06:25 AM   #7
/dev/me
Member
 
Registered: May 2008
Distribution: Slackware 13
Posts: 116

Rep: Reputation: 20
Quote:
Originally Posted by trainee
How should I mount it? Do I treat it like any USB stick or do I have to add something to the file /etc/fstab to mount it?
Yeah, treat it like a USB stick. It acts the same when it comes to mounting. Adding things to fstab isn't really necessary. It makes life easier, that's true.

When you plug it in a Windows machine, you'll notice Windows puts system files, directories and executables on the device. Windows hides these, but *nix doesn't.
 
Old 08-16-2009, 09:02 AM   #8
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,520

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Just one thing to watch for based on recent experience with a USB connected external hard drive. This drive was pre-formatted with the NTFS file system, so to write to it requires mounting with the ntfs-3g file system.
 
Old 08-16-2009, 09:22 AM   #9
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware
Posts: 299

Rep: Reputation: 50
Quote:
Originally Posted by trainee View Post
This is a newbie question, but I have to ask here cause I have never had a chance to touch an external hard drive before.

I've just got an external hard drive, brand new (never plugged in any Windows machine). How should I mount it? Do I treat it like any USB stick or do I have to add something to the file /etc/fstab to mount it?

Thanks
To mount it, it must be already formatted (vfat, ntfs, ...)
Assuming it's formatted

1. find out the device name by typing in a console
cat /proc/partitions

for instance in my machine I get this
cat /proc/partitions
major minor #blocks name

8 0 312571224 sda
8 1 73400953 sda1
.....
8 9 13607023 sda9

Here I don't have an external usb disk plugged in. But if I had
I should see something like

.... .... sdb
.... .... sdb1
.... ............

as you see the last column tells you the device name and
the partition name (in my case if I wanted to mount the first
partition of the first external hard drive
I would use /dev/sdb1 as the partition name)

so, assuming it's ntfs-formatted and I want to mount it read and write
I'll do this (as root)

mkdir -p /mnt/sdb1; ntfs-3g /dev/sdb1 /mnt/sdb1

(mkdir -p /mnt/sdb1 is for just in case /mnt/sdb1 doesn't exist)

if it's vfat-formatted

mount /dev/sdb1 /mnt/sdb1

would mount it read and write
 
Old 08-18-2009, 07:08 PM   #10
Satchel
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
I am a newbie newbie, only working on Linux for about a week. Anyway, I have been using an external hard drive to transfer data from my Windows computer to my Linux one, since the Linux isn't connected to a network. This hasn't been a problem so far and I haven't had to mount it or anything. I have just been able to copy and paste files from it. Until today. Gah! There is one file on the drive I didn't think I needed but realized today I did, but when I connected the drive to the Linux computer, the drive comes up in the 'Computer' folder, but I can't open it anymore. What is up? I keep checking my permissions but it looks okay. What is the difference?
 
Old 08-18-2009, 07:21 PM   #11
Nille_kungen
Member
 
Registered: Jul 2005
Posts: 216

Rep: Reputation: 44
Satchel try to mount it manually from an terminal and see if you get any errors also check dmesg for errors.
What filesystem is it on the drive and have you unmounted the drive before you unplug it?
 
Old 08-18-2009, 08:36 PM   #12
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,451
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Hi,

Welcome to LQ!

Quote:
Originally Posted by Satchel View Post
I am a newbie newbie, only working on Linux for about a week. Anyway, I have been using an external hard drive to transfer data from my Windows computer to my Linux one, since the Linux isn't connected to a network. This hasn't been a problem so far and I haven't had to mount it or anything. I have just been able to copy and paste files from it. Until today. Gah! There is one file on the drive I didn't think I needed but realized today I did, but when I connected the drive to the Linux computer, the drive comes up in the 'Computer' folder, but I can't open it anymore. What is up? I keep checking my permissions but it looks okay. What is the difference?
It would have been better to create a new thread with your problem rather then hi-jack this one.

Whenever you post a query please try to provide information that will aid the helper to diagnose your problem.

As 'Nille_kungen' posted for some information. I would add; distribution, kernel in use and what did you mean by;

Quote:
This hasn't been a problem so far and I haven't had to mount it or anything. I have just been able to copy and paste files from it.
How did you copy the information when the 'Linux' was up? 'dd' ? Or did you allow the OS to detect via udev&HAL mount. Then do your copy?

I suspect a filesystem corruption on the external hdd.
 
Old 08-19-2009, 12:38 PM   #13
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 492
Blog Entries: 1

Rep: Reputation: 55
I have just found halrv. In CLI or WMs that do not mount media for you, it it does a fine job. It even includes a SlackBuild.
Regards,
Bill
 
  


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
Can't mount external hard drive a_m0d Linux - Hardware 4 07-08-2009 08:44 PM
Cannot mount external hard drive thisObject Linux - Software 4 12-07-2006 12:53 AM
cannot mount external hard drive vash331 Linux - Newbie 1 12-31-2005 08:19 AM
Can't mount external hard drive...HELP! Stevetgn Linux - Hardware 4 10-18-2005 08:38 PM
can't mount fs on external hard drive fatblueduck Linux - General 11 06-10-2005 04:03 PM


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