Linux - NewbieThis 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!
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 recently reloaded SuSE 9.3 and it is not seeing two hard drive partitions that it had previously seen (it had previously read their names as they were set up under Partition Magic/XP). I've received a message stating that they are not listed in fstab and mtab. Can I add the paths into these files or will using the partitioner to set up the mount point work? Any assistance would be greatly appreciated.
I don't use Suse. Typically though, creating filesystems is comprised of the following steps:
1) Make the partition using a utility such as fdisk or parted (or if doing LVM you'd make a logical volume using lvcreate).
2) Tell the partition it is a filesystem using the newfs command. NOTE: This will overwrite anything on the partition.
3) Make the directory "mount point" for the filesystem. This is the directory you want the filesystem to be mounted as such as /home.
4) Add the entry to /etc/fstab. In /etc/fstab you add the device name, the mount point the filesystem type and options if any.
5) Mount the filesystem. You can do this by specifying all the information from item 4 or better yet simply by typing "mount /mountpoint" where "/mountpoint" is the directory you created in item 3. The benefit to doing comes from the fact you don't give it the device and options so it has to read the fstab to get that information. So if it successfully mounts then you know the fstab entry is correct. (Also of course it saves you some keystrokes.)
CAUTION: From what you wrote it appears you're saying your partitions already exist. If so you've already completed steps 1 and 2 so do NOT want to do them again as they'll overwrite any data already on the filesystem.
Last edited by MensaWater; 10-17-2005 at 09:23 AM.
Its arbitrary. You're just making an empty directory path. This is the directory you would go to as the base of the filesystem.
If you do "df -k" on your system you'll see your existing filesystems. The first column is the "device" and the last column is the "mount point".
A good example that most fstabs will have is the CD. From my Debian for example:
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
For above entry /dev/cdrom is the device and /cdrom is the mount point. If you do NOT have a CD in the CD drive and do ls -l /cdrom you'll see it is an empty directory. However once you put a CD in the drive and it mounts and you do an ls -l /cdrom you'll see the contents of the CD.
Note that /dev/cdrom can actually be mounted on ANY directory (assuming it isn't busy). You could if you wanted do:
then edit fstab to have "/mycd" instead of "/cdrom" as the mount point.
Here are the entries from mtab & fstab. Adding the information in the files doesn't appear to be too difficult. I'm just curious what the additional information means and how do I adapt it to my particular system. Let me know if you could.
Do NOT edit /etc/mtab. This file is maintained by the mount itself. It just shows you what IS mounted at the point you look at it.
/etc/fstab on the other hand is the table of what SHOULD BE mounted and is typically used at boot time to mount the filesystems. As noted in my prior post it IS intended to be edited and is read when you type a mount command that doesn't specify all the information.
You can see details of fstab just by typing "man fstab". Also "man mount" will give you more information. Different filesystem types will have different options.
For the first filesystem in your fstab:
/dev/sda2 / reiserfs acl,user_xattr 1 1
/dev/sda2 = The device to be mounted. From its name we can tell:
-sd = SCSI Disk
-sda = First SCSI Disk
-sda2 = Partition two of First SCSI Disk
/ = The mount point (directory). "/" by itself is called "root" and all other mounts have to be somewhere below root in the heirarchical directory structure of Linux/Unix.
reiserfs = Filesystem type. A couple of others are ext2, ext3.
acl,user_xattr = Comma delimited list of options for the filesystem type. Some options are common to multiple filesystem types but some are unique to the one you are using. You can have more or less options than seen for this example. The "man mount" will tell you the
meaning of most options.
The 1 and 1 = fs_freq and fs_passno respectively. Look at "man fstab" for detailed explanation of what these do.