Static Mounting of windows Partitions

compbug

Distinguished
Mar 7, 2006
72
0
18,630
hello folks,

I tried to Mount the windows partitions automatically during booting by editing "/etc/fstab " file.
I added ,

mount /dev/hdb5 (which is my D drive ) /home/Local_Drives/D_drive vfat default,rw,umask=0200 0 0.

but during booting it says , line number 3 is bad pointing to the above command.

whats is wrong in the above Command ? I have Fedora Core 7 Moon Shine.

Thanks Folks..........
 

compbug

Distinguished
Mar 7, 2006
72
0
18,630
what is the significance of "." ?

is that equivalent to "mount"?

the above command worked well with FC5 but why not with FC7?
 

linux_0

Splendid
/etc/fstab is simply a configuration file it is not an executable script.

You do not put executable commands in it.

The correct format is

file_system mount_point filesystem_type options dump pass

/dev/hdb5 /home/Local_Drives/D_drive vfat defaults,rw,umask=0200 0 0
 

compbug

Distinguished
Mar 7, 2006
72
0
18,630
did not work , :(

I tried the code you suggested.. but it still says , "error " pointing to the same line.....

after editing the /etc/fstab file I said "# mount -a" it said line number so and so "is bad"...and I even tried rebooting machine.. did not work though :((

what is the problem right here?

Thanks !
 

compbug

Distinguished
Mar 7, 2006
72
0
18,630
here is my /etc/fstab config file :)



LABEL=/ / ext3 defaults 1 1
LABEL=/home /home ext3 defaults 1 2
/dev/sda5 /home/Local_Drives/D_drive vfat default,rw,umask = 0200 0 0
/dev/sda6 /home/Local_Drives/E_drive vfat default,rw,umask = 0200 0 0
/dev/sda7 /home/Local_Drives/F_drive vfat default,rw,umask = 0200 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda10 swap swap defaults 0 0

Thanks
 

linux_0

Splendid
you have to use "defaults" not "default"

also the mount points much exist



LABEL=/ / ext3 defaults 1 1
LABEL=/home /home ext3 defaults 1 2
/dev/sda5 /home/Local_Drives/D_drive vfat defaults,rw,umask = 0200 0 0
/dev/sda6 /home/Local_Drives/E_drive vfat defaults,rw,umask = 0200 0 0
/dev/sda7 /home/Local_Drives/F_drive vfat defaults,rw,umask = 0200 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda10 swap swap defaults 0 0


:)
 

compbug

Distinguished
Mar 7, 2006
72
0
18,630
oh no ! :(

still the same error message ..:( I replaced default by "defaults"

but still error! :(

and the mount points do exist as I have created those directories... if not, even the dynamic mounting using "mount" would not have worked..
 

linux_0

Splendid
remove all options except defaults and try


LABEL=/ / ext3 defaults 1 1
LABEL=/home /home ext3 defaults 1 2
/dev/sda5 /home/Local_Drives/D_drive vfat defaults 0 0
/dev/sda6 /home/Local_Drives/E_drive vfat defaults 0 0
/dev/sda7 /home/Local_Drives/F_drive vfat defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda10 swap swap defaults 0 0
 

compbug

Distinguished
Mar 7, 2006
72
0
18,630
no no no :(

nothing is working out here....
I just gave defaults permissions as you suggested.. but still says those lines are bad....

well, I guess I will have to stick to dynamic mounting of Local Drives!


Thanks Man!

 

linux_0

Splendid
mount -t vfat /dev/sda5 /home/Local_Drives/D_drive
mount -t vfat /dev/sda6 /home/Local_Drives/E_drive
mount -t vfat /dev/sda7 /home/Local_Drives/F_drive


put these in /etc/rc.local
 

compbug

Distinguished
Mar 7, 2006
72
0
18,630
oh Yeah! :)

at last it worked :)

well, I will find out how rc.local is different from fstab.....

but I would like to know why did it fail with fstab? which worked well with FC5's fstab.

then , is it possible for me to Install any players or tools in /home... as I am running out of space in /root.

I have 20 GB in Home..

Thanks Chap! :)
 

linux_0

Splendid
/etc/rc.local is executable and shell commands in it will run after bootup.

/etc/rc.local is a special script in which you can put regular executable shell commands that you would use on the command line interface ( CLI ) and have them execute automatically after the system has booted up.

You have to use regular shell syntax in rc.local ( /bin/sh or bash syntax )



/etc/fstab is just a configuration file read by scripts.

/etc/fstab is a configuration file which is read by the system startup scripts which examine the file and if it has the correct syntax mount the file systems listed within.

/etc/fstab has it's own syntax



A typical /etc/rc.local file looks like....

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.


touch /var/lock/subsys/local

# you can add commands here



# end of file






/etc/fstab normally looks like this

LABEL=/root / ext3 defaults 1 1
/dev/sda1 /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0