LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-05-2008, 11:46 PM   #1
benzslr123
LQ Newbie
 
Registered: Oct 2008
Posts: 11

Rep: Reputation: 0
mounting HDD troubles... what am i doing wrong?


bt ~ # ls /dev/hdb*
/dev/hdb /dev/hdb1 /dev/hdb2 /dev/hdb3
bt ~ # mount /dev/hdb
mount: can't find /dev/hdb in /etc/fstab or /etc/mtab


what i am doing incorrectly? why can't i mount this harddrive?
 
Old 11-06-2008, 12:01 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by benzslr123 View Post
bt ~ # ls /dev/hdb*
/dev/hdb /dev/hdb1 /dev/hdb2 /dev/hdb3
bt ~ # mount /dev/hdb
mount: can't find /dev/hdb in /etc/fstab or /etc/mtab


what i am doing incorrectly? why can't i mount this harddrive?
If you want to use abbreviated mount commands like that you posted, you need to define a line for each mountable device in your fstab.

Another thing: you don't usually mount hdb, that's the whole device and you usually don't format the whole block device. You format single partitions, and they might even have different file systems. So you have to mount partitions individually (hdb1, hdb2 or hdb3). To be mountable, a partition has to be correctly formated using one of the file systems that are supported by your kernel.

A tipical line in fstab looks like this:

Code:
/dev/hdb1 /mnt/whatever ext3 defaults 0 1
Six (and exactly six) fields separated by spaces. You can see the meaning of each field on the fstab man page.

I will just say that the first field is your partition or disk, the second is the mount point (a directory that must exist), and the third is the filesystem type for that partition. For more info:

Code:
man fstab
man mount
 
Old 11-06-2008, 03:46 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
Originally Posted by benzslr123 View Post
bt ~ # mount /dev/hdb
mount: can't find /dev/hdb in /etc/fstab or /etc/mtab


what i am doing incorrectly? why can't i mount this harddrive?
Make a mount point in the directory tree to view the contents of the partition you want to access. Then mount it. Example below:
Code:
mkdir /drive2
mount /dev/hdb1 /drive2
Sometimes bash will come back and say you need to specify the format type in the command, below is an example of an NTFS file system:
Code:
mkdir /drive2
mount -t ntfs /dev/hdb1 /drive2
 
  


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
Grub on wrong hdd mjmeche Linux - Newbie 2 12-06-2007 09:34 AM
what's wrong with my HDD ccmilan Linux - General 3 05-26-2005 04:26 AM
Something's wrong with my HDD jogurt666 Linux - General 3 01-31-2005 11:40 AM
Is there something wrong with my hdd? dhbiker Linux - Hardware 2 12-10-2003 04:05 PM
Mounting HDD vs. Mounting Filesystem snailophone Linux - Hardware 4 08-12-2003 12:00 PM


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