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.
You should not manually edit the /etc/mtab file. This is automatically updated by the mount command to show what filesystems are in use.
What distribution did you install? Most use either /mnt or /media for removable filesystems i.e. USB drives, CDs/DVDs, floppies etc or anything not associated with the operating system. No law says you have to.
Those numbers that were displayed during the partitioning process in a nutshell tell you the partition ID and where it is located on the hard drive. labels are part of the filesystem and are specified during the formating process. To use labels in the fstab file you must first have actually labeled the partition. In addition you must specify the partition ID in your fstab file too.
What was the ID of the partition you created? If you do not remember you can use the fdisk command:
fdisk -l /dev/sdc (that is a small L and you must be root)
You must specify the partition ID when creating the file system. To create an ext3 filesystem
mk2fs -t ext3 -j -L label_name /dev/sdc1 (example only, you must specify the real partition ID. You could lose data if not careful).
You can specify a label using tune2fs after the filesystem is created.
Google for fstab and mount command for information about what defaults and the 0 0 mean. defaults is a predefined list of options that apply when that filesystem is mounted.
Is this really good practice to mount it in mnt or media?
Mount them anywhere you want. When I first started with Linux everything that was mounted by the system was mounted under /mnt. Now it's all under /media. I'm not talking about mounts I add. These are the ones that the system 'discovers' and mounts conveniently for you. I believe it's common practice to use /mnt or /media.
Why are you making filesystems? If you want to mount /dev/sdc1 all you need to do is make a mount point, mkdir /mnt/vol3. Then edit /etc/fstab and add a line at the bottom of the file like this: /dev/sdc1 /mnt/vol3 ext3 defaults 0 0. Then in a terminal type mount -a or mount /mnt/vol3 and the partition will be mounted. It's that simple. I think that you are making this more complicated than it really is. Here's the steps you need to take, and forget the LABEL stuff. Open a terminal as root. Type:
mkdir /mnt/vol3 <-- Assuming you haven't done this yet. If you did, skip this step.
gedit /etc/fstab <--- (use your favorite text editor)
/dev/sda1 /mnt/vol3 defaults 0 0 <--- Add this to the bottom. Use cut and paste if you want. This line will work for you. Save file.
mount /mnt/vol3 or mount -a <-- Use one command or the other.
As suggested you do not need to use volume labels in the fstab file.
However, you do need to use the exact label name that was used when you created the filesystem. The volume label you created as suggested by your last post is vol3 not /vol3 so your fstab entry should be:
label=vol3 /mnt/vol3 defaults 0 0
[glenn@toshiba ~]$ mount
/dev/sda5 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda2 on /media/vista type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/sda6 on /media/ubuntu type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/sdb1 on /media/MY POCKET type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=500)
/dev/sda1 on /media/TOSHIBA SYSTEM VOLUME type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
The only mention of LABEL is with regards to the partition that Fedora 8 is installed on. The root partition. LABEL is not used anywhere else.
Last night, I took one step further but was stuck. My system consists the following disks --> sda/sdb/sdc.
In this post, I inquired about sdc where it was a blank disk (never mounted and without a partition define)
But on sdb, I had specify /software to be 100 gb out of that disk during the OS install so I still have the remainder of space in that disk.
Last night I did the following if I can recall:
1) fdisk /dev/sdb (then use the text menu to create the partition).
2) Next I did fdisk -lu /dev/sdb it lists
/dev/sdb (some stuff here that I cannot recall now)
/dev/sdb1 (some stuff here that I cannot recall now)
3) at this step, do I go straight into fstab and add an entry there and make a directory to mount? I tried creating a filesystems here but it won't allow me. I said something about if I specify the device correctly.
I forgot which part I went to specify the cyclinder head (starting point and ending point).
Anyways, I will try tomorrow to redo it once I get my data off the system.