[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:slackware_admin:how_to_configure_fstab_and_lilo.conf_with_persistent_naming [2016/08/17 13:17 (UTC)] – [How to configure lilo.conf and fstab with persistent naming] swap the fstab and lilo.conf in title to match page title bassmadrigalhowtos:slackware_admin:how_to_configure_fstab_and_lilo.conf_with_persistent_naming [2018/01/11 15:32 (UTC)] (current) – [LABEL and UUID] Update to mention root entry in lilo is not needed when -r is used in the initrd bassmadrigal
Line 1: Line 1:
 <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). -->
- 
-FIXME This is a work in progress. It is not complete and may screw up your system if you follow it. I will not be blamed for any nuclear wars started because of this. It should be finished in the next day or two. FIXME 
  
 ====== How to configure fstab and lilo.conf with persistent naming ====== ====== How to configure fstab and lilo.conf with persistent naming ======
Line 174: Line 172:
  
 mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda2 -m jbd2:mbcache:ext4 -u -o /boot/initrd.gz mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda2 -m jbd2:mbcache:ext4 -u -o /boot/initrd.gz
 +
 root@darkstar:~# blkid root@darkstar:~# blkid
 /dev/sda2: UUID="25a4dafe-bbf2-413f-a60c-8c38efc0a122" TYPE="ext4" PARTUUID="1ae0ebfe-02" /dev/sda2: UUID="25a4dafe-bbf2-413f-a60c-8c38efc0a122" TYPE="ext4" PARTUUID="1ae0ebfe-02"
 /dev/sda1: UUID="d21b5f69-6d0c-48fb-b67c-912ebb0fd18e" TYPE="swap" PARTUUID="1ae0ebfe-01" /dev/sda1: UUID="d21b5f69-6d0c-48fb-b67c-912ebb0fd18e" TYPE="swap" PARTUUID="1ae0ebfe-01"
 +
 root@darkstar:~# mkinitrd -c -k 4.4.14 -f ext4 -r "UUID=25a4dafe-bbf2-413f-a60c-8c38efc0a122" -m jbd2:mbcache:ext4 -u -o /boot/initrd-4.4.14.gz root@darkstar:~# mkinitrd -c -k 4.4.14 -f ext4 -r "UUID=25a4dafe-bbf2-413f-a60c-8c38efc0a122" -m jbd2:mbcache:ext4 -u -o /boot/initrd-4.4.14.gz
 OK: /lib/modules/4.4.14/kernel/fs/jbd2/jbd2.ko added. OK: /lib/modules/4.4.14/kernel/fs/jbd2/jbd2.ko added.
Line 188: Line 188:
 root@darkstar:~#</code> root@darkstar:~#</code>
  
-As you'll notice, the command provided by mkinitrd uses ''/dev/sda2'' as the root drive, so we need to change that to match the UUID of the drive before running the mkinitrd command. By default, it will output the ''/boot/initrd.gz'' file, but I prefer to call mine based on the kernel version (which is helpful to ensure you don't overwrite a known-good initrd).+As you'll notice, the command provided by mkinitrd uses ''/dev/sda2'' as the root drive, so we need to change that to match the UUID of the drive before running the mkinitrd command. By default, it will output the ''/boot/initrd.gz'' file, but I prefer to call mine based on the kernel version (which is helpful to ensure you don't overwrite a known-good initrd). When including the root partition in your initrd, it can be removed from lilo, since it won't use it (however, I've left it in but commented it out for visual reference).
  
 Once you generate an initrd, you need to reference it in your stanza. I don't have any labels set for my primary drive, so I added an example that is commented out. You can use one or the other. As before, I commented out the original device, but it doesn't have to remain in the conf file. Once you generate an initrd, you need to reference it in your stanza. I don't have any labels set for my primary drive, so I added an example that is commented out. You can use one or the other. As before, I commented out the original device, but it doesn't have to remain in the conf file.
Line 197: Line 197:
 initrd = /boot/initrd-3.10.17.gz initrd = /boot/initrd-3.10.17.gz
 #root = /dev/sda2 #root = /dev/sda2
-root = "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d"+#root = "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d"
 #root = "LABEL=Mylabelhere" #root = "LABEL=Mylabelhere"
 label = Slack-generic label = Slack-generic
Line 244: Line 244:
 The LBA32 warning is normal with Slackware's ''lilo.conf'' and can be ignored (however, you can get rid of it by added ''LBA32'' in the Global section of your ''lilo.conf''). The main thing we're looking for is that all of our stanzas were added and no errors were issued. If that worked, then we can run lilo by itself to finish the process. The LBA32 warning is normal with Slackware's ''lilo.conf'' and can be ignored (however, you can get rid of it by added ''LBA32'' in the Global section of your ''lilo.conf''). The main thing we're looking for is that all of our stanzas were added and no errors were issued. If that worked, then we can run lilo by itself to finish the process.
  
-<code>root@darkstar:~# lilo -t+<code>root@darkstar:~# lilo
 Warning: LBA32 addressing assumed Warning: LBA32 addressing assumed
 Added Slack-partuuid  +  * Added Slack-partuuid  +  *
 howtos:slackware_admin:how_to_configure_fstab_and_lilo.conf_with_persistent_naming ()