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 revision Previous revision
howtos:slackware_admin:how_to_configure_fstab_and_lilo.conf_with_persistent_naming [2017/02/10 13:55 (UTC)]
bassmadrigal Oops... don't need to test lilo a second time.
howtos:slackware_admin:how_to_configure_fstab_and_lilo.conf_with_persistent_naming [2018/01/11 15:32 (UTC)] (current)
bassmadrigal [LABEL and UUID] Update to mention root entry in lilo is not needed when -r is used in the initrd
Line 172: 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 186: 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 195: 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

In Other Languages
QR Code
QR Code howtos:slackware_admin:how_to_configure_fstab_and_lilo.conf_with_persistent_naming (generated for current page)