LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-26-2011, 03:34 PM   #1
firefighteres755@yahoo.c
LQ Newbie
 
Registered: Apr 2011
Location: Copperas Cove, TX
Distribution: Ubuntu 10.10
Posts: 5

Rep: Reputation: 0
Question Trying to manually mount second hard drive in Ubuntu 10.10


Ok, I had installed this drive as a slave drive yesterday, and it had worked perfectly, mounted good, etc., etc.

Today, I fire up ol' trusty, and my slave drive doesn't show in either "Places," "System Monitor," or "Disk Usage Analyzer." It does, however, show up in BIOS and "Gparted Partition Editor." A mounting option isn't present in "Places" as it was yesterday.

If I need to manually mount it or whatever, would someone please list the steps I need to take to get my HD back?

My main harddrive is a Western Digital 160 Gb IDE and is listed as /dev/sda. My slave is a Seagate 80 Gb SATA and is listed as /dev/sdb

Thank you much!
 
Old 04-26-2011, 03:44 PM   #2
Velotrol
LQ Newbie
 
Registered: Apr 2011
Location: Rio, Brazil
Distribution: Gentoo
Posts: 15

Rep: Reputation: Disabled
First of all, you can try the command fdisk -l and see if your disk is recognized. If so, post the contents of your /etc/fstab here. Or else you can edit by yourself.

Regards.
 
Old 04-26-2011, 03:49 PM   #3
vtel57
Member
 
Registered: Jul 2006
Location: Tampa, FL, USA
Distribution: Slackware64
Posts: 912

Rep: Reputation: 103Reputation: 103
Well, for starters, let's correct your terminology. A drive connected to the SATA channel on your motherboard is not a master nor a slave of anything. SATA drives do not work that way. Your WD 160Gb may be a master on its EIDE channel, though.

Moving on... you don't mount entire drives in Linux. You mount partitions. If you want to mount a certain partition on that SATA drive, you need to know the device and the partition number. You can determine this info by using this command from Terminal in Ubuntu:

Code:
sudo fdisk -l
This will list the drives/partitions on your system. Let's say that you want to mount the 1st partition of that SATA drive. If the SATA drive is /dev/sdb as per fdisk -l results, then you would mount the 1st partition like this:

Code:
sudo mount /dev/sdb1 /mnt
You're telling the operating system that you want to mount the 1st partition of the 2nd drive in the /mnt directory. You can now navigate, using Nautilus or your fav file manager app, to the /mnt directory. You will see the contents of the SATA drive's 1st partition there at this point.

If you want this to happen automatically when you boot up, you'll need to add an entry for that drive/partition to the /etc/fstab file.

See HERE for more info on auto-mounting in Ubuntu.

Have fun!
 
1 members found this post helpful.
Old 04-26-2011, 06:02 PM   #4
firefighteres755@yahoo.c
LQ Newbie
 
Registered: Apr 2011
Location: Copperas Cove, TX
Distribution: Ubuntu 10.10
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you both for your replies.

