LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Viewing (and Mounting) Another Linux Drive (https://www.linuxquestions.org/questions/linux-hardware-18/viewing-and-mounting-another-linux-drive-521184/)

Ingla 01-20-2007 11:22 AM

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

JimBass 01-20-2007 12:56 PM

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

Ingla 01-20-2007 02:36 PM

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.

JimBass 01-20-2007 02:53 PM

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

Ingla 01-20-2007 03:36 PM

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?

Ingla 01-20-2007 03:41 PM

By the way, the file browser DOES see the other disk!

JimBass 01-20-2007 03:46 PM

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

Ingla 01-20-2007 04:16 PM

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.

JimBass 01-20-2007 04:28 PM

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


All times are GMT -5. The time now is 08:47 AM.