Next trial, cryptsetup with and without btrfs

Kai Wilke kiste at netzworkk.de
Wed Jan 4 14:00:56 CET 2017


Hello,

new informations about fai-5.3.2 and Debian stretch (nfsroot).
I have not inserted anywhere extra line breaks (char \).
Line 69 is my first question.

Status:
FAI: Installation aborted.

Releases: Debian stretch (update 03.01.2017), perl-5.24.1~rc4-1,
          fai-5.3.2, setup-storage-2.0

my disk_config:
disk_config disk1 disklabel:gpt-bios bootable:1

primary    -      200      -         -
primary    -      8192     -         -
primary    -      0-       -         -

disk_config cryptsetup
swap  swap /dev/sda2  swap   sw  lukscreateopts="-c aes-xts-plain64 -h sha512"
luks  /    /dev/sda3  ext4   rw  lukscreateopts="-c aes-xts-plain64 -h sha512"

setupt-storage -d -s -f /var/lib/fai/config/disk_config/MYDISKCONFIG
...
Syntax ok

but /tmp/fai/format.log:
Starting setup-storage 2.0
Using config file: /var/lib/fai/config/disk_config/SUFFBOOK1
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
    Creating directory "/run/lock/lvm"
    No volume groups found.
Executing: wipefs -a /dev/sda4
Executing: wipefs -a /dev/sda1
Executing: wipefs -a /dev/sda2
Executing: wipefs -a /dev/sda3
Executing: parted -s /dev/sda mklabel gpt
Executing: parted -s /dev/sda mkpart primary "" 2097152B 211812351B
Executing: parted -s /dev/sda set 1 boot on
Executing: parted -s /dev/sda mkpart primary "" 211812352B 8801746943B
Executing: parted -s /dev/sda mkpart primary "" 8801746944B 42948607487B
Executing: parted -s /dev/sda mkpart primary "" 1048576B 2097151B
Executing: parted -s /dev/sda set 4 bios_grub on
Executing: cryptsetup --key-file=/dev/urandom create crypt_dev_sda2 /dev/sda2
Executing: mkswap  /dev/mapper/crypt_dev_sda2
Executing: head -c 2048 /dev/urandom | od | tee /tmp/fai/crypt_dev_sda3
Executing: yes YES | cryptsetup luksFormat /dev/sda3 /tmp/fai/crypt_dev_sda3 \
-c aes-xts-plain64 -h sha512 -s 256
Executing: cryptsetup luksOpen /dev/sda3 crypt_dev_sda3 --key-file \
/tmp/fai/crypt_dev_sda3
Executing: mkfs.ext4  /dev/mapper/crypt_dev_sda3
Boot partition cannot be encrypted

1. Why "Boot partition cannot be encrypted", /dev/sda1 is Boot partition?

blkid /dev/mapper/crypt_dev_sda2:
/dev/mapper/crypt_dev_sda2: UUID="c5a0fce8-c271-40f9-b6fd-333c1f7657d9" \
TYPE="swap"
blkid /dev/mapper/crypt_dev_sda3:
dev/mapper/crypt_dev_sda3: UUID="b2b62076-abae-4b73-b7c4-ff676b3f609f" \
TYPE="ext4"

2. Why is bios_grub /dev/sda4 and not /dev/sda1?

My other disk_config:
disk_config disk1 disklabel:gpt-bios bootable:1

primary    -      200      -         -
primary    -      8192     -         -
primary    -      0-       -         -

disk_config cryptsetup
swap  swap /dev/sda2  swap   sw  lukscreateopts="-c aes-xts-plain64 -h sha512"
luks  -    /dev/sda3  -   -  lukscreateopts="-c aes-xts-plain64 -h sha512"

disk_config btrfs fstabkey:label
btrfs  single  /boot  /dev/sda1  ro,subvol=@boot,compress=lzo,noatime  btrfscreateopts="-m single -L boot"
btrfs  single  /      /dev/mapper/crypt_dev_sda3  rw,subvol=@/,compress=lzo,noatime     createopts="-m single -L root"
btrfs  single  /home  /dev/mapper/crypt_dev_sda3  rw,subvol=@home,compress=lzo,noatime  createopts="-m single -L home"
btrfs  single  /usr   /dev/mapper/crypt_dev_sda3  rw,subvol=@usr,compress=lzo,noatime   createopts="-m single -L usr"
btrfs  single  /var   /dev/mapper/crypt_dev_sda3  rw,subvol=@var,compress=lzo,noatime   createopts="-m single -L var"

setupt-storage -d -s -f /var/lib/fai/config/disk_config/MYDISKCONFIG
...
Syntax error

/tmp/fai/format.log:
Starting setup-storage 2.0
Using config file: /var/lib/fai/config/disk_config/SUFFBOOK1

      ERROR (line 16): Invalid volume: Was expecting /^vg\s+/, or
                       /^raid([0156]|10)\s+/, or /^btrfs
                       (single|raid([0156]|10))\s+/, or
                       /^(luks|luks:"[^"]+"|tmp|swap)\s+/, or /^tmpfs\s+/, or
                       type

      ERROR (line 16): Invalid line: Was expecting '\n' but found "btrfs
                       single /boot /dev/sda1
                       ro,subvol=@boot,compress=lzo,noatime btrfscreateopts="-
                       m single -L boot"" instead
Syntax error

3. I do not understand the error. \n is line break (CR). Please help me.

regards Kai
-- 
#######################################################################
Netzworkk                   grml - Linux Live CD fuer Sysadmins
Kai Wilke                   http://grml.org
kiste at netzworkk.de
https://www.netzworkk.de
http://www.netzworkk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20170104/c8b60bb1/attachment.asc>


More information about the linux-fai mailing list