LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-03-2006, 01:08 AM   #1
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Rep: Reputation: 15
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:

Distro: Partition: Type:
FC5 /dev/hda1 Ext3
Slackware 10.2 /dev/hdb6 reiserfs
SUSE 10.1 /dev/hdb7 reiserfs
Arch .7.1 /dev/hdb8 jfs

Here is my current fstab:[HTML]/dev/hdb5 swap swap defaults 0 0
/dev/hdb6 / reiserfs defaults 1 1
/dev/hdb14 /shared vfat rw,auto,user 1 0
/dev/hda1 /FC5 ext3 rw.auto.user 1 1
/dev/hda5 /win98temp auto rw,auto,user 1 0
/dev/hdb7 /SUSE rieserfs rw.auto.user 1 0
/dev/cdrom /mnt/cdrom auto rw,auto,user 0 0
/dev/fd0 /mnt/floppy auto rw,auto,user 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0[/HTML]

This is how I went about it:
Open Konsole as root.
[HTML]mount -t reiserfs -o defaults,rw /dev/hdb7 /mnt/SUSE[/HTML]

I then opened /mnt and clicked on SUSE in Konqueror, and it allows me to browse that partition.

I then did the same thing for FC5:
[HTML]mount -t ext3 -o defaults.rw /dev/hda1 /mnt/FC5[/HTML]

When I click on FC5 in /mnt it appears as nothing is there!

So I tried it through konsole again:
[HTML]mount -t ext3 -o defaults,rw /dev/hda1 /mnt/FC5[/HTML]

Now this works until I reboot.
Would one of you Gurus please point me in the right direction?

/edited
For the stupid typo's you guys pointed out!

Last edited by sr_25; 07-03-2006 at 06:03 PM.
 
Old 07-03-2006, 01:45 AM   #2
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 848

Rep: Reputation: 107Reputation: 107
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.

--Dane
 
Old 07-03-2006, 01:55 AM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,285

Rep: Reputation: 61
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:

/dev/hda1 swap swap defaults 0 0
/dev/hda2 / reiserfs defaults 1 1
/dev/hda3 /mnt/hda3 reiserfs defaults 1 2
/dev/hda4 /mnt/hda4 reiserfs defaults 1 2
/dev/hdd1 /mnt/windoze ntfs ro 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

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.
 
Old 07-03-2006, 02:54 AM   #4
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
DaneM is hitting the nail I guess.

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..

Last edited by rhoekstra; 07-03-2006 at 02:56 AM.
 
Old 07-03-2006, 06:06 PM   #5
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
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.
 
Old 07-04-2006, 01:03 AM   #6
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
Here is my fstab:
[HTML]
/dev/hdb5 swap swap defaults 0 0
/dev/hdb6 / reiserfs defaults 1 1
/dev/hdb1 /shared vfat rw,auto,user 1 0
/dev/hda1 /FC5 ext3 rw.auto.user 1 1
/dev/hda5 /win98temp auto rw,auto,user 1 0
/dev/hdb7 /SUSE reiserfs rw.auto.user 1 0
/dev/cdrom /mnt/cdrom auto rw,noauto,user 0 0
/dev/fd0 /mnt/floppy auto rw,noauto,user 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
[/HTML]

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!
 
Old 07-04-2006, 01:56 AM   #7
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 848

Rep: Reputation: 107Reputation: 107
Hello.

I noticed that you have what appear to be some more typos in your fstab. Try changing it to this (but back up your old one!):

Code:
/dev/hdb5  swap  swap  defaults  0  0
/dev/hdb6   /  reiserfs  defaults  0   1
/dev/hdb1  /shared  vfat  rw,auto,user  0   0
/dev/hda1  /mnt/FC5  ext3  rw,auto,user  0   2
/dev/hda5  /win98temp  auto  rw,auto,user  0   0
/dev/hdb7  /mnt/SUSE  reiserfs  rw,auto,user  0   0
/dev/cdrom  /mnt/cdrom  auto  rw,noauto,user  0   0
/dev/fd0  /mnt/floppy  auto  rw,noauto,user  0   0
devpts  /dev/pts  devpts  gid=5,mode=620  0   0
proc  /proc  proc  defaults  0   0
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.

--Dane

Edit: corrected as per the following two posts.

Last edited by DaneM; 07-04-2006 at 03:35 AM.
 
Old 07-04-2006, 02:19 AM   #8
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
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)
 
Old 07-04-2006, 03:10 AM   #9
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 848

Rep: Reputation: 107Reputation: 107
Whoops, edited the wrong field. You're right; the filesystem should be "auto". The option should say "noauto" (which it does). Sorry.

--Dane
 
Old 07-04-2006, 03:30 AM   #10
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
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!

Last edited by sr_25; 07-04-2006 at 03:38 AM.
 
  


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
Shared patitions between linux and windows. sr_25 Linux - Newbie 2 07-01-2006 01:01 PM
mounting ntfs format patitions from fedora core person#6661067 Linux - Newbie 2 11-08-2004 09:03 PM
trouble mounting linux shared folder jerryfreak Linux - Networking 1 10-15-2004 01:41 PM
mounting windows patitions in redhat 9 problem bubbahpw Linux - Newbie 3 09-01-2004 08:59 AM
Mounting and reading NTFS and FAT32 patitions Forezt Linux - Software 10 02-25-2004 02:19 PM


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