LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   edit fstab to mount a second harddrive (https://www.linuxquestions.org/questions/linux-newbie-8/edit-fstab-to-mount-a-second-harddrive-240669/)

chongluo 10-09-2004 02:45 PM

edit fstab to mount a second harddrive
 
hi,
I'm running slackware 10. here is my problem, I want my second harddrive to be mounted automatically when the system boots up and every user will be able to read and write to the partition, so I edited the /etc/fstab file with following extra line:

/dev/hdc1 /home/chongluo ext3 umask=000 0 0

so here is the fstab file looklike now:

/dev/hda1 swap swap defaults 0 0
/dev/hda2 / reiserfs defaults 1 1
/dev/hdc1 /home/chongluo ext3 umask=000 0 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

however, this does not work, the partition is not mounted when the system boots up, am I missing something?

please kindly advise?

acid_kewpie 10-09-2004 02:49 PM

use the same options as hda2, i.e. "defaults 1 1", offhand it looks fine other than that....

chongluo 10-09-2004 03:30 PM

no, I made the changes, still not working, the partitions is still not mounted at boot up

here the fstab after I made the change:

/dev/hda1 swap swap defaults 0 0
/dev/hda2 / reiserfs defaults 1 1
/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
/dev/hdc1 /home/chongluo ext3 umask=000 1 1


I cann't see what is wrong with it

michaelk 10-09-2004 09:27 PM

Well, for one thing you do not need the umask option for an ext3 partition.

Try to mount the partiton manually. If that fails post the error messages. Like:
mount -t ext3 /dev/hdc1 /home/chongluo

Are you sure the second drive is located on the 2nd IDE controller master slot? Does the BIOS & OS recognize the drive. Look at the output of the dmesg command to verify.

chongluo 10-10-2004 07:33 AM

I'm able to mount the partition manually, using the mount command. and obviously I'm sure the ext3 partition is connected to secondary master.

so I used the command dmesg to see what is there:
.......

EXT3-fs: Unrecognized mount option umask

.....
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide1(22,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.

I think the umask is causing the problem, but I want to every user be able to read, write and execute to the partition when it is mounted, so how can I do that without using umask???
please advise

michaelk 10-10-2004 08:51 AM

Use the chmod command to change the permissions of the /home/chongluo (unmount the filesystem first).

BTW
Is chongluo is a regular user?

Are there any existing files in /home/chongluo? If so once /dev/hdc1 is mounted any existing files in that directory will not be accessible.

The man pages for fstab and mount describ the options for each filesystem. umask is an a valid option for a ext3 filesystem.

chongluo 10-10-2004 11:50 AM

the problem is that the /dev/hdc1 is not mounted when it boots up, I have to mannually mount it use 'mount' command

I want the partition mounted when the system boots up, see my fstab above, it doesn't work

egag 10-10-2004 12:27 PM

hi,
-----------
/dev/hdc1 /home/chongluo ext3 umask=000 1
-----------

should read:
---------
/dev/hdc1 /home/chongluo ext3 rw,user,exec 1 2
---------
works fo me...
( and do a "chmod 770 /home/chongluo " )

egag

chongluo 10-10-2004 05:16 PM

thanks, eaga, it works for me now

egag 10-10-2004 05:59 PM

ok, happy to hear... :)

good luck with linux...

egag


All times are GMT -5. The time now is 03:41 PM.