Velotrol, I did what you suggested, and got no results. I tried it with the "sudo" command and got this (the 80 gb drive is the one I'm trying to get working.):

Quote:
tomas@tomas-Compaq-PC:~$ sudo fdisk -l
[sudo] password for tomas:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004c88a

Device Boot Start End Blocks Id System
/dev/sda1 * 1 19338 155330560 83 Linux
/dev/sda2 19339 19458 957441 5 Extended
/dev/sda5 19339 19458 957440 82 Linux swap / Solaris

Disk /dev/sdb: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000022d4

Device Boot Start End Blocks Id System
/dev/sdb1 1 9182 73750528 83 Linux
I had partitioned the drive to see if it helped, then tried to mount it using the command provided by vtel57, and got this:

Quote:
tomas@tomas-Compaq-PC:~$ sudo mount /dev/sdb1 /mnt
mount: /dev/sdb1 already mounted or /mnt busy
mount: according to mtab, /dev/sdb1 is already mounted on /mnt
Drive still does not show in "Places." I tried to find Nautilus and I don't appear to have it. I looked in the Ubuntu Software center, and there were 3 applications by that name, but none of them appear to be a file manager app.

Sorry, this is all very new to me...I had used MS for years, and only switched to Ubuntu last week...been much happier so far, just need to get used to the differences and new ways of doing things.
 
Old 04-26-2011, 06:57 PM   #5
vtel57
Member
 
Registered: Jul 2006
Location: Tampa, FL, USA
Distribution: Slackware64
Posts: 912

Rep: Reputation: 103Reputation: 103
It's been a while since I used Ubuntu, Tomas. I may not be able to help you that much. The reason you got the error when you tried to use my method to mount the device is because it was already mounted. It was done automatically by Ubuntu. Just because a device is mounted does not mean it will show in the Places menu, I don't think.

Please be patient. Someone with more Ubuntu specific knowledge will come along and assist you with this issue.

Buena suerte!

~Eric
 
Old 04-26-2011, 07:05 PM   #6
firefighteres755@yahoo.c
LQ Newbie
 
Registered: Apr 2011
Location: Copperas Cove, TX
Distribution: Ubuntu 10.10
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by vtel57 View Post
It's been a while since I used Ubuntu, Tomas. I may not be able to help you that much. The reason you got the error when you tried to use my method to mount the device is because it was already mounted. It was done automatically by Ubuntu. Just because a device is mounted does not mean it will show in the Places menu, I don't think.

Please be patient. Someone with more Ubuntu specific knowledge will come along and assist you with this issue.

Buena suerte!

~Eric
Thank you very much for trying...it's farther than I was before!!
 
Old 04-26-2011, 07:11 PM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Reply

Hi there,

Quote:
tomas@tomas-Compaq-PC:~$ sudo mount /dev/sdb1 /mnt
mount: /dev/sdb1 already mounted or /mnt busy
mount: according to mtab, /dev/sdb1 is already mounted on /mnt
Try this:

sudo umount /mnt
sudo mount /dev/sdb1 /media
 
Old 04-26-2011, 07:29 PM   #8
firefighteres755@yahoo.c
LQ Newbie
 
Registered: Apr 2011
Location: Copperas Cove, TX
Distribution: Ubuntu 10.10
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by T3RM1NVT0R View Post
Hi there,



Try this:

sudo umount /mnt
sudo mount /dev/sdb1 /media
Hi T3RM1NVT0R...thanks for your help. This is what I got...

Quote:
tomas@tomas-Compaq-PC:~$ sudo umount /mnt
tomas@tomas-Compaq-PC:~$ sudo mount /dev/sdb1 /media
mount: /dev/sdb1 already mounted or /media busy
mount: according to mtab, /dev/sdb1 is already mounted on /media
tomas@tomas-Compaq-PC:~$
 
Old 04-26-2011, 07:43 PM   #9
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 183
Blog Entries: 1

Rep: Reputation: 25
You should quit with the mount umount. The thing is working just fine. What you need to Know and it is the only thing you need to know in this particular situation is how to have it show up in places. Well it may not just do it automagically. Read the Ubuntu users guide or go on the Ubuntu site and just read around and you will discover the solution. If not it doesn't mean you cannot use the drive. In your file manager /media is at the root so click into media and look around at what is there. You will probably see stuff like cdrom hd0 hd1 flash usb and if you try one of the ones that is marked as hd? something there will be your disk.

David
 
1 members found this post helpful.
Old 04-26-2011, 07:51 PM   #10
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Quote:
tomas@tomas-Compaq-PC:~$ sudo umount /mnt
tomas@tomas-Compaq-PC:~$ sudo mount /dev/sdb1 /media
mount: /dev/sdb1 already mounted or /media busy
mount: according to mtab, /dev/sdb1 is already mounted on /media
tomas@tomas-Compaq-PC:~$
A bit strange but did you try to reboot your system. If not then give it a try. After rebooting do the following steps:

1. Create a directory on / with any name say test. [mkdir /test or cd / then mkdir test]
2. I am assuming that there is no entry in /etc/fstab for this partition. So go with the following command:

mount /dev/sdb1 /test
3. Even if the above command fails paste the output of df -h in this thread.

Note Do not make any changes to /etc/fstab until you are sure that the partition will get mounted 100% as sometimes it create problem with the booting of the system.
 
Old 04-26-2011, 08:04 PM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Ubuntu disk utility should be able to see it and tell if it's been partitioned.

After I posted I saw this.

Quote:
I had partitioned the drive to see if it helped, then tried to mount it using the command provided by vtel57
If you were able to partition it automatically is mounted.
post of
Quote:
cat /etc/fstab
or
Quote:
sudo cat /etc/fstab

Last edited by EDDY1; 04-26-2011 at 08:09 PM.
 
Old 04-26-2011, 08:32 PM   #12
firefighteres755@yahoo.c
LQ Newbie
 
Registered: Apr 2011
Location: Copperas Cove, TX
Distribution: Ubuntu 10.10
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by T3RM1NVT0R View Post
A bit strange but did you try to reboot your system. If not then give it a try. After rebooting do the following steps:

1. Create a directory on / with any name say test. [mkdir /test or cd / then mkdir test]
2. I am assuming that there is no entry in /etc/fstab for this partition. So go with the following command:

mount /dev/sdb1 /test
3. Even if the above command fails paste the output of df -h in this thread.

Note Do not make any changes to /etc/fstab until you are sure that the partition will get mounted 100% as sometimes it create problem with the booting of the system.
Well, I rebooted, and the primary partition showed up in "Places" and is accessible. Though there is a "Lost & Found" folder that wasn't there when it was working yesterday. This folder is inaccessible...access denied. Do I need to continue with these steps to keep this drive accessible?
 
Old 04-26-2011, 08:45 PM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
According to the error messages, the drive is mounted on /mnt/. You will want to change the mount point so you are still free to use /mnt/ later. Edit the entry in /etc/fstab so it mounts when you boot up (for a fixed drive).

Don't use /media/ as a mount point. Automatically mounted drives are mounted their.
Don't use /mnt/ as a mount point. Create a subdirectory under /mnt/ and use that as a mount point.

Use a descriptive name for the directory, which reflects what the contents are. Or give it a generic name such as /mnt/bdrive/, but use descriptive names for the subdirectories.

You can create symbolic links in your HOME directory to point to directories on it. For example:

$HOME/videos -> /mnt/bdrive/Videos/
$HOME/music -> /mnt/bdrive/Music/

Now you can access it from your file manager, the same way for videos/ and music/ as you would for Documents/ and Downloads/.
 
Old 04-26-2011, 08:48 PM   #14
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Hi there,

Did you get your /dev/sdb1 partition mounted ok? If yes then you can continue with the following steps:

If /dev/sdb1 is accessible then you can put below line in /etc/fstab:

/dev/sdb1 /test ext3 defaults 1 2

Where:

/dev/sdb1 will be the partition /test will be the directory on which it will get mounted, ext3 will be the file system if the file system type is different then make sure you put the appropriate file system type in /etc/fstab, defaults will be the the default operation allowed on the partition.

Note:Make sure you take a backup of /etc/fstab file before making any changes to it. Use the following command to back it up on your / cp /etc/fstab /. Or just copy it somewhere in Windows style :-) Also there is a tab between /dev/sdb1 /test ext3 defaults 1 2. Make sure you put it with a tab for easy readability.

