LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-17-2005, 08:32 AM   #1
odyssey84
Member
 
Registered: Dec 2004
Posts: 49

Rep: Reputation: 15
Hard drive partitions not set up in fstab/mtab


Greetings,

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.

Thanks,

Scott
 
Old 10-17-2005, 09:19 AM   #2
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
Hello,
post the entries of
#cat /etc/fstab
and
#fdisk -l

regards
 
Old 10-17-2005, 09:22 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,681
Blog Entries: 14

Rep: Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022
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.
 
Old 10-17-2005, 11:38 AM   #4
odyssey84
Member
 
Registered: Dec 2004
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks. I'll have to post the entries later - I'm not at the machine at the moment.

I'm having trouble with the 3rd step (make the directory "mount point"). Is this an arbitrary designation and what are the steps?

Thanks again.
 
Old 10-17-2005, 11:54 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,681
Blog Entries: 14

Rep: Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022
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:

mkdir /mycd

then edit fstab to have "/mycd" instead of "/cdrom" as the mount point.
 
Old 10-17-2005, 07:54 PM   #6
odyssey84
Member
 
Registered: Dec 2004
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks.

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.

/etc/mtab

/dev/sda2 / reiserfs rw,acl,user_xattr 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/sdc1 /media/BUSLINK subfs rw,nosuid,nodev,sync,fs=floppyfss,procuid 0 0
/dev/fd0 /media/floppy subfs rw,nosuid,nodev,sync,fs=floppyfss,procuid 0 0

/etc/fstab
/dev/sda2 / reiserfs acl,user_xattr 1 1
/dev/sdb1 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/dvdrecorder /media/dvdrecorder subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/dvdrecorder2 /media/dvdrecorder2 subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs noauto,fs=floppyfss,procuid,nodev,nosuid,sync 0 0
 
Old 10-18-2005, 08:59 AM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,681
Blog Entries: 14

Rep: Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022Reputation: 1022
First:
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 07:15 AM
mtab and fstab problems Henster Linux - General 4 08-31-2004 06:38 AM
/etc/fstab or /etc/mtab praveenv Linux - Newbie 1 08-17-2004 05:03 AM
use mtab as fstab?hi rgiggs Mandriva 5 06-08-2004 01:47 PM
what is the difference between /etc/fstab and /etc/mtab ? Xavius Linux - Newbie 2 03-27-2004 09:15 AM


All times are GMT -5. The time now is 03:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration