LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-02-2007, 10:11 PM   #1
cjtemple
LQ Newbie
 
Registered: Jan 2007
Location: Atlanta
Distribution: RHEL 4, Knoppix, Fedora Core 6
Posts: 5

Rep: Reputation: 0
Automounting directory in fstab troubles


I have three directories I would like to mount when the system boots up. I tried to add them in the fstab but I am having alot of trouble. The system keeps telling me that it is write-protected mounting read-only.

My fstab:
...
/var/www/html /home/username/WebServer none bind 0 0
/fileserver/ftp /home/username/FTPServer none bind 0 0
/fileserver/Projects /home/username/Projects none bind 0 0

Out of desperation I set each of the original directories to root:root and 777. But that didn't help.

When I wait and do this from a terminal as root I have no problem.

One other unrelated curiosity that started well before all of this.
When booting I see
FATAL : ERROR acpi-cpufreq (lib/moduless/2.6.28-1.2798.fc6/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ho) no such device.

Any hints on these?

*************************
System Config:
AMD 2400+
120 GB HDD 1
250 GB HDD 2
1 GB RAM
 
Old 01-03-2007, 02:17 AM   #2
somnium desolo
LQ Newbie
 
Registered: Mar 2006
Location: Indiana, USA
Distribution: Arch
Posts: 8

Rep: Reputation: 1
Cpufreq controls throttling the processor, so it's primarily for laptops. That message should just mean cpufreq couldn't find a cpu that it can work with.
The other problem I'm afraid I don't know about. I've seen it before, on a PCLinuxOS .92 load, but I never fixed it before I changed distros.
 
Old 01-03-2007, 07:26 AM   #3
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
What are /var/www/html, /fileserver/ftp and /fileserver/Projects?

Are they just directories that you want a link, or shortcut if you will, to in home directory?? If so I don't think you can do that. Reading the fstab man page here it appears the first parameter in fstab needs to either be a block device, i.e. /dev/hda2 or an NFS filesystem sitting on a server.

Are you sure the /fileserver lines shouldn't be something like "fileserver:/ftp" instead of "/fileserver/ftp"??

If you just want a link to /var/www/html/ in your home directory use 'ln -s <src> <dest>', i.e. 'ln -s /var/www/html ~/WebServer'
 
Old 01-03-2007, 06:04 PM   #4
cjtemple
LQ Newbie
 
Registered: Jan 2007
Location: Atlanta
Distribution: RHEL 4, Knoppix, Fedora Core 6
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks Somnium, I go the acpi_cpufreq resolved I found a thread on another board talking about something similar that cleared up when he updated his kernel. I did that this evening and I am flying high with out the error.

Micky, I am still working on the mounting issue. I originally tried the softlink but I have chroot enabled on my ftpserver and I wanted to be able to access those locations from ftp. In that scenario the only thing I have found thus far is a bind.
You asked what are /var/....

from mount:
/dev/hdb1 on /fileserver ext3
/dev/hda2 on /var ext3

/var/www/html ofcourse is my Web directory
/fileserver/ftp is the root directory for the FTP Server
/fileserver/Projects is a directory I setup to store all of the software or graphics projects I work on.
And once I figure out how to do this properly I was going to setup a directory off of /fileserver for documents.

Thanks for help me with this one.
 
Old 01-04-2007, 07:17 PM   #5
cjtemple
LQ Newbie
 
Registered: Jan 2007
Location: Atlanta
Distribution: RHEL 4, Knoppix, Fedora Core 6
Posts: 5

Original Poster
Rep: Reputation: 0
Well it took a little bit of time but I found it. To bind from one dir to another from fstab
Quote:
/original_location /new_location bind bind 0 0
Notice the bind in the spot for type. I found this in someones Jan 2003 change log. Google is a good thing! You just may have to dig for a little while.
 
Old 01-04-2007, 07:21 PM   #6
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
First you need to get the mount points right before you worry about linking them to another directory:

/etc/fstab

Code:
/dev/hdb1     /fileserver     ext3    defaults    1  2
/dev/hda2     /var            ext3    defaults    1  2
Here'a a copy of my fstab to help you get an idea of how the fstab works:

