LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-20-2007, 11:22 AM   #1
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 157

Rep: Reputation: 15
Viewing (and Mounting) Another Linux Drive


Hello.

I have two hard disks running in drawers connected to the motherboard. The drawers are for convenience in changing hard drives. They are not USB or other removable media. It's the same as having two hd's in the machine, except that I don't have to open the box to change hard drives.

Typically, I have a Windows drive in one drawer and a Linux one (Ubuntu) in the other. I boot into the one I want by changing the boot sequence in CMOS.

Linux sees my drives as follows:

hda Windows (drawer 1)
hdb CD ROM
hdc Linux (drawer 2)

If I'm in Linux, I have no trouble mounting the Windows drive. If I put a different Windows hd in drawer 1, I can mount it with the usual commands.

Now I have two Linux hard drives. In keeping with the above arrangement, I installed Linux on both of these hard disks while they were in drawer 2 (hdc1) and were the only drives in the machine. Jumpers are set for Master or Single.

Now, while booted into the Linux drive on hdc1 (drawer 2), I want to put the other Linux drive in drawer 1 (hda1) and mount it. However, the drive I'm in doesn't even see it. Trying various mount commands, including -a or designating an ext3 file system, I'm simply told there's no drive there.

I assume that Linux is looking for the drive's file system on hdc1 because it was installed there.

Seems strange I can see Windows but not Linux.

Is there anything I can do to make the drive in drawer 1 (hda1) visible and mountable from the drive in drawer 2 (hdc1), preferably without making irreversible changes that will prevent me from booting it again in drawer 2 (its proper home)?

Any help appreciated.

Thanks

Last edited by Ingla; 01-20-2007 at 11:40 AM.
 
Old 01-20-2007, 12:56 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
There will be no problem mounting the drive from its position in the first drawer. It also won't mess up the drive in any way. The numbered partitions will stay consistent, but the letter of the drive will change based on where it is. If the running linux is hdc, then the other disk should be hda. You may need to pass the filesystem parameter to mount, something like

Code:
mount -t ext3 /dev/hda1 /mnt/disk1            (or)
mount -t reiserfs /dev/hda1 /mnt/disk1
Peace,
JimBass

Last edited by JimBass; 01-20-2007 at 12:59 PM.
 
Old 01-20-2007, 02:36 PM   #3
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 157

Original Poster
Rep: Reputation: 15
Thanks for the reply.

I opened a terminal and typed (as root): mount -t /dev/hda1 /mnt/disk1

I got: mount point /mnt/disk1 does not exist.

A minute later, the same command (in a new terminal) got me this:

----------------------------------------------------------------------

root@ubuntu:/home/aba# mount -t /dev/hda1 /mnt/disk1
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
A device can be given by name, say /dev/
hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
root@ubuntu:/home/aba#
-----------------------------------------------------------------------

I tried a couple more times. Sometimes I get the first output ... sometimes the second.

Any idea what's wrong?

Thanks.
 
Old 01-20-2007, 02:53 PM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Yeah man, that is a simple problem to get around. You should trust the output - mount point /mnt/disk1 does not exist.

Linux won't lie to you. Normally, nothing exists inside of /mnt, except maybe cdrom, dvdrom, or some preset thing based on your install. Before attempting to mount, again as root, do:
Code:
mkdir /mnt/disk1
Then try to mount the disk.

Peace,
JimBass
 
Old 01-20-2007, 03:36 PM   #5
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 157

Original Poster
Rep: Reputation: 15
Duh!! That was smart of me! Getting late around here. But there's still something wrong.

I made the directory, but when I try to mount, I'm getting this:

----------------------------------------------------------
root@aba:/home/aba# mount -w -t ext3 /dev/hda1 /mnt/disk1
mount: special device /dev/hda1 does not exist
root@aba:/home/aba#
----------------------------------------------------------

The disk is in there and I've tried reversing the drawers in case there was something funny with the pins in one of them.

Any idea what the problem is?
 
Old 01-20-2007, 03:41 PM   #6
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 157

Original Poster
Rep: Reputation: 15
By the way, the file browser DOES see the other disk!
 
Old 01-20-2007, 03:46 PM   #7
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Well if the browser sees, the disk, what location is it in? If it is an ide hard drive, it has to be either hda, hdb, hdc, or hdd. You said the main drive is hdc, so that's out. Please tell me the location your browser says it is in, and also post the contents of the /etc/mtab file.

Peace,
JimBass
 
Old 01-20-2007, 04:16 PM   #8
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 157

Original Poster
Rep: Reputation: 15
Thank you very much. You pointed me in the right direction and the problem is solved ... mounted OK.

What happened? The drive designation has been changed to hdb instead of hda.

Once I couldn't boot into Linux. I got output that the file system couldn't be found. On a forum, one person suggested that it had to be a jumper issue. I denied that it could be, as I'm the only Linux user here and had never changed any jumpers. I wouldn't even check.

After going around and around for hours, I finally pulled the disk and - guess what? - a jumper that didn't belong there. I took it out and voila! It seems my son (a straight Windows guy) had been fooling around with the hard drives and admitted to having stuck a jumper in. Why? Not sure he knew.

This time, I think I know. A couple of days ago I asked him to completely dismantle the machine and clean it with spray to remove the dust which was slowing me to a crawl (that happens here). I know he reversed my network cards when he put the box back together. I guess he moved around some cable connections too.

Just goes to show ya ... don't assume anything! As you say, Linux isn't lying.

Thank you very much for your help.

Be well.
 
Old 01-20-2007, 04:28 PM   #9
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
No problem man. Glad you got things worked out. For future reference the way linux decides what drive is what is like this -

Most motherboards have 2 IDE sockets, each of which can have 2 drives off of it. They sometimes color code things. The blue socket is the main connection, and the other color is secondary. On the cables doing the connection, usually black is primary, and grey is secondary.

Off the blue socket you have the potential for hda and hdb to exist. Those can be hard drives, or ROM drives, it doesn't matter to linux. The secondary socket on the board gives hdc and hdd. That is part of what trips up people installing on sata drives. Somebody with some linux knowledge might know that on another box, the DVDROM was /dev/hdc, and expect it to be that again. But since a sata install has no other hd drives (sata are sd), it is possible for the DVDROM and other ROM drives to be hda and hdb. It all just comes down to the order they are plugged into the motherboard. If you install and find the DVDROM is /dev/hdc but you wanted it to be /dev/hda, then just change fstab, shutdown, change the plug into the mobo, and you'll have it at the drive you want.

Peace,
JimBass

Last edited by JimBass; 01-20-2007 at 04:29 PM.
 
  


Reply

Tags
disk, linux, mount, view


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
Mounting a linux drive in Windows alrymala Linux - Networking 2 10-27-2006 08:14 AM
viewing my linux drive from XP Doug.Gentry Linux - Networking 8 01-24-2005 03:57 PM
Mounting Linux drive from Windows 9nine9 Linux - General 4 12-28-2004 12:18 PM
mounting and viewing network shares GraemeK Linux - Networking 4 01-27-2004 03:23 AM
I need help with mounting and viewing hd B.A. Babrukis Red Hat 5 10-21-2003 05:19 AM


All times are GMT -5. The time now is 06:51 AM.

Main Menu
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