UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I use this code to mount a SATA drive on my Ubuntu 6.10 Server. And each time I reboot, I have to add it again. Can I simply add this line to my FSTAB file? Do I need to add any other piece of code for it to work in FSTAB ?
Normally I would refer you to the man page that describes the fstab file but I just checked and that particular page really stinks.
First, use the existing records in the fstab file as an example for your new line.
The first field is the name of the block device.
The second field is the mount point.
The third field is the type of file system on the block device.
The fourth field is mount options separated by a comma.
The fifth field has something to do with the dump function. Whatever.
The sixth field tells the boot sequence if a file system should be checked with fsck during system boot. Actually the man page says that it can be used for creating the sequence that file systems are checked with fsck during system boot time. All of the fstab files that I've seen have either a 1 or a 0 there.
Addendum: I see that nadroj beat me by one minute. Curse you nadroj and your proficiency in typing.
Last edited by stress_junkie; 04-07-2007 at 09:00 PM.
almost, you will want to add some other bits aswell.
/dev/cdrom /mnt/cdrom auto noauto,users,ro 0 0
which breaks down to this,
"the device to mount" "where to mount" "filesystem type" "options" "fs_freq" "fs_passno"
this example mounts the device cdrom (which is actually a symlink to /dev/hdc on my system) to the place /mnt/cdrom, it checks automatically what filesystem it is using (normally iso9660 for cd's) and has the options of noauto (doesn't get mounted at boot time), users (any user can mount or umount), ro (read-only).Then the fist 0 means it won't get dumped, this is to do with some backup systems. And the second 0 is to do with the order that fsck checks the system.
The best thing you can do is read the man page for fstab.This can be found on your system or in case you did not install the man pages it can also be found on the web. One place that i use alot is http://www.die.net/doc/linux/man/
Looks like you both beat me
Last edited by snowtigger; 04-07-2007 at 09:06 PM.
If you use a 2 instead of the final 0, then fsck will be run about every 30 or so boots. If you don't, and if you don't check it manually from time to time, it's possible for the filesystem to get corrupted so bad that your data is irretrievable.
Hmmm, I haven't paid attention to the filetype until just now. It's probably not appropriate to try to run fsck on an smbfs disk. Sorry about that. Only use 2 on the final number if the physical disk is actually bolted into your machine or plugged in via USB etc.
Last edited by Quakeboy02; 04-08-2007 at 02:31 PM.