LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-07-2006, 04:09 PM   #1
wetnose23
LQ Newbie
 
Registered: Dec 2005
Posts: 28

Rep: Reputation: 15
entry into /etc/fstab


hi. <--- newb again

is it possible to enter data into fstab for a device such as HD?

how exactly do i write the syntax?

another question.. what is the purpose of the last two digits on the far right of fstab.." 0 0 "

thankx
 
Old 01-07-2006, 04:24 PM   #2
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,180

Rep: Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377
Not sure what you mean, but assuming of course if you are talking about adding a new HD, then yes it would look something like this...

Code:
/dev/hdb1    /mnt/newhd      ext2      defaults    1 1
of course this is just an example, since if this is a new hard drive and you already have one hd, the first hd would be known as hda followed by a number, and that number represents partitions. If there is only one partition it would be just hda1, the next part of my example is the mount point, where you want to access the hd, the next is the type of filesystem, in this case I just put in the linux ext2 filesystem, defaults for that drive (permissions) then the last part dump filesystem and check. Try man fstab for more details, and also check out this current thread http://www.linuxquestions.org/questi...d.php?t=399605
 
Old 01-07-2006, 04:30 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The man pages are your friend From the man pages for fstab and mount...

Yes it is possible to enter data into fstab, you need to be logged in as root (or su to root). The columns in /etc/fstab are:

1 Device name. The partition you want to mount, e.g. /dev/hda2 for the 1st partition of your 1st HDD
2 Mount point. The place in the file system you want to mount the partition, e.g. /boot
3 File system type. What do you have the file system formatted as? ext2, ext3, reiserfs...
4 Mount options. Do you want to restrict what can be done on the file system, e.g. noexec means don't allow execution of binaries
5 Dump options. Is by the dump(8) command to determine which file systems need to be dumped. Set to 1 for core file system partitions, 0 for others
6 fsck options. Used to determine in which order the files systems should be checked. The root filesystem should be specified with 1, other file systems with 2, 0 means it doesn't need to be checked

An example:
Code:
/dev/hda10       swap             swap        defaults                         0   0
/dev/hda9        /                ext3        defaults                         1   1
/dev/hda5        /boot            ext3        defaults,ro                      1   2
/dev/hda6        /home            ext3        defaults,rw,nosuid,nodev         1   2
/dev/hda7        /var             ext3        defaults                         1   2
/dev/hda8        /tmp             ext3        defaults,rw,nosuid,nodev,noexec  1   2
/dev/cdrom       /mnt/cdrom       auto        noauto,users,exec,ro             0   0
/dev/dvd         /mnt/dvd         auto        noauto,users,exec,ro             0   0
/dev/sda4        /mnt/dongle      vfat        noauto,users,exec                0   0
/dev/fd0         /mnt/floppy      auto        noauto,users                     0   0
devpts           /dev/pts         devpts      gid=5,mode=620                   0   0
proc             /proc            proc        defaults                         0   0
 
  


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
/etc/fstab entry ryedunn Linux - Newbie 1 01-17-2005 01:45 AM
entry in fstab file Tinku Linux - General 6 10-02-2004 12:06 AM
FC2 FSTAB Entry jeopardyracing Linux - Newbie 2 07-10-2004 09:53 AM
FC2 FSTAB Entry jeopardyracing Linux - Networking 6 06-27-2004 06:57 PM
fstab entry albean Linux - Newbie 1 12-04-2002 01:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:07 AM.

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