Code:
/dev/hda3        swap             swap        defaults         0   0
/dev/hda5        /                reiserfs    defaults         1   1
/dev/hda6        /tmp             reiserfs    defaults         1   2
/dev/hda7        /home            reiserfs    defaults         1   2
/dev/hda1        /media/windozeC  auto        defaults         1   0
/dev/hda2        /media/windozeD  auto        defaults         1   0
/dev/cdrom       /media/hdb       auto        noauto,users,ro  0   0
/dev/fd0         /media/floppy    auto        noauto,users,rw  0   0
usbfs            /proc/bus/usb    usbfs       devgid=14,devmode=0660 0 0
proc             /proc            proc        defaults        0     0
sysfs            /sys             sysfs       defaults        0     0
devpts           /dev/pts         devpts      gid=4,mode=620  0     0
tmpfs            /dev/shm         tmpfs       defaults        0     0
 
Old 01-04-2007, 09:56 PM   #7
cjtemple
LQ Newbie
 
Registered: Jan 2007
Location: Atlanta
Distribution: RHEL 4, Knoppix, Fedora Core 6
Posts: 5

Original Poster
Rep: Reputation: 0
Hey fotoguy,
I almost understand about the mounting points being correct. But is there something wrong with the way that I did the bind for those directories? If there is I have no qualms with changing it. I am no guru, I just know enough to be dangerous.

My current fstab:
Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
LABEL=/fileserver       /fileserver             ext3    defaults        1 2
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=/tmp              /tmp                    ext3    defaults        1 2
LABEL=/usr/local        /usr/local              ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/var/www/html           /home/john/WebServer    bind    defaults,bind   0 0
/fileserver/ftp         /home/john/FTPServer    bind    defaults,bind   0 0
/fileserver/Projects    /home/john/Projects     bind    defaults,bind   0 0
/fileserver/Documents   /home/john/Documents    bind    defaults,bind   0 0
 
Old 01-05-2007, 08:23 PM   #8
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Quote:
Originally Posted by cjtemple
Hey fotoguy,
I almost understand about the mounting points being correct. But is there something wrong with the way that I did the bind for those directories? If there is I have no qualms with changing it. I am no guru, I just know enough to be dangerous.

My current fstab:
Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
LABEL=/fileserver       /fileserver             ext3    defaults        1 2
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=/tmp              /tmp                    ext3    defaults        1 2
LABEL=/usr/local        /usr/local              ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/var/www/html           /home/john/WebServer    bind    defaults,bind   0 0
/fileserver/ftp         /home/john/FTPServer    bind    defaults,bind   0 0
/fileserver/Projects    /home/john/Projects     bind    defaults,bind   0 0
/fileserver/Documents   /home/john/Documents    bind    defaults,bind   0 0

OK I can see now what you are doing by your fstab, mounting a directory to another directory. Unfortunately I have never used bind in the fstab before, so I cannot say where this is the right or wrong way to go about it, nor have I mount two directories together.

But since your having read/write errors, when you mount to directories you now have permissions on both directories to contend with, plus mounting options that can also effect read/write on files and directories.

Since only root can create directories on the root filessystem /fileserver will have root as owner and group, and user john will be owner and what ever the group is that he is part of.

While root has complete control of the system, even the normal user
permissions can effect root. Since devices are usually owned by root, and the mount points are owned by root there is normally no problems with mounting. But now your trying to mount to a normal users home directory, the permissions difference maybe causing mount to mount only as read-only.
 
Old 01-05-2007, 10:34 PM   #9
cjtemple
LQ Newbie
 
Registered: Jan 2007
Location: Atlanta
Distribution: RHEL 4, Knoppix, Fedora Core 6
Posts: 5

Original Poster
Rep: Reputation: 0
Actually everything is working since I added the bind type.
I had root add a subdirectory under "/fileserver" and then did a chown to the user on that subdirectory. So everything is golden now. Thanks for your help.
 
Old 01-07-2007, 03:21 AM   #10
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Good to hear it's all sorted out
 
  


Reply



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
nis home directory automounting ravi_foru Linux - Networking 2 03-06-2006 09:12 AM
FC 2: Automounting Windows partions (fstab) shelldinesh Linux - General 1 10-19-2005 04:53 PM
Automounting Windows Directory DNAphil Linux - Networking 3 09-17-2005 10:17 AM
fstab troubles tones111 MEPIS 3 05-23-2005 08:20 PM
automounting in /home directory doesn't work jlinkels Linux - Software 3 03-18-2005 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:44 PM.

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
Open Source Consulting | Domain Registration