General :: Label Versus UUID In Fstab And Menu.lst?

Jan 2, 2010

I realized that my understanding of UUIDs in Linux to specifying hard disk partitions may be erroneous.

The proverbial wisdom is that one should not use hard-coded device specifications in fstab and in the boot menu.lst, such as /dev/sda1 etc. The reason normally given is that if hard disk order changes or the order of partitions change, then the entries will be incorrect since they are hardcoded to partitions following a specific order.

So my understanding was that using hard disk labels, in the form of LABEL=xxxx, or UUIDs in the form of UUID=some-uuid, would prevent these problems when disk order or partition order changed.

I decided to avoid the use of LABEL in case I wanted to change the LABEL on a partition to make the names of partitions more easily identifiable. I then thought that UUID was ideal since it never changed for a partition no matter even if I moved that partition to another drive or added another hard drive and thus changes the order of hard drives on my computer. I essentially thought that once UUID was determined for a partition, it never changed but was somehow part of the partition in the hardware of my computer.

Then I became curious of how a UUID was determined. I did this because I often make backups of partitions on external SATA drives and wanted to make sure that somehow the backup would not duplicate whatever Linux considers the UUID of a partition and present a Linux distribution with two UUIDS which are somehow the same and therefore confuse the Linux distribution to the point that I could not use it. I am aware that UUID means a unique id, but I wanted to make sure I understand how that unique id is determined in Linux. This is especially true since the tool I use to make backups of an entire partition is a Windows application, and not a Linux application, and I wanted to make sure that the backup partition UUID would not duplicate that of an existing partition.

In my very brief research in how a UUID is generated under Linux it appears that it is not something that is part of the hardware of the partition itself but rather a number generated by some parameters of the partition, one of which is the partition order.

If it is, it means to me that if I move a partition from one place to another, even on the same hard drive, or to another hard drive, a Linux distribution will no longer find the partition based on the UUID. In that case it seems as if the UUID is subject to the same weakness as the device specification in fstab and menu.lst in that the order of a partition or the placement of a partition on a particular hard drive will cause the designation to no longer refer to the same partition. In which case it appears to me that only the LABEL parameter is not subject to this weakness and as long as I keep distinct labels for all partitions on my hard drive I could theoretically move them around at will and a Linux distribution will find them correctly. I am aware of course that my computer must always find the boot partition to be able to boot a Linux distribution, so moving Linux parttions where I want them is subject to the ability of my computer to find them from the MBR of my hard drives. But in the main it now appears to me that the best way to insure that moving partitions does not keep a Linux distribution from botting correctly is to use LABEL, and not UUID, in fstab and menu.lst, and of course to make sure that if I decide to change the LABEL of a partition that I must change its entry in fstab and possibly menu.lst before rebooting that distribution.

If I have been wrong in my latest surmises I would appreciate being corrected, as the information I found on UUIDs and how they are generated may not be correct. Also if there is more exact information on exactly how partition UUIDs are generated in Linux I would appreciating anyone pointing it out to me.

View 10 Replies


ADVERTISEMENT

Hardware :: Using UUID Or LABEL In Fstab And Menu.1st?

Apr 9, 2010

I have a question about mounting partitions. I thought of using UUID or LABEL in fstab and menu.1st Is there an advantage of one over the other?

View 5 Replies View Related

General :: Fstab Sdxx Or Uuid Or / Disk And Partitions In The Fstab File?

Jan 5, 2010

What would be the best way list disk and partitions in the fstab file?

View 1 Replies View Related

Debian :: Umounting With LABEL=label In Fstab ?

Jan 31, 2010

I'm having trouble umounting partitions.

This is the entry I have in /etc/fstab for backup:

I can mount it ok:

But can't umount it:

View 3 Replies View Related

