← Back to team overview

ubuntustudio-bugs team mailing list archive

[Bug 1964328] Re: Lubuntu Installer unmounts luks volumes during install resulting in failed mountpoints for installer

 

The way I read this, this is the software working as intended. There's
no reason to manually do all the partitioning and encrypting.

** Changed in: calamares (Ubuntu)
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Studio Bugs, which is subscribed to calamares in Ubuntu.
https://bugs.launchpad.net/bugs/1964328

Title:
  Lubuntu Installer unmounts luks volumes during install resulting in
  failed mountpoints for installer

Status in calamares package in Ubuntu:
  Invalid

Bug description:
  When trying to install lubuntu on custom created luks volumes.

  The installer unmounts the luks volumes by that removing the FS inside
  them and fails to install.

  ----

  # These are the steps to reproduce.

  ----

  # Set up initial partitions

  /dev/sda1 as fat32 EFI
  /dev/sda2 as LUKS encrypted volume
  /dev/sda3 as Luks Encrypted Volume

  ----

  gdisk /dev/sda

  GPT fdisk (gdisk) version 1.0.8

  Partition table scan:

    MBR: not present

    BSD: not present

    APM: not present

    GPT: not present

  Creating new GPT entries in memory.

  
  Command (? for help): n

  Partition number (1-128, default 1):

  First sector (34-104857566, default = 2048) or {+-}size{KMGTP}:

  Last sector (2048-104857566, default = 104857566) or {+-}size{KMGTP}:
  +550M

  Current type is 8300 (Linux filesystem)

  Hex code or GUID (L to show codes, Enter = 8300): ef00

  Changed type of partition to 'EFI system partition'

  
  Command (? for help): n

  Partition number (2-128, default 2): p

  First sector (34-104857566, default = 1128448) or {+-}size{KMGTP}:

  Last sector (1128448-104857566, default = 104857566) or
  {+-}size{KMGTP}: +41G

  Current type is 8300 (Linux filesystem)

  Hex code or GUID (L to show codes, Enter = 8300):

  Changed type of partition to 'Linux filesystem'

  
  Command (? for help): n

  Partition number (3-128, default 3): p

  First sector (34-104857566, default = 87111680) or {+-}size{KMGTP}:

  Last sector (87111680-104857566, default = 104857566) or
  {+-}size{KMGTP}:

  Current type is 8300 (Linux filesystem)

  Hex code or GUID (L to show codes, Enter = 8300):

  Changed type of partition to 'Linux filesystem'

  
  Command (? for help): p

  Disk /dev/sda: 104857600 sectors, 50.0 GiB

  Model: VBOX HARDDISK

  Sector size (logical/physical): 512/512 bytes

  Disk identifier (GUID): D7862606-BF94-427B-9708-E767F97B1319

  Partition table holds up to 128 entries

  Main partition table begins at sector 2 and ends at sector 33

  First usable sector is 34, last usable sector is 104857566

  Partitions will be aligned on 2048-sector boundaries

  Total free space is 2014 sectors (1007.0 KiB)

  Number  Start (sector)    End (sector)  Size       Code  Name

     1            2048         1128447   550.0 MiB   EF00  EFI system
  partition

     2         1128448        87111679   41.0 GiB    8300  Linux
  filesystem

     3        87111680       104857566   8.5 GiB     8300  Linux
  filesystem

  Command (? for help): w

  Final checks complete. About to write GPT data. THIS WILL OVERWRITE
  EXISTING

  PARTITIONS!!

  Do you want to proceed? (Y/N): y

  OK; writing new GUID partition table (GPT) to /dev/sda.

  The operation has completed successfully.

  ----

  # Encrypt the volumes

  cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --iter-time 5000
  --type=luks1 --use-random luksFormat /dev/sda2

  WARNING!

  ========

  This will overwrite data on /dev/sda2 irrevocably.

  Are you sure? (Type 'yes' in capital letters): YES

  Enter passphrase for /dev/sda2:

  Verify passphrase:

  Key slot 0 created.

  Command successful.

  cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --iter-time 5000
  --type=luks1 --use-random luksFormat /dev/sda3

  WARNING!

  ========

  This will overwrite data on /dev/sda3 irrevocably.

  Are you sure? (Type 'yes' in capital letters): YES

  Enter passphrase for /dev/sda3:

  Verify passphrase:

  Key slot 0 created.

  Command successful.

  ----

  # Unlock the LUKS volumes

  root@lubuntu:/home/lubuntu# cryptsetup luksOpen /dev/sda2
  LubuntuRootCrypt

  Enter passphrase for /dev/sda2:

  
  root@lubuntu:/home/lubuntu# cryptsetup luksOpen /dev/sda3 LubuntuRootSwap

  Enter passphrase for /dev/sda3:

  ----

  # format the volumes

  I used kpartitionmanager to create the fat32 for EFI

  
  # Then commands for the "root" and "Swap" partition

  
  mkfs.btrfs -L "Lubuntu LTS Root" -m dup /dev/mapper/LubuntuRootCrypt

  btrfs-progs v5.16.2

  See http://btrfs.wiki.kernel.org for more information.

  NOTE: several default settings have changed in version 5.15, please
  make sure

        this does not affect your deployments:

        - DUP for metadata (-m dup)

        - enabled no-holes (-O no-holes)

        - enabled free-space-tree (-R free-space-tree)

  Label:              Lubuntu LTS Root

  UUID:               8b84f49d-969d-4fa7-b38a-18ddc69a859d

  Node size:          16384

  Sector size:        4096

  Filesystem size:    41.00GiB

  Block group profiles:

    Data:             single            8.00MiB

    Metadata:         DUP             256.00MiB

    System:           DUP               8.00MiB

  SSD detected:       no

  Zoned device:       no

  Incompat features:  extref, skinny-metadata, no-holes

  Runtime features:   free-space-tree

  Checksum:           crc32c

  Number of devices:  1

  Devices:

     ID        SIZE  PATH

      1    41.00GiB  /dev/mapper/LubuntuRootCrypt

  
  mkswap /dev/mapper/LubuntuRootSwap

  Setting up swapspace version 1, size = 8.5 GiB (9083789312 bytes)

  no label, UUID=a9b1d684-a764-426a-afe6-4b31d8444652

  ----

  # The partition layout and LUKS unlocked volumes now looks like

  lsblk

  NAME                 MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS

  loop0                  7:0    0   2.4G  1 loop  /rofs

  loop1                  7:1    0     4K  1 loop  /snap/bare/5

  loop2                  7:2    0 154.5M  1 loop  /snap/firefox/1075

  loop3                  7:3    0  61.9M  1 loop  /snap/core20/1361

  loop4                  7:4    0 248.8M  1 loop
  /snap/gnome-3-38-2004/99

  loop5                  7:5    0  65.2M  1 loop  /snap/gtk-common-
  themes/1519

  loop6                  7:6    0  43.6M  1 loop  /snap/snapd/14978

  sda                    8:0    0    50G  0 disk

  ├─sda1                 8:1    0   550M  0 part

  ├─sda2                 8:2    0    41G  0 part

  │ └─LubuntuRootCrypt 253:0    0    41G  0 crypt

  └─sda3                 8:3    0   8.5G  0 part

    └─LubuntuRootSwap  253:1    0   8.5G  0 crypt

  sr0                   11:0    1   2.5G  0 rom   /cdrom

  zram0                252:0    0   1.9G  0 disk  [SWAP]

  ----

  # I then continue with the installer

  ----

  # choose manual partitioning

  
  /dev/sda1 is recognized as fat32 and mountpoint "/boot/efi"

  /dev/sda2 is recognized as btrfs and i choose not to format and
  mountpoint "/"

  /dev/sda3 is recognized as swap

  ----

  # Then when finishing the last parts and installing 
  # The installer crashes with

  Boost.Python error in job "mount".

  Command '['btrfs', 'subvolume', 'create', '/tmp/calamares-
  root-3_f3ccsz/@']' returned non-zero exit status 1.

  None

  Traceback:

  File "/usr/lib/x86_64-linux-gnu/calamares/modules/mount/main.py", line 165, in run
      mount_partition(root_mount_point, partition, partitions)

    File "/usr/lib/x86_64-linux-gnu/calamares/modules/mount/main.py", line 114, in mount_partition
      subprocess.check_call(['btrfs', 'subvolume', 'create',

    File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)

  ----

  # Now when looking at the partitions

  lsblk
  NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
  loop0    7:0    0   2.4G  1 loop /rofs
  loop1    7:1    0     4K  1 loop /snap/bare/5
  loop2    7:2    0 154.5M  1 loop /snap/firefox/1075
  loop3    7:3    0  61.9M  1 loop /snap/core20/1361
  loop4    7:4    0 248.8M  1 loop /snap/gnome-3-38-2004/99
  loop5    7:5    0  65.2M  1 loop /snap/gtk-common-themes/1519
  loop6    7:6    0  43.6M  1 loop /snap/snapd/14978
  sda      8:0    0    50G  0 disk 
  ├─sda1   8:1    0   550M  0 part 
  ├─sda2   8:2    0    41G  0 part 
  └─sda3   8:3    0   8.5G  0 part 
  sr0     11:0    1   2.5G  0 rom  /cdrom
  zram0  252:0    0   1.9G  0 disk [SWAP]

  # The installer has unmounted the LUKS volumes on "/dev/sda2" and "/dev/sda3"
  # And thus no longer has the BTRFS volume to install on.

  ----

  This error was allso present in 20.04.
  I spent the last two years hoping it would be fixed.

  But i decided i might as well report it this time since 22.04 is
  coming up soon.

  ----

  Hope this is all that is needed to reproduce it

  Best Regards
  Darkyere

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: calamares 3.2.41.1-0ubuntu3
  ProcVersionSignature: Ubuntu 5.15.0-18.18-generic 5.15.12
  Uname: Linux 5.15.0-18-generic x86_64
  .etc.calamares.modules.finished.conf:
   ---
   restartNowMode: user-checked
   restartNowCommand: "systemctl -i reboot"
  .etc.calamares.modules.shellprocess_logs.conf:
   ---
   dontChroot: true
   timeout: 30
   script:
       - calamares-logs-helper @@ROOT@@
  .etc.calamares.modules.unpackfs.conf:
   ---
   unpack:
       -   source: "/cdrom/casper/filesystem.squashfs"
           sourcefs: "squashfs"
           destination: ""
  ApportVersion: 2.20.11-0ubuntu78
  Architecture: amd64
  CasperMD5CheckResult: pass
  CasperVersion: 1.465
  Date: Wed Mar  9 10:56:46 2022
  LiveMediaBuild: Lubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220307)
  ProcEnviron:
   LANGUAGE=
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=C.UTF-8
   SHELL=/bin/bash
  RelatedPackageVersions:
   calamares-settings-ubuntu-common 1:22.04.1
   calamares-settings-lubuntu       1:22.04.1
   xfsprogs                         5.13.0-1ubuntu2
   btrfs-progs                      5.16.2-1
  SourcePackage: calamares
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/calamares/+bug/1964328/+subscriptions