fstab component update
Lots of development work has been happening for the LCFG fstab component recently and now have a new release ready for wider testing within the community…
This update resolves a number of issues which have been causing trouble for installs, in particular for those systems using UEFI and with multiple disks.
Disk Filtering
It is now possible to select the device for disk configuration based on parameters from the lsblk(8) output. Previously you had to know in advance the name of the device (e.g. sda or sdb) but that is rather problematic when you have multiple disks in a system and they can swap names on every boot.
The filtering is done by specifying the attribute, a value and a comparison function. You may combine as many filters as necessary to select a unique disk device.
For example, to select an NVME disk use this filter:
!fstab.device_primary mSET(filter: subsystems~contains~nvme)
To select a disk smaller than 400G use a filter like this:
!fstab.device_primary mSET(filter: size~lt~400G)
note that sizes may be expressed in K, M, G (and also KiB, MiB, GiB if you prefer).
There are 7 comparison functions: contains, starts, ends, equals, gt, lt, is
The ‘is
‘ method supports testing values for 'null', 'defined', 'true', and 'false'
.
All comparisons may be negated by using the word not
as either a prefix or suffix. It can be simply appended or an underscore may be used as a separator to improve readability.
For example, to exclude all rotational disks:
!fstab.device_primary mSET(filter: rota~is_not~true)
or, to avoid nvme drives:
!fstab.device_primary mSET(filter: subsystems~not_contains~nvme)
There are lots more possibilities, run the lsblk --help
command to get a full list of the supported attributes with explanations of the specific meanings.
Mount by UUID
There is now support for mounting partitions by UUID (and also label, partuuid and partlabel). On SL7 this was supported on a per-partition basis, for Ubuntu it is slightly different in that it is enabled on a per-disk basis. This is due to the way the FAI setup-storage utility behaves.
It can be enabled by setting the mountby
resource for any disk. For example:
!fstab.mountby_primary mSET(uuid)
This is the default for the primary disk which means that when UEFI boot is used the /boot/efi
partition will always be mounted by UUID. That avoids boot problems when multiple disks are installed that do not reliably come up with consistent names (e.g. sda and sdb are swapping).
Partition Encryption
There is new support for encrypting partitions, in particular, this restores the ability to use encrypted swap and /tmp
. Due to limitations in the FAI setup-storage utility this can only be used with primary partitions for a disk, it doesn’t work for LVM volumes.
This is enabled by setting the relevant value for the type
resource for the partition. For example:
!fstab.type_swap mSET(encrypted-swap)
PMBR boot flag
There is new support for setting the PMBR boot flag on a disk. This is required by the UEFI firmware for some desktop models. It was previously achieved by running the required parted
command from the installer.
Recent comments