PDA

View Full Version : fstab entries will not mount on boot.



spnetspec
17th November 2006, 12:26 AM
I just upgraded from fedora core 3 to core 6. I have a serial ata drive that I boot from and have a ata drive that I have the following mount labels. 1) /var/ftp 2) /home/webusers. I added the mount points during the install. The install went smooth, but upon boot the two ata drive mount points listed give a "write protected" error during the boot. and a kernal audit in the message log.
here is the message log audits:

Nov 15 18:25:17 rayout kernel: audit(1163636707.486:4): avc: denied { mounton } for pid=1548 comm="mount" name="webusers" dev=dm-0 ino=21528578 scontext=system_u:system_r:mount_t:s0 tcontext=user_u:object_r:user_home_dir_t:s0 tclass=dir
Nov 15 18:25:17 rayout kernel: audit(1163636707.486:5): avc: denied { mounton } for pid=1548 comm="mount" name="webusers" dev=dm-0 ino=21528578 scontext=system_u:system_r:mount_t:s0 tcontext=user_u:object_r:user_home_dir_t:s0 tclass=dir
mount output following boot
[root@rayout ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


## mount output when mount -a performed
[root@rayout ~]# mount -a
[root@rayout ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hda2 on /home/webusers type ext3 (rw)
/dev/hda1 on /var/ftp type ext3 (rw)
[root@rayout ~]#
## df -v output
[root@rayout ~]# df -v
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
115126668 2237236 106946956 3% /
/dev/sda1 101086 10942 84925 12% /boot
tmpfs 257336 0 257336 0% /dev/shm
/dev/hda2 59084964 37340800 18742824 67% /home/webusers
/dev/hda1 59084932 4823464 51260128 9% /var/ftp
[root@rayout ~]#
## fstab

[root@rayout ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / 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=/home/webusers /home/webusers ext3 defaults 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=/var/ftp /var/ftp ext3 defaults 1 2
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/hda3 swap swap defaults 0 0
[root@rayout ~]#

Am I just overlooking something,

Dies
17th November 2006, 01:29 AM
Might be that I misunderstood what you're trying to do but couldn't you get the same result by making a webusers folder in the home directory and an ftp folder in var and then editing your fstab to mount those partitions into those folders.

/dev/hda2 /home/webusers ext3 defaults 0 0
/dev/hda1 /var/ftp ext3 defaults 0 0

spnetspec
17th November 2006, 04:50 AM
That is the same only I'm using Label.. This works great when I do a "mount -a" but it give a "device write protected error " on boot. after the machine boots I run the mount -a it mounts all entrys perfectly.

spnetspec
17th November 2006, 04:52 AM
The reason I use this I have all of my data stored on its own drive. It has worked great up to this point. it worked good from core 3 to core 4, I skipped core 5 and dosn't work w/core 6.

Dies
17th November 2006, 05:35 AM
Right, but did you try it that way?

spnetspec
17th November 2006, 05:56 AM
yes same effect. On boot still compained bout both block devices being write protected, but mounted perfectly after logging into root and executing a mount -a.

nick.stumpos
17th November 2006, 06:12 AM
in fstab try
/dev/hda2 /home/webusers ext3 rw exec auto user async 1 2
/dev/hda1 /var/ftp ext3 rw exec auto user async 1 2

nick.stumpos
17th November 2006, 06:14 AM
also did you try with 0 0 not sure if a user can check the filesystem

spnetspec
17th November 2006, 05:10 PM
I tried your suggestions Nickisgod1 same out come. On boot error "cannot mount block device in read-only", but after boot was able to mount perfectly with mount -a".. I have no idea what is going on here but we must be over looking something. Could it be something with udev ?

Seve
17th November 2006, 05:27 PM
I tried your suggestions Nickisgod1 same out come. On boot error "cannot mount block device in read-only", but after boot was able to mount perfectly with mount -a".. I have no idea what is going on here but we must be over looking something. Could it be something with udev ?
Hello:
Been a few changes since FC3
Since you are trying to mount to /home and /var, I believe that
SeLinux will not allow this [or is blocking at boot time] and that is why you are seeing some errors.
So, you have a few options that you can select from:
Change the mount points to something other than /home and /var .. for example, you could use /mnt/
Or,
You have to set SeLinux to permissive or disable it for the mount a boot time to take place.

Seve

spnetspec
17th November 2006, 05:29 PM
attached is my "50-udev.rules" any thoughts?

spnetspec
17th November 2006, 05:41 PM
Hello:
Been a few changes since FC3
Since you are trying to mount to /home and /var, I believe that
SeLinux will not allow this [or is blocking at boot time] and that is why you are seeing some errors.
So, you have a few options that you can select from:
Change the mount points to something other than /home and /var .. for example, you could use /mnt/
Or,
You have to set SeLinux to permissive or disable it for the mount a boot time to take place.

Seve
Will try in 5 min.. Thanks! I forgot about the Selinux rules. SPNS

spnetspec
17th November 2006, 05:59 PM
Hello:
Been a few changes since FC3
Since you are trying to mount to /home and /var, I believe that
SeLinux will not allow this [or is blocking at boot time] and that is why you are seeing some errors.
So, you have a few options that you can select from:
Change the mount points to something other than /home and /var .. for example, you could use /mnt/
Or,
You have to set SeLinux to permissive or disable it for the mount a boot time to take place.

Seve
I modified the Selinux " mount any file " option. worked great. Guess I need to review all of the selinux params. ... Thanks !

Dies
17th November 2006, 10:37 PM
Glad you got it working, I didn't even think about Selinux. You learn something everyday. I had a problem mounting one drive and the only change I made was moving that line to the end of the file and all of a sudden it's fine, go figure.
Selinux is actually getting kind of annoying now I even had to modify it just to install the ntfs kmod. I see this feature being disabled on more and more machines in the near future.