Difference between revisions of "Successful booting with UUID"
(Setup of page)
|Line 6:||Line 6:|
Revision as of 20:12, May 26, 2019
Guide to use UUID for consistent booting.
When your system boots, the kernel looks at the fstab file to learn which partitions are available and where these should be mounted in the tree. Since the dawn of time, Unix time anyway, the convention was to list each partition from /dev. This works quite alright if you have only a single disk in your system, but modern computers, servers included, have an increasing amount of disks connected to their hardware and with that, the chance of 'getting it wrong' increases significantly. The result is a kernel panic! Fortunately, Linux has a solution: UUID or Unified Universal IDentification. It works this way: each time a partition is created, the partitioning tool also creates a random, large, unique number for it and assigns this to the partition. Due to its size, it's highly unlikely another partition in the machine will have the exact same number assigned to it. By using this UUID number in fstab the kernel can locate the correct partition to mount in the tree at the correct place and do so consistently. So, it's a good idea to use this UUID stuff, right? But how? Well, that's exactly the purpose of this guide.
Preparing your system
As is common in Linux, everything is a file (except for networking stuff, but that's beyond the scope of this guide) and so is the /etc/fstab file. To be safe, copy the contents of this file to a backup location.
cp /etc/fstab /etc/fstab.bak
Next, obtain the UUID's of each partition in your system. For that, we have the blkid command:
blkid /dev/sd* >> /etc/fstab
<more to come>
Browse all our available articles below. Use the search field to search for topics and keywords in real-time.