Last edited by T3RM1NVT0R; 04-26-2011 at 08:50 PM.
 
Old 04-26-2011, 08:53 PM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Quote:
Originally Posted by firefighteres755@yahoo.c View Post
Well, I rebooted, and the primary partition showed up in "Places" and is accessible. Though there is a "Lost & Found" folder that wasn't there when it was working yesterday. This folder is inaccessible...access denied. Do I need to continue with these steps to keep this drive accessible?
I spent too much time composing my most, while preparing supper, so my response came after your last post.

I'd recommend using a directory not under the root directory /. If it is accesses by normal users, like yourself, create a directory under /home/ or /mnt/ for it.

You are almost there. The "lost&found" directory is normal. It is created when you format a drive. If during a filesystem check, a file is found but there is no directory entry for it, it is moved to lost & found/ and given a number for the name.

You need to change the ownership and permissions of the mounted directory. I repeat. Change permissions after it is mounted.

Suppose it is mounted on /home/bdrive/. Your username is fman, and you want private ownership of it.
sudo chown fman /home/bdrive
sudo chmod u=rwx,go= /home/bdrive
 
  


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
Power went out and can't mount Hard Drive on Ubuntu? LinuxNewbMartyr Linux - Newbie 6 07-06-2010 07:41 AM
Have to manually Mount Hard Drive Partitions on every boot moshebagelfresser Linux - Hardware 4 01-14-2009 12:29 PM
How do I mount a second hard drive? (PC/OS : Ubuntu) Crystal_Bits Linux - Newbie 3 12-23-2008 12:34 PM
Mount problems for hard drive partition in ubuntu 6.06 krishghosh Ubuntu 3 03-29-2007 05:03 AM
Ubuntu will not mount my other hard drive Trance56k Linux - Newbie 6 02-26-2005 02:08 PM


All times are GMT -5. The time now is 02:36 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