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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-29-2003, 12:07 AM
|
#1
|
|
Member
Registered: Jul 2002
Location: nowhere
Distribution: GNU
Posts: 118
Rep:
|
auto mount on rebooting
Hi all~
i had 2 OSs, one is RedHat and the other is Win2k. i decide to mount win2k files to Linux so i can go on with my work on Linux, the command i typed is just like this:
Code:
mount auto -t /dev/hda5 /mnt/win2k
it works fine. but i need more, ie i need Linux mount this part automaticaly everytime it starts, my book didnt tell me much on this topic, so i hope some guys could inspire me a bit, any suggestions ?
thanx in advance~
|
|
|
|
11-29-2003, 12:33 AM
|
#2
|
|
Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796
Rep:
|
take a look at /etc/fstab
|
|
|
|
11-29-2003, 01:17 AM
|
#3
|
|
Senior Member
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802
Rep:
|
Put this in /etc/fstab
/dev/hda5 /mnt/win2k auto auto,defaults 0 0
If you want to give all users access put users, before the last auto or you can use uid/gid to control access.
|
|
|
|
11-29-2003, 09:07 PM
|
#4
|
|
Member
Registered: Jul 2002
Location: nowhere
Distribution: GNU
Posts: 118
Original Poster
Rep:
|
Quote:
Originally posted by /bin/bash
Put this in /etc/fstab
/dev/hda5 /mnt/win2k auto auto,defaults 0 0
If you want to give all users access put users, before the last auto or you can use uid/gid to control access.
|
thanx bin/bash, can you explain a bit more of this line ?
/dev/hda5 /mnt/win2k auto auto,defaults 0 0
|
|
|
|
11-29-2003, 09:27 PM
|
#5
|
|
Guru
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194
Rep:
|
Quote:
|
/dev/hda5 /mnt/win2k auto auto,defaults 0 0
|
/dev/hda5 is your Win partition. In fstab, the device usaully goes first. '/mnt/win2k' is the mount point, a folder where the stuff will be mounted. 'auto' is the filesytem type. The FS-type is automatically detected f this is used. It can also be 'vfat' (for FAT32) or 'ntfs'. NTFS should also be set as read-only, because ntfs write isn't supported well. The second 'auto' is the first of a list of options. 'auto' mounts automatically on startup. 'defaults' is the default options. You can add 'ro' here to make the device read-only. Do not leave spaces between options, only commas. The last two 0's are for whether the FS will be checked or not (pass), and whether the FS will be backed up (dump). Put this line at the top of your fstab for reference:
#<-Note the hash, this renders the line ignored
#device mnt-point fs-type options dump pass
|
|
|
|
11-29-2003, 09:33 PM
|
#6
|
|
Guru
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194
Rep:
|
What /bin/bash meant by using uid/gid is that these are options. Windows does not support some Linux attributes. They must be set in the fstab instead of the normal way. The 'umask=[number]' option sets permissions. 'umask=0' will set rwxrwxrwx permissions on all the stuff in your Win drive. 'uid=' and 'gid=' set ownership. Putting 'uid=black' will set all files as being owned by black. 'gid=users' will set the files' group to 'users'. Remember that options are seperated by commas, not spaces.
|
|
|
|
11-29-2003, 11:34 PM
|
#7
|
|
Senior Member
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802
Rep:
|
Thats an excellent explanation by aaa. I just wanted to add an example or two.
You can get as complicated as you want with fstab entries. Or you can keep them simple.
/dev/hda1 /win/c vfat auto,umask=027,uid=501,gid=100 1 0
The above will automatically mount /dev/hda1 at /win/c using vfat filesystem. The files will owned by the user with uid=501 and will be in the group with gid=100. The mask 027 makes the files writable only by owner (drwxr-x---) but group can browse the directories and read the files.
/dev/hda1 /win/c vfat user,auto 1 0
This will automatically mount /dev/hda1 at /win/c using vfat filesystem. It doesn't matter who owns the files because they will be writable by anyone.
Last edited by /bin/bash; 11-29-2003 at 11:36 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:22 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|