Hardware :: Changes To Fstab (UUID's) / Revert Fstab's Listings Back To The Old /dev/hd Settings?

Jan 15, 2010

I've had two hd's in my box forever. for more space and backup reasons. Well I have started running the Debian Squeeze distro since December. I've had many issues, some are still unresolved. but now I'm running into major headaches with the fstab. Specifically dealing with/wondering why UUID's are used instead of the old /dev/hd? I was a little annoyed when I tried Kubuntu to find /dev/sd? used instead of /dev/hd? but that was workable. But the UUID's are a nightmare. Here's my problem.

My main box is finally giving up the ghost. The mobo is dying. So in order to do some tests I took my hd bundle (my two hard drives with their cables) physically out of the box and temp installed them in a test box. I wanted to do some benchmark and other tests. I got all kinds of errors. I found that the system wasn't recognizing the UUID's listed in fstab. My concern is when the new mobo gets here next week I won't simply be able to plug the hd's in like I always have been and just let Linux reconfigure itself (Debian used to be good about this). I really don't want to have to clean reinstall if it's not needed.

So for this I have two questions. WHY developers decided to drop using /dev/hd? or even /dev/sd? ?

And is it possible to revert fstab's listings back to the old /dev/hd? settings. In debian fstab had lines commented out showing how each partition was listed in it's /dev/hd? status during install.

I'm getting really sick of all these archane changes in ALL aspects of linux that don't seem to have any good explaination or need.

View 4 Replies View Related

General :: Cameras, Pendrive: Severail UUID Into The /etc/fstab?

Dec 29, 2010

Simple. UUID is apparently limited to a single UUID to be defined. Example UUID="DEB0-0001","3338-3164" separated with a comma is not working.

What could be the linux alternatives for pluging several UUID disks? How to bypass when there is a CF card and a reader box, since blkid gives no UUID ?

Code:
UUID="DEB0-0001" /media/pendrive vfat users,rw,noauto,umask=0000,uid=1000,gid=1000 0 0
#UUID="3338-3164" /media/pendrive vfat users,rw,noauto 0 0
#TYPE="vfat" /media/pendrive vfat users,rw,noauto 0 0

View 3 Replies View Related

Ubuntu :: 10.04 Install - Disabling UUID In Grub2 And Fstab?

Nov 25, 2010

For reasons long and unique, I want to disable UUID in my recent Ubuntu 10.4 install, and use the old fashioned /dev/sda1 /dev/sdb3 etc. method. I had this "all fixed" under GRUB (pre-2) on Ubuntu 8.04 and it has served well and bug free for years. (Warning: I use old stable hardware - others may have disasters.) But with GRUB2, the task seems more complicated. (This guide me make the backups I haven't done since the fresh install 2 weeks ago.)

Is the following process complete, necessary, and accurate...
Edit the file /etc/default/grub to remove the # in the line...
#GRUB_DISABLE_LINUX_UUID="true"
... making sure to add the two " if missing .....

Copy nearly the entire /boot/grub/grub.cfg file
into /etc/grub.d/40_custom and then...
Comment out every line that says...
search --no-floppy --fs-uuid --set (etc.)

Change every line that says...
linux /boot/vmlinuz-2.x.yy-zz-generic root=UUID=(etc.) into...
linux /boot/vmlinuz-2.x.yy-zz-generic root=/dev/sda1
Edit /etc/fstab and change every instance of UUID=(etc.)
to the appropriate drive and partition e.g. /dev/sda1

edit /etc/initramfs-tools/conf.d/resume and change RESUME=UUID=(etc.)
into RESUME=/dev/sda1
Run update-grub

Do all the above, every time I do a kernel upgrade. (Is it important to do all the above before or after rebooting for an upgrade?) Am I correct, succinct, and complete in the above process? Any mistakes? Any omissions?

View 3 Replies View Related

OpenSUSE Install :: Pc Not Starting After Change In Fstab Options ( Uuid )?

Jan 31, 2010

all of a sudden my pc decided no to start anymore.YOu might be aware of the ide/sata driver problem, well it was the problem. I reinstalled grub with suse dvd and it went ok. Pc working properly. But then i tried to fix this once for all and changed the fstab options from /dev-by-id to uuid (all partitions : swap, /, /home etc ).Is uuid a definite solution ?Why is the pc not able to start from there ?

Since i moved the partitions with uuid option in fstab and even after reinstalling grub the pc is not starting anymore . It gives me the boot menu (linux suse/failsafe) and then a black screen left with no keyboard nor mouse available.

[Code]...

View 9 Replies View Related

Ubuntu :: Safe To Change Fstab UUID Entry For The System To /dev/sdb4?

Nov 13, 2010

is it safe to change fstab UUID entry for the system to /dev/sdb4? and after editing fstab, is there a script or command I need to run to release lock or update mount information? edit: I see not correct, and therefore not safe,but is there a format to tell linux to use /dev/sda1 instead of UUID= or label= .

View 9 Replies View Related

Debian :: Use Udev Rules To Prevent HDDs To Change Device Instead Of Using UUID In /etc/fstab?

Dec 15, 2010

UUIDs make fstab hard to read, so.. Is it possible to use udev rules to prevent HDs to change device, instead of using UUID in /etc/fstab?

View 2 Replies View Related

Ubuntu :: Accessing Drive When Fstab Contains UUID's / No Longer Pertinent To Any Hardware On System

Jul 8, 2011

I cloned one of my hard drives to another, using Acronis True Image Home 2011.In the process, of course, fstab got copied verbatim from old to new.I then, using a livecd on a flash drive, mounted the new drive, went into fstab and rewrote the UUID's, using the numbers I'd gotten previously by doing sudo blkid.Now, the new drive had the UUID's revealed by that command.Then, I used boot-repair, from yannubuntu, to make that drive bootable, since it wasn't after the cloning and after the fstab rewrite.The drive is bootable, and it's mountable from a flash drive, or from the old drive.

I can access files either way.the fstab file on the new drive still has the old numbers, yet when I ran boot-repair, it apparently changed the UUID's for sectors 1 and 5 on the new drive.fstab seems to be irrelevant at this point, yet everything I read about it indicates that it is not only relevant, but necessary.I don't understand how I can be accessing the drive when the fstab contains UUID's that are no longer pertinent to any hardware on my system.

View 5 Replies View Related

General :: Difference Between 'LABEL=/1' And 'LABEL=/'

Jun 2, 2010

I have to configure "Oracle Ent Linux 5" in different two server.

After installing the server ,I observer that the grub loader entry are different like:

Machine 1:

Machine 2:

Here , I don't understand the difference between 'LABEL=/1' and 'LABEL=/' .

View 1 Replies View Related

Ubuntu Servers :: Mount A USB Drive In Rc.local With /sbin/mount And UUID Instead Of Fstab?

Feb 6, 2010

I run a headless Ubuntu 8.04 server, which acts as a web, email and file server. I am sticking with 8.04 as it is a LTS release and will upgrade to the next LTS when it is released.

I have two external USB drives, that I need to mount at boot. I have been using /etc/fstab up until now, with the following entries:

Code:

However, as I gather from doing searches is quite common, occasionally I get an error during boot (causing the system to drop to a recovery shell) because the USB drives take time to wake up and the system hasn't found them by the time it reads /etc/fstab.

From doing searches, it seems there is nothing you can do to fstab to fix this, so you need to mount them using an rc.local script instead, using:

Code:

The problem is, as I have two USB drives, their /dev/sdxx location changes between boots. I thus want to use UUID codes as I do in fstab, however I haven't found anything about this.

Does anyone know how I can use the mount command and UUID to mount a drive in rc.local and what options I have to use the mount the drive with the same options that I am using in my fstab entry? Obvisouly, I can't refer back to fstab using the mount command, because then I will still get the boot error issue if they are listed in fstab. And there is no space internally for the USB drives as there is already two internal drives.

View 3 Replies View Related

OpenSUSE :: Change The Slab Menu Label?

Oct 13, 2010

How i can change the slab menu label? I don't like the label saying 'computer' because doesn't make any sense to me.

View 7 Replies View Related

Ubuntu Servers :: HW RAID Disk Shows Up In Fstab But Not In /dev/disk/by-uuid?

Jun 28, 2010

I have an SiI hardware SATA RAID card, with two 500GB disks in mirrored RAID configuration. When I first plugged them in and set it up, things seemed to work ok, but on boot the raid controller told me that the RAID needed rebuilding, and it would happen automatically after POST. So I didn't worry about it, and the drive mounted fine, and it's been that way for years. I just went in and manually on-line rebuilt the RAID in the controller's BIOS, and now when I boot into Ubuntu, both disks show up in fdisk, but neither show up in /dev/disk/by-uuid. Am I missing something?

View 9 Replies View Related

Programming :: Get Uuid Value From Variable Block Got From Menu?

Apr 26, 2010

I try to get uuid value from variable block got from menu.lst.This try does not work. What is wrong?

Code:
uuid=$( echo $block | awk --re-interval '/(root=UUID=/{ x=gensub(/([0-9a-f-]{36,36})/,"\1","g");
print $1}')

View 14 Replies View Related

Debian :: Grub Menu - How To Set Default Format To Use UUID

Sep 21, 2010

I am using Debian lenny (kernel 2.6.26-2-686).

I changed my menu.lst to use
root=UUID=<long uuid string>
instead of the good old
root=/dev/sd...

I did that because, if I boot with a usb drive attached to my computer, sda become sdb and therefor nothing works anymore since my friend Kernel can't mount it's root partition. BTW, it works wonders using the UUIDs. The story darkens each time there is a kernel update, dist-upgrade resets my menu.lst back using the /dev/sd... format. and BANG... no more booting again. I am good to change my menu.lst back each time.

View 2 Replies View Related

Ubuntu :: Desktop Files Versus Menu.xml

Dec 27, 2010

Apparently, there are two ways to make a menu item: create a .desktop file for it in the /usr/share/applications/ directory, or add an entry for it in the /etc/xdg/xfce4/desktop/menu.xml file. Is the choice just a matter of preference, or do these two approaches provide different functionality?

View 2 Replies View Related

Ubuntu :: Get Into Menu.lst And Fstab From Live Cd?

Nov 28, 2010

It looks like my problems with Error 15 are because I have UUID entries instead of root entries.

How can I access menu.lst and fstab using a live cd so I can edit the entries?

It looks like these files are on sda1.

View 3 Replies View Related

Ubuntu :: Default Boot/grub/menu.lst And Etc/fstab Of HD Install

Aug 29, 2010

Due to my script error my boot/grub/menu.lst and etc/fstab files are ruined without being backed up first.

Anyone, the boot/grub/menu.lst and etc/fstab file of Ubuntu 10 LTS installed by default on HD (or whatever).

View 22 Replies View Related

General :: Label And Format USB Drive?

Jun 16, 2010

I have a USB thumb drive that I just partitioned using the 'fdisk' utility in Linux. Now I am trying to learn the command that will allow me to format the drive as 'fat32' while also setting the disk label on the device as "ocz_usb" when the drive gets mounted. Does anyone know the command I would use that will format the USB drive and properly set the disk label at the same time?

View 3 Replies View Related

General :: Creating New Partition And Label ?

Mar 11, 2010

I am a newbie to Linux and I am using CentOs. I am trying to create a new partion on my CentOs VM. I create a new primary partition using fdisk (I use the command fdisk /dev/hda). After I create the partition and use partprobe to write the partition to disk, I try to give the new partition a label. So, I use the command e2label /dev/hda LABEL=test

However, when I enter the command e2label /dev/hda3 , it doesn't display the label for the newly created partition. Am I doing something wrong here? Is the syntax of the e2label command wrong when creating the label for the new partition? Did I miss a step after writing the new partition to disk.

View 4 Replies View Related

General :: Mlabel Command - Can't Re-label

Aug 24, 2010

i was trying to re-label my flash drive and i manged to with the help of this command

mlabel -i /dev/sdc1 -s ::test

what does the -i option means cause after i read the manual pages i couldn't find it there. mlabel only takes the "v" "s" "c" switches and no "i" and when I remove the -i option from the whole command don;t work and i can't re-label. its just driving me crazy that every one is using it and no tells what does it do.

View 2 Replies View Related

General :: Rename Partition Label ?

Mar 7, 2011

I just installed Linux on a second partition. The label of this partition is currently " newlabel " i want to change this to "linux" how to do this.

View 2 Replies View Related

General :: Label A Drive During The Format Command?

Dec 18, 2009

I use to know this command but lost it and did not note the entire command on my Linux cheat sheet. Someone once showed me a simple very easy command I could use to simple format a USB flash drive as FAT32 and in the same command also name the label of the drive.I have the device /dev/sdc1 and I am formatting this as FAT32 so it's compatible across multiple systems but also want the drive to have the name 'my_usb'.

View 3 Replies View Related

General :: Boot Label Changes Using Kick Start

Jan 30, 2011

I am customizing CentOS and doing the entire procedure through ks.cfg file. Everything is been configured properly except the boot label. I would want Boot label to be customized rather than the default one. Is it possible to achieve this using kickstart?

View 2 Replies View Related

General :: Change The Label Of One Partition Without Formatting It

Apr 12, 2010

How can I change the label of one partition on linux without formatting it.

It wll format the partition, and all content disappears.

View 5 Replies View Related

General :: Fdisk / Change The Disk Label Of /dev/sda5 To /dev/sda6?

Mar 26, 2010

I have used fdisk to create two new partition.

Before this partition, I had 6 partition of which /dev/sda6 was the boot partition. I deleted /dev/sda5 partition and hence the earleir /dev/sda6 became /dev/sda5. Now I created two new partitions /dev/sda6 and /dev/sda7.

Due to this change in device label of /dev/sda6 I am not able to boot my computer.

Is there any method to change the disk label of /dev/sda5 to /dev/sda6 ?????

View 14 Replies View Related

General :: Edit UUID Using The Dd Command?

Oct 9, 2010

I have gone over the thread "Learn The DD Command Revised" (It was Fantastic) in the search for a solution to my query.

I have seen posted elsewhere that this code is supposed to be able to change the UUID number of NTFS partitions (useful when multi-booting with Grub2 and cloning partitions). Here is the code:

Code:
sudo dd if=/dev/urandom bs=80 count=1 | xxd -l 80 -c 8 | tail -1 | xxd -r - /dev/sda1
This is assuming that I want to change the UUID on the 1st partition on the 1st hard drive >>>sda1<<<
If I was trying to modify the 2nd partition on the 1st hard drive it would be >>>sda2<<<

[Code].....

NOTE: I was doing this while booting from Ubuntu's Live CD version 10.04.1 LTS (In case that is a factor)

View 10 Replies View Related

General :: Where Is Uuid Of Partitions Of Raid0

Sep 4, 2010

where is uuid of partitions of raid0?

My box is centos 5.4 x86, and dual booting with windows 7. I need to make a ext3 partition between ntfs partition 2 and 3.

After making this ext prtition, I need uuid of this ext partition.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved