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.
Hi guys. Dealing with my first brand new linux server ever. Looking at old servers, the fstab has LABEL=/home1 for example on my old server, but on my new one, it has a bunch of UUID=long string in the first column. I don't know if that's good or bad, what would you say?
Also, if I do a fdisk -l on the new server, it has a bunch of these warnings in it. Does that mean parted has replaced fdisk on newer hardware/OS's?
WARNING: GPT (GUID Partition Table) detected on '/dev/mapper/mpathc'! The util fdisk doesn't support GPT. Use GNU Parted.
Also, last question, say I only have the UUID of a volume, how do I know what /dev/sda# that actually is? Looks like blkid does it, just found it!
Last edited by rjo98; 01-08-2013 at 11:44 AM.
Reason: found blkid
Referencing the drive by its UUID in fstab is more reliable than by device name (/dev/sda1, etc) because device names can change, the UUID won't. LABEL works too, but I don't use it often, UUID is better I think.
fdisk can't use the GPT partition table, hence the warnings. You can still use fdisk to print info about the connected devices as you have, but don't try to use it to modify the partition table for those devices that use GPT, use parted instead. The main advantage of GPT is that it can handle partitions >2TB, which is why it's becoming more and more widely used.
Last edited by suicidaleggroll; 01-08-2013 at 12:42 PM.
fdisk is really obsolete. The man page says "fdisk doesn’t understand GUID Partition Table (GPT) and it is not designed for large partitions. In particular case use more advanced GNU
UUID seems to be all the fashion in Linux now. I gather the argument is that if you move your drives around, /dev/something will change it's meaning but the UUID won't. You can always alter fstab if you feel nostalgic: the system will still work.
Thanks for the replies everyone. I never used parted before, and only ever do a -l to fdisk and don't understand 90% of it anyway haha.
So reading your replies led to a follow-up question/scenario, slightly off topic. Say I have file system problems and have to boot into single user mode. If I do a df -h it won't show me my volumes, so I would do a more /etc/fstab to see the UUID, then do a blkid to find out what /dev/sda# the volume I want to check is, then I can e2fsck that /dev/sda#, right?
Guess I'm missing the basic understanding of how fdisk, fstab, gparted, blkid all tie together. Too bad all that info isn't in one spot for my simple mind haha.
Distribution: Ubuntu 12.04 with KXStudio, MATE & Compiz
"/dev/something" is a lot easier to type when making or editing /etc/fstab entries by hand.
Even so, I now use the UUIDs. One can refer to the human-readable device names in comments
Warning to beginners: /etc/fstab is one of those files that can stop your system booting. It can be anything from a horrible typo to failing to include an instruction not to wait for a device than might not be connected.
Before editing /etc/fstab make a copy. Just...
$ sudo cp /etc/fstab /etc/fstab.0
Because it is a lot easier to...
$ sudo cp /etc/fstab.0 /etc/fstab
...if you have to boot into a shell than it is to dig around, possibly with uncertain vi skills, trying to find your error. Revert to known-to-work copy --- and then try again.
Even now I enforce this rule on myself when editing system files.