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.
After changing/upgrading my distro a few times, I really need to hit GParted and rearrange my hard drive partitions. Trouble is, I'm having difficulty establishing which partitions on my hard drives (I have two) contain what, and my Gnome file manager (Nautilus 2.20.0) is of little help, since the various drives and partitions come up with names like "system", "disk-1", "disk-2" etc, which bear no resemblance to the hda1, hda2, hdb1 etc I am seeing in GParted. Is there a way, or a command in the Shell, I can use to give my partitions more useful names; or any other method I can use to establish which of my drive partitions is which? At the moment, "disk-2" for instance could be any one of them....
Aside from anything else, I am consider putting my current /home onto its own partition, so I would like to tidy it all up a bit before I do this.
An organized way to figure what is going on and a way to clean things up is (only my opinion):
1. Boot from a LiveCD
2. fdisk -l
3. mkdir /mnt/partition1
4. mkdir /mnt/partition2
5. mkdir /mnt/partitionX
6. Grab Pen and Paper
7. mount /dev/sdbX (or hda whatever your drive type might be) /mnt/partitionX
8. Repeat until everything is mounted.
9. ls -lta /mnt/partition1
10. Write on your piece of paper, what is in that drive
11. Repeat for Each Partition
12. (Optional) Go into fdisk /dev/sdb and edit the disklabel.
13. (Optional) Reformated and Re-install to your liking
Thanks for the info. It seems to me that the system I currently have running (Ubuntu) has set up the fstab just for its own use - and not put in any entries except the one it needs (sda6). I know sda1 has Windows XP on it, and GParted does give me information on the partitions themselves - it was just that I had no direct connection between what I saw in GParted and what I see in the file manager.
I do have a Knoppix DVD and so I shall load this up to see if it gives me any more info on what is what. I just wondered if there was a quick way to give the partitions meaningful labels, but I don't think it's a good idea for an amateur like me to be adding my own stuff into the fstab Ubuntu created when it installed!
Had an idea, and solved the problem in a round-about way. I booted from a live CD I had of "Puppy Linux", which aside from sitting entirely in RAM also gives you a hard drive listing very simply split into hda1, hda2, hda3 etc, which you have the opportunity of mounting then opening/browsing in a basic file manager. I went through mounting every partition and putting an empty file in each one called "This is on hda3.txt" etc for each partition. Now when I boot into Ubuntu I can call up a certain directory in Nautilus and see which little empty file is in that directory, indicating to me which partition it actually is.
So, got there in the end! Anyway, thanks for the advice I received on this thread.
Well, it appears I'm too late but in case anyone has a similar question, it is perfectly possible to use labeling. This is the default behaviour on Red Hat alikes (Fedora, CentOS): they attach a label to partitions during install, e.g. /, /tmp, /var, /home, etc. One can do this manually, too. For example, if you have a partition full of movies, there is nothing stopping your from naming it /movies. The nice part is that these labels will be shown even when the system is not mounted, for example when one is using gparted.
Naming the directories where filesystems are mounted would be a good idea for non-system directories. When using your computer, you don't really care whether it is a mounted partition or just a directory.
For system directories, you don't want to change the names. So if you have a partition mounted on /home or /usr, leave it alone. It already has a meaningful name.
Labeling filesystems is a very good idea for removable drives. The next time you plug in a drive it may be assigned a different device. If you label the filesystem it will be automounted over a directory below /media/ by the name of the label. So an external drive labeled "movies" will be mounted /media/movies/.
If you don't use the automount system and want to have an entry in /etc/fstab instead, then instead of a device name you can use "LABEL=movies" or "UUID=<the-uuid-number>". For external drives, use the "noauto" option to prevent the system from hanging when trying to mount a non-attached external drive.