Dual booting of 2 linux hard drives
I have 2 Maxtor hard drives installed in my PC. The PC is a 586
new standard AT type motherboard, nothing special. The bootable hard drive (primary master) has a new working installation of redhat 7.1. The second drive (primary slave) has redhat 7.0 installed and working. When the PC boots it does recognize in the standard PC screen that lists how many drives, ram, serial & parallel ports etc. both drives are listed with the correct drive size, etc. When the Master drive boots it lists hda for the primary drive and hdb for the slave. I cannot mount hdb and gain access from the command line to access directories and/or files. Both drives in lilo.conf list boot=/dev/hda and the files are almost identical. So if command line access doesn't work maybe dual booting will. thanks..............for some input. |
How are you trying to mount hdb? Is there a line in your /etc/fstab file like;
/dev/hdb /mountpoint ext2 defaults 1 1 /mountpoint = Any directory you want to mount the drive to. You'll have to make the directory though, so assume you want to access hdb from a directory called /redhat-7.1, you need to mkdir redhat-7.1 and use that in fstab etc... |
Using taz.devil's line caused linux to try to mount the whole drive hdb and it tried to do it automatically at startup. You need to specify the partition you want to mount. Let's say you want to mount the / partition of 7.0 and it's hdb1. You would enter at the command prompt mount -t ext2 /dev/hdb1 /mountpoint. The line in your fstab file would be:
/dev/hdb1 /mountpoint ext2 noauto,user 0 0 With this line in the fstab file, all you would have to enter would be mount /mountpoint. BTW, /mountpoint is the mountpoint you create to mount the partition. hdb1 is just a partition I selected as an example. You'll have to use the the one that indicates yours. |
accessing directory / files on slave disk
linuxcool..........thank you for your reply.
On the second physical hard drive (primary slave) is hdb. There are 2 partitions on this drive; / is native linux ext2 and /swap. I added /dev/hdb1 / ext2 noauto,user 0 0 in the next line of fstab. I used your mount -t ext2 /dev/hdb1 / to mount to hdb1. On the primary Master hard drive; the mount cmd showed the mount cmd worked -- /dev/hdb1 on / type ext2 (rw). I still cannot access any directories or files using the cd??? Maybe its a syntax issue. Trying different combinations of cd cmd I get error message /dev/hdb1 / is busy or bash: /dev/hdb1 is not a directory or file??? What am I doing wrong. I cannot umount /dev/hdb1 either.........thanks for your help. |
dual drive access troubles
linuxcool..........I have made some progress:
I re-entered the changes as you listed them. I can mount hdb1 and now can umount hdb1. In the mountpoint directory on the Master drive. it has only on directory on the Slave drive called lost+found. I can access from /mountpoint to lost+found on the slave hard drive. But nowhere else??? I changed the file permissions from 0 0 to 1 1, but made no difference. How do I get full access to the other directories and files on the slave drive?? Thanks. |
You're close. You just made one mistake. I guess I wasn't clear on you having to make a directory to mount the partition under. The / directory is not where you want to mount the partition. The /mountpoint was an example. Let's see if red hat created a directory named /mnt. Run ls / and see if there is a directory named /mnt. If there is, then run this command mkdir /mnt/rh7.0. This will create a directory named rh7.0 in the /mnt directory.If there is no /mnt, then run mkdir /rh7.0. This will create it in the / directory. Next, edit your fstab line.
/dev/hdb1 /mnt/rh7.0 ext2 noauto,user 0 0 or: /dev/hdb1 /rh7.0 ext2 noauto,user 0 0 Depending where you created the directory. Then you can mount the partition by running mount /mnt/rh7.0 or mount /rh7.0. Don't forget to unmount when you're done. And one other thing, if you cd onto the partition, don't forget to cd off of the partition before you try to unmount. Otherwise, it won't let you. |
dual booting to slave hard drive
Hi linuxcool..........I made the changes /mnt/rh7.0.
I mounted /mnt/rh7.0. I then ran the mount cmd and it showed I had mounted to /dev/hdb1 etc. I still cannot access any directories on the rh7.0 slave drive. After I use any cd commands, I am still on the Master drive??? What cd commands should I be using. I had assumed after I mounted to /dev/hdb1 I would be in the /mnt directory on the second physical drive(slave)?? Thanks for your patience............. |
After you mount the partition, you are still in the same directory you were before you mounted the partition. You have to use the cd command to move onto the hdb1 partition. Like this:cd /mnt/rh7.0. You will now be in the root directory of the partition. Now, run ls and you will see the contents of the root directory. You should see bin, sbin, etc, root, home, and all the others that you would normally see when you are running rh7.0. When you are done using cd to move around the partition, run cd /. This will move you off the partition and allow to unmount it.
|
accessing slave hard drive
Hi linuxcool.........I re-checked everything from the last several postings. I confirm /dev/hdb1 /mnt/rh7.0 is mounted using
the mount command on the primary master drive. Using cd /mnt/rh7.0 in am still on the Master hard drive, Not the 2nd drive (slave) / location. There is something about the path that isn't coming into the picture, I would guess?? To make this work, must I do anything to the 2nd physical drive, primary slave ?? Here are the contents of the Master / booted drive: /mnt directory -- directory for cdrom, floppy and rh7.0 /mnt/rh7.0 -- 12 files like map, message,boot.b etc.... 4 pointers I think, like kernel.h ->kernel.h-2.2.16 & kernel.h ->2.4.0 etc....... 1 directory called lost+found with no contents. So where do we go from here? |
I think I see the problem. hdb1 is not your / partition, it's your /boot partition. Either you or rh7.0 created a /boot partition. You need to find out what your / partition is. Run fdisk -l /dev/hdb and determine which partition is your / partition and then substitute the correct number into your fstab file.
|
access slave hard drive
Hi linuxcool.......
Here is what fdisk says: 2nd hard drive (slave) rh7.0 Device Boot Start End ID System /dev/hdb1 * 1 3 83 Linux /dev/hdb2 4 1245 5 Extended /dev/hdb5 4 554 83 Linux /dev/hdb6 555 1105 83 Linux /dev/hdb7 1106 1138 83 Linux /dev/hdb8 1139 1171 83 Linux /dev/hdb9 1172 1204 82 Linux Swap I did try substituting /dev/hdb2...............I got the following error msg: wrong fs type, bad option, bad option........cannot mount logical partition. I used the fdisk cmd on the booted Master drive. it showed on 2 partitions /dev/hda1 & 2 - one way / and /swap. Hopefully this helps.............thanks. |
WHOA!!! :eek:
I didn't know your slave drive had so many partitions. CyberSteve, I'm going to need you to boot up into rh 7.0 and then post a copy of rh 7.0's /etc/fstab file. It's the only way I'm going to be able to sort this out. BTW, did you partition the slave drive yourself? |
accessing 2nd physical drive
Hi linuxcool..........have been working on the same problem.
Last night I accidentally overwrote the /etc/fstab file on the 2nd physical drive. Needless to say, the machine will not boot fully and the filesystem is giving all kinds of error messages that it cannot file various file during the boot up of the slave drive. From notes, I have tried to reconstruct the fstab file but every re-boot is making the filesystem issue worse. Now I cannot get a #prompt even using the install cd linux rescue mode gives you a prompt but nothing works at the command line. The boot diskette fails at the same place the hard drive boot does........... Is there anyway to get a working prompt so some files can be pulled off or are we beating a dead horse? Time to reformat & learn from this? Thanks for all your replies on this too...... |
You might be able to gain access to files on rh 7.0 by running rh 7.1 and then mounting the partitions from the terminal command line. Then you could use the file manager in X window to look for the files you want. We know that hdb1 is your /boot partition from the contents that you listed in one of your posts. Just run mount /dev/hdb? /mnt/rh7.0. Use the numbers 5, 6, 7, or 8 in place of the ' ? '. Don't forget to move off of the partition before you unmount. If you can find what's left of your fstab file, maybe you can reconstruct it.
|
Hi Linuxcool.............we've tried everything we can think of and no go. Even running e2fsck on that hard drive didn't clean up the filesystem enough to allow the hard drive to boot.
At this point we'll reformat and do a clean install of Linux 7.1...... Thank you for all your help ! |
All times are GMT -5. The time now is 01:21 PM. |