Trouble mounting other Linux patitions automatically.
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Trouble mounting other Linux patitions automatically.
By doing some searching on this board I thought I had figured out how to mount my partitions, but I apparently need some help. It doesn't always work. Now for some background while in Slack:
Hello. I'm not exactly a Guru, but I'll try to answer your question. :-)
The first thing that I saw that looked fishy is that the partitions you mentioned in the beginning do not correspond with the partitions that you're issuing commands for. In the beginning of your post, you had FC5 at hda1, but at the end, you have it at hdb7. Is this intentional? Is sounds to me that you have more partitions than you mentioned in the initial post. Please post the output of the following command for each drive you have:
Code:
fdisk -l /dev/hdx
...so the first command should be, "fdisk -l /dev/hda", then do it for /dev/hdb, and so on. This will give you a complete listing of your partitions.
Next you will have to post which ones are the root partitions for your various Linux installations. Each one will have an fstab. You can use their fstabs to help you write your own. Keep in mind, though, THE OPTIONS WILL BE DIFFERENT depending on which partition you are booting into. For example, the /, /boot, and /home partitions of each installation will need to be checked for consistency only if they are the ones being booted from. (There will be something like, "0 1" or "0 2" at the end of the fstab line for them.) They should probably not be messed with in such a manner when you are not booting from them (although I'm not entirely sure on this point, so you might want to ask/look elsewhere). Also, for reasons that should be obvious (feel free to ask if they are not), the "/" partition for one installation will not be "/" for another.
Please post the above info and take a crack at making up an fstab based on it. (Back up your current fstab!) Let me know whether it works, or whether you still need help.
Your /dev/cdrom and /dev/fd0 should be set to noauto instead of auto, unless you have media in them everytime you boot up your machine it may cause problems trying to mount something that is not there, Also setting all hard drive partitions to 'defaults' may also help to mount the partitons properly. Here is a copy of my fstab file:
With these entries in your fstab file you should not need to type them in manually, when the system boots up it reads the fstab file to mount the partitions and devices to load the OS.
There is indeed some inconsistency in your story.. The way I interpret what you did was mount /dev/hda1 at /mnt/FC5 which appeared to be empty, is FC5 installed?
Next you tried to mount /dev/hdb7 on /mnt/FC5, which worked.. your story starts with telling that /dev/hdb7 has SUSE on it, are you sure you see SUSE now or FC5 ?
when you want to know what is currently mounted, just type 'mount'. this is the accurate mount state and not the configured state. so when you mounted /dev/hda1 to /mnt/FC5, what did 'mount' tell you, in relation to /mnt/FC5 ?
if you are sure that /mnt/FC5 contains FC5 files on hdb7, make adjustments to your fstab to read
Code:
/dev/hdb7 /FC5 ext3 rw.auto.user 1 1
You might want to reconsider where your SUSE partition is, then.
Does this point you in a better direction?
PS. with 'fdisk -l' without device specification, all devices will be shown..
Thanks to everyone, I was probably just really tired when I typed that. I will double check what I have done and make sure I was issuing the correct commands. If I still have trouble I'll post again. Thanks fotoguy I'll make the corrections you suggested.
This line enables me to browse the '/' FC5 partition:
[HTML]mount -t ext3 -o defaults,rw /dev/hda1 /mnt/FC5[/HTML]
This line enables me to browse the '/' SUSE partition:
[HTML]mount -t reiserfs -o defaults,rw /dev/hdb7 /mnt/SUSE[/HTML]
Here is the fdisk -l output:
[HTML]
Disk /dev/hda: 10.2 GB, 10254827520 bytes
255 heads, 63 sectors/track, 1246 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 997 8008371 83 Linux
/dev/hda2 998 1246 2000092+ f W95 Ext'd (LBA)
/dev/hda5 998 1246 2000061 c W95 FAT32 (LBA)
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 1 8001 c W95 FAT32 (LBA)
/dev/hdb2 2 9729 78140160 5 Extended
/dev/hdb5 2 98 779121 82 Linux swap
/dev/hdb6 99 969 6996276 83 Linux
/dev/hdb7 970 1840 6996276 83 Linux
/dev/hdb8 1841 2711 6996276 83 Linux
/dev/hdb9 * 2712 3582 6996276 83 Linux
/dev/hdb10 3583 4453 6996276 83 Linux
/dev/hdb11 4454 5324 6996276 83 Linux
/dev/hdb12 5325 6195 6996276 83 Linux
/dev/hdb13 6196 7066 6996276 83 Linux
/dev/hdb14 7067 9729 21390516 c W95 FAT32 (LBA)
[/HTML]
My question is shouldn't I be able to automatically browse these partitions, because they are listed in my fstab with the 'auto' option? If not how do I accomplish this?
Please forgive the typo's in my first post as I am sure this made it impossible to figure out!
The changes I made (which you can also check using the "diff" command) are,
(1) replacing some periods with commas in the option lists;
(2) changing the mount directories to better reflect the working commands you gave;
(3) changing all the 1s in the 5th field to 0s (you only need 1s there if you backup your drives using the "dump" command; see "man fstab" and "man dump");
(4) changing the 1 in the 6th field on the FC5 line to a 2, so that it will be checked AFTER the root partition is checked, and not at the same time or before; and
(5) changing (in the 3rd field of the cdrom and floppy lines) "auto" to "noauto". Unless you always boot with a CDROM and a floppy in the drives, this is only slowing down boot time.
Give that a try and let us know if it works for you.
DaneM, what is the reason for the /mnt/cdrom to set the filesystem from 'auto' to 'noauto' ?? I have 'auto' as well... (not mentioning the option noauto, what stands for no automatic mount)
Thanks for your post DaneM. I don't like the font I am currently using. I guess I better find one that's a little clearer, My comma's and periods look the same unless you look real close!
/edit
I turned on anti-aliasing, and it is a little clearer now!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.