LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-30-2014, 06:59 AM   #1
Soderlund
Member
 
Registered: Aug 2012
Posts: 185

Rep: Reputation: 81
Is UUID in fstab and LILO discouraged?


Debian uses UUID (blkid) in /etc/fstab automatically, but neither Slackware nor LILO do. FreeBSD doesn't use it either. I just wonder if there is a reason for this?

If you have two drives and install on /dev/sdb, and then unplug the other one, then the install should be on /dev/sda, which would prevent LILO from chainloading and Slackware from booting -- unless they used UUIDs to refer to the partitions.
 
Old 05-30-2014, 07:15 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,175

Rep: Reputation: Disabled
UUID usage is not at all discouraged in fstab and lilo.conf in Slackware.

They are simply not used to write /etc/fstab during installation and by liloconfig to write /etc/lilo.conf.

But of course you can edit /etc/fstab and /etc/lilo.conf after installation and use UUID as you see fit, e.g. in case of removable devices. That's just a kind of tweaking you have to do manually when using Slackware.

Last edited by Didier Spaier; 05-30-2014 at 07:28 AM.
 
1 members found this post helpful.
Old 05-30-2014, 08:29 AM   #3
Xsane
Member
 
Registered: Jan 2014
Posts: 186

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by Didier Spaier View Post
That's just a kind of tweaking you have to do manually when using Slackware.
There is a utility to do this packaged with lilo:

usr/sbin/lilo-uuid-diskid

Unfortunately, it is currently broken for Slackware. I sent a patch to the maintainer Joachim Wiedorn. He told me it would be applied in the next lilo release. The patch can be applied manually in the mean time, if anyone wants to use it:

http://lists.alioth.debian.org/piper...ch/000066.html
 
3 members found this post helpful.
Old 05-30-2014, 08:57 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251

Rep: Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158
If you unplug a disk, you'd reckon you'd be aware of it and could update the boot-loader (I haven't used lilo in over a decade FWIW).

Debian based distros introduced UUID when libata was merged and they couldn't predict if devices would be /dev/hd? or /dev/sd? when the installer ran. Fedora used LABEL for similar reasons. Note these are filesystem attributes, not partition - unless you choose to use partuuid with gpt disk.
If you happen to use cloning imaging techniques, you will eventually run into problems with both UUID and LABEL.

Last edited by syg00; 05-30-2014 at 09:05 AM. Reason: strikeout
 
2 members found this post helpful.
Old 05-30-2014, 03:44 PM   #5
Soderlund
Member
 
Registered: Aug 2012
Posts: 185

Original Poster
Rep: Reputation: 81
Interesting. Thanks for the replies and the patch.

Quote:
Originally Posted by syg00 View Post
If you unplug a disk, you'd reckon you'd be aware of it and could update the boot-loader (I haven't used lilo in over a decade FWIW).
Haha, yes, you have a point there. So which one do you use with Slackware? Not grub?

I decided to use it in fstab but not in LILO. If you use it in LILO, it's only supported for boot and root (using an initrd), and doesn't appear to work for other. Unfortunately I am only interested in other because LILO is on the MBR and chainloads 4 other partitions, and they all have their own boot loaders. LILO has a small /dev/sdb1 partition for the map file, which is not "governed" by any distribution (but it can be installed from Slackware or SystemRescueCD). There are no kernels on that partition since it only chainloads. The idea was that I would never have to update LILO once I have installed it, so the system would never become unbootable. UUIDs would help toward that end.

Code:
LILO               (MBR/sdb1) // "Never" updated
|-> FreeBSD        (sdb2)
|-> OpenBSD        (sdb3)
|-> Slackware/LILO (sdb9) // Updated by "lilo -C /etc/lilo.conf"
+-> Debian/Grub2   (sdb14) // Must be --forced to use blocklists
Of course, just about every distribution other than Slackware thinks it's a good idea to overwrite the MBR without asking, so it still has to be reinstalled all the time. And UUIDs change when a partition is formatted anyway, so maybe /dev/xxx is better for my purposes.

By the way, I just noticed that you can't mount UFS2 partitions in fstab by UUID, and blkid won't print it unless you invoke with "-p -n ufs" (but that prints a very short UUID which doesn't match the partition's UUID as printed by Debian's blkid). It works in Debian though.
 
Old 05-30-2014, 03:53 PM   #6
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 955

Rep: Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539
Quote:
Originally Posted by Soderlund View Post
If you have two drives and install on /dev/sdb, and then unplug the other one, then the install should be on /dev/sda, which would prevent LILO from chainloading and Slackware from booting -- unless they used UUIDs to refer to the partitions.
I was having same problem, that is the reason I'm using UUID on fstab and lilo for more than year.
I don't remember if this is right, but if you set UUID on lilo you must use an initrd.
 
Old 05-30-2014, 03:55 PM   #7
Xsane
Member
 
Registered: Jan 2014
Posts: 186

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by syg00 View Post
If you unplug a disk, you'd reckon you'd be aware of it and could update the boot-loader (I haven't used lilo in over a decade FWIW).

Debian based distros introduced UUID when libata was merged and they couldn't predict if devices would be /dev/hd? or /dev/sd? when the installer ran. Fedora used LABEL for similar reasons. Note these are filesystem attributes, not partition - unless you choose to use partuuid with gpt disk.
If you happen to use cloning imaging techniques, you will eventually run into problems with both UUID and LABEL.
Technically, you use diskid (/dev/disk/by-id/) for the boot device. Some people use the terms UUID and diskid interchangeably.

To my knowledge there is no UUID standard, RFC-4122 is on track to be. Diskid is, or should be, a universally unique identifier.
 
Old 05-30-2014, 04:11 PM   #8
Xsane
Member
 
Registered: Jan 2014
Posts: 186

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by Soderlund View Post
And UUIDs change when a partition is formatted anyway, so maybe /dev/xxx is better for my purposes.
Diskid's (/dev/disk/by-id/) have unique IDs for partitions that should not change with formatting.
 
Old 05-30-2014, 07:40 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251

Rep: Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158Reputation: 4158
Quote:
Originally Posted by Xsane View Post
Technically, you use diskid (/dev/disk/by-id/) for the boot device.
Not in grub[2].
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to use UUID on fstab and grub nicolasdiogo Debian 3 08-24-2011 02:46 PM
Having issues with the changes to fstab (UUID's) Cage47 Linux - Hardware 4 01-15-2010 12:54 PM
fstab sdxx or uuid or ... jesses93 Linux - General 1 01-05-2010 03:02 PM
UUID, grub, and fstab radiodee1 Debian 4 09-16-2008 05:56 AM
How to clone HD when using UUID in fstab? Frank64 Linux - General 5 03-09-2008 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration