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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-17-2005, 08:32 AM
|
#1
|
Member
Registered: Dec 2004
Posts: 50
Rep:
|
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
|
|
|
10-17-2005, 09:19 AM
|
#2
|
Senior Member
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020
Rep:
|
Hello,
post the entries of
#cat /etc/fstab
and
#fdisk -l
regards
|
|
|
10-17-2005, 09:22 AM
|
#3
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
10-17-2005, 11:38 AM
|
#4
|
Member
Registered: Dec 2004
Posts: 50
Original Poster
Rep:
|
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.
|
|
|
10-17-2005, 11:54 AM
|
#5
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
10-17-2005, 07:54 PM
|
#6
|
Member
Registered: Dec 2004
Posts: 50
Original Poster
Rep:
|
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
|
|
|
10-18-2005, 08:59 AM
|
#7
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
All times are GMT -5. The time now is 12:33 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
|
|