setup-storage - UEFI, LVM & LUKS

Martin Krämer mk.maddin at gmail.com
Wed May 9 19:48:59 CEST 2018


Hi everyone,

I am trying to setup a device using UEFI mode, LVM and LUKS encryption.
Unfortunately I end up using the error below.
____________________________________________________________
Calling task_partition
Starting setup-storage 2.1
Using config file: /var/lib/fai/config/disk_config/FW_UEFI_LUKS
Syntax error: invalid partition type at
/usr/share/fai/setup-storage/Parser.pm line 180, <$config_file> line 1.

This is your disk_config file:
# <type> <mountpoint> <size>   <fs type> <mount options> <misc options>

disk_config disk1 disklabel:gpt bootable:2 fstabkey:uuid
primary /boot/efi 512 vfat rw
logical - 95-100% - -

disk_config cryptsetup
luks - disk1.5 - -

disk_config lvm
vg system disk1.5
system-swap swap RAM:105% swap defaults
system-root / 90-100% ext4 rw,noatime,errors=remount-ro

Error in task partition. Code: 710
____________________________________________________________

As soon as I change "disklabel:gpt" to "disklabel:msdos" the setup-storage
action works correctly.
But of course I end up with an not booable system using that disk config...
Any idea what could be the error on this? I am absolutely stuck at the
moment :(

Thank you everyone in advance



Disk configurations that are nearly similar to previous one and working
correctly are:

############# Legacy boot mode with LVM and LUKS #############
___________________________________________________________
disk_config disk1 disklabel:msdos bootable:2 fstabkey:uuid
primary /boot 512 ext3 defaults
logical - 95-100% - -

disk_config cryptsetup
luks - disk1.5 - -

disk_config lvm
vg system disk1.5
system-swap swap RAM:105% swap defaults
system-root / 90-100% ext4 rw,noatime,errors=remount-ro
-------------------------------------------------------------------------------------------------------
Calling task_partition
Starting setup-storage 2.1
Using config file: /var/lib/fai/config/disk_config/FW_BIOS_LUKS
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/vda mklabel msdos
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
    Creating directory "/run/lock/lvm"
    No volume groups found.
Executing: parted -s /dev/vda mklabel msdos
Executing: parted -s /dev/vda mkpart primary "ext3" 1048576B 537919487B
Executing: parted -s /dev/vda mkpart extended "" 537919488B 42949672959B
Executing: parted -s /dev/vda set 2 boot on
Executing: parted -s /dev/vda mkpart logical "" 537920512B 42949672959B
Executing: mkfs.ext3  /dev/vda1
Executing: head -c 2048 /dev/urandom | od | tee /tmp/fai/crypt_dev_vda5
Executing: yes YES | cryptsetup luksFormat /dev/vda5
/tmp/fai/crypt_dev_vda5  -c aes-cbc-essiv:sha256 -$
Executing: cryptsetup luksOpen /dev/vda5 crypt_dev_vda5 --key-file
/tmp/fai/crypt_dev_vda5
Executing: pvcreate -ff -y  /dev/mapper/crypt_dev_vda5
Executing: vgcreate  system  /dev/mapper/crypt_dev_vda5
Executing: vgchange -a y system
Executing: lvcreate  --yes -n swap -L 2104.44609375 system
Executing: mkswap  /dev/system/swap
Executing: lvcreate  --yes -n root -L 37938.0829394531 system
Executing: mkfs.ext4  /dev/system/root
/dev/vda1 UUID=2d95b9d9-15e6-4bb7-8bf2-a61a392ae870
/dev/system/swap UUID=fd5ec287-d758-4aa8-a085-1f6b991d2cfc
/dev/system/root UUID=f12cb440-cc43-4a2a-a545-96169e24650c
Calling task_mountdisks


############ UEFI boot mode without LVM and LUKS ############
___________________________________________________________
disk_config disk1 disklabel:gpt bootable:3 fstabkey:uuid
primary /boot/efi 512 vfat rw
primary swap   RAM:105%   swap  sw
primary /      90-100%     ext4  rw,noatime,errors=remount-ro
-------------------------------------------------------------------------------------------------------
Calling task_partition
Starting setup-storage 2.1
Using config file: /var/lib/fai/config/disk_config/FW_UEFI
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/vda mklabel gpt
Executing: parted -s /dev/vda mklabel gpt
Executing: parted -s /dev/vda mkpart primary "fat32" 1048576B 537919487B
Executing: parted -s /dev/vda mkpart primary "linux-swap" 537919488B
2742603775.6B
Executing: parted -s /dev/vda mkpart primary "ext3" 2742603776.6B
42949655551.6B
Executing: parted -s /dev/vda set 3 boot on
Executing: mkfs.vfat  /dev/vda1
Executing: mkswap  /dev/vda2
Executing: mkfs.ext4  /dev/vda3
/dev/vda2 UUID=68b8c4c1-927f-48cd-a425-0ff30f4a69c8
/dev/vda3 UUID=78d000b5-d84f-49c4-9bee-954bf7469105
/dev/vda1 UUID=3A65-9DA7
Calling task_mountdisks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20180509/be00adfe/attachment.html>


More information about the linux-fai mailing list