btrfs partioning with calamares results in unbootable system

Bug #1966774 reported by Leó Kolbeinsson
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
calamares-settings-ubuntu (Ubuntu)
Fix Released
Medium
Simon Quigley
Jammy
Fix Released
Medium
Simon Quigley
Kinetic
Fix Released
Medium
Simon Quigley

Bug Description

[Impact]

 * It is currently difficult to install Lubuntu 22.04 or Ubuntu
   Studio 22.04 with a BTRFS partition as the root partition. The
   installation will appear to succeed initially, but the system will be
   unable to boot successfully when attempting to reboot into the
   installed system. This is due to an obsolete "space_cache" option
   being set on the root filesystem in /etc/fstab during installation.

 * As BTRFS is a rather popular filesystem, enabling users to use it
   without having to use a special workaround would be quite useful.
   Since Ubuntu 22.04 is an LTS release, we must either release an SRU
   fix for this issue, or require users to wait for approximately a year
   and nine months before being able to use BTRFS on Lubuntu and Ubuntu
   Studio without problems.

 * This upload resolves the problem by removing the Calamares
   configuration option that results in "space_cache" being added to
   fstab during installation.

[Test Plan]

 * First, create a virtual machine, and use the Lubuntu 22.04 or Ubuntu
   Studio 22.04 ISO as the installation media. I used GNOME Boxes as my
   virtualization software, and provided the VM 20 GB of disk space and
   2 GB of RAM for Lubuntu, or 4 GB for Ubuntu Studio. EFI was left
   disabled.

 * Upon bootup, double click the installation shortcut on the desktop.

 * Accept all the default options until you get to the "Partitions"
   screen. Note that it is acceptable to set the time zone to be
   accurate first, in the event your timezone is set wrong.

 * When you reach the "Partitions" screen, select "Manual Partitioning".

 * Create a new partition table, and select "Master Boot Record".

 * Create a single primary partition, containing all of the space on the
   disk. Set the file system to "btrfs", set the mount point to "/", and
   enable the "boot" flag. Then click "OK".

 * Finish the rest of the installation steps, and allow the installation
   to begin.

 * When the installation is finished, allow the VM to reboot. The VM
   will fail to boot and display multiple alarming "FAILED" messages
   during the attempted boot process.

 * Install the calamares-settings-ubuntu-common package from this SRU
   into the VM.

 * Install either the calamares-settings-lubuntu or
   calamares-settings-ubuntustudio package from this SRU into the VM,
   depending on which flavour your are testing.

 * Repeat the steps to reproduce the bug. This time, when the VM is
   rebooted, it will boot into the newly installed OS successfully.

[Where problems could occur]

 * Since the installation process currently results in space_cache=v2
   being enabled on the BTRFS filesystem, it is theoretically possible
   that applications could break in the event that they relied on the
   space_cache=v1 or space_cache=none. It seems likely to me that such
   an application would either be outside of Ubuntu's scope (perhaps a
   BTRFS driver for another OS like WinBtrfs), or would be a disk
   utility that directly accessed the filesystem without benefit of a
   BTRFS driver. A user of such a utility will likely be technically
   savvy enough to change the space_cache option themselves (or go find
   software that supports modern BTRFS features).

[Other info]

 * There is an alternate solution to this bug, which is to clear the
   space cache and then set space_cache=v1 by using the `mount` command.
   This would avoid the use of space_cache=v2 if it was necessary, however
   since it avoids a scenario that is mostly hypothetical and easily
   circumvented, I feel it would be a needless waste of performance to
   take this route.

---

Original bug report:

Testing Lubuntu Jammy daily ISO 27.03.2022

Test machine AWOW NY41 Int.cel 4125

Selected manual partitioning at install to create btrfs custom partition

All went well with the install but after rebooting the system failed to boot

Received errors "Failed to start Snap Daemon" #Failed to Load Kernel Module drm" and others - see attached screen shot for this machine.

Performed other tests - xfs partitioning and also erase disk full installs with no errors

Also tested 3 other machines - all same failures if btrfs was used.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: calamares 3.2.41.1-0ubuntu3
ProcVersionSignature: Ubuntu 5.15.0-23.23-generic 5.15.27
Uname: Linux 5.15.0-23-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-0ubuntu79
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.467
CurrentDesktop: LXQt
Date: Mon Mar 28 14:46:10 2022
LiveMediaBuild: Lubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220327)
RelatedPackageVersions:
 calamares-settings-ubuntu-common 1:22.04.4
 calamares-settings-lubuntu 1:22.04.4
 xfsprogs 5.13.0-1ubuntu2
 btrfs-progs 5.16.2-1
SourcePackage: calamares
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Leó Kolbeinsson (leok) wrote :
Revision history for this message
Leó Kolbeinsson (leok) wrote :

Attached is a screenshot from Lenovo 14VILL machine also tested for btrfs partition and the boot errors.

description: updated
Revision history for this message
Leó Kolbeinsson (leok) wrote :
  • syslog Edit (242.6 KiB, application/octet-stream)

syslog attached

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1966774

tags: added: iso-testing
Revision history for this message
Thomas Ward (teward) wrote :

Tested similar BTRFS root partition layout here, and it exploded as stated here. I was testing in a VM with a fresh ZSync.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in calamares (Ubuntu):
status: New → Confirmed
Revision history for this message
Dan Simmons (kc2bez) wrote :

@leok or @teward do either of you have the Calamares install log? I am not seeing one attached to the bug.

Changed in calamares (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Leó Kolbeinsson (leok) wrote :

@kc2bez

Retested Jammy Beta Lubuntu ISO 20220328.1

Attached is syslog and session log in next comment

Revision history for this message
Leó Kolbeinsson (leok) wrote :

session log from install

Revision history for this message
Chris Guiver (guiverc) wrote (last edit ):

Same result on sony vaio svp112a1cw (lubuntu jammy daily 20220328.1)

install was good, but on reboot it's mostly [FAILED] Failed to start Snap Daemon.. final message was [FAILED] Failed to start Failure handling of the snapd snap.

booted live media again, and mounted to get /mnt/@/var/log/installer/syslog from internal ssd.

Note - it may not be calamares log I grabbed..

Changed in calamares (Ubuntu):
status: Incomplete → New
Revision history for this message
Chris Guiver (guiverc) wrote :

still from live media; mounted the internal ssd on sony vaio thingy
/mnt/@/var/log/installer/debug

Revision history for this message
Leó Kolbeinsson (leok) wrote :

This bug also affects Ubuntu Studio - tested daily ISO 29.1-03-2022 with the same result as in original report.

tags: added: studio
tags: added: ubuntustudio
removed: studio
tags: added: lubuntu
Changed in calamares (Ubuntu):
milestone: none → ubuntu-22.04
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Hello Leó or anyone else affected:

calamares 3.2.41.1-0ubuntu4 has been released into Jammy. Please test and report back if this fixes the problem and mark this bug as "Fix Released". If it does not fix the problem, report back, tag this bug as "verification-failed", at which point we'll look into other options.

Changed in calamares (Ubuntu):
status: New → Fix Committed
Revision history for this message
Leó Kolbeinsson (leok) wrote :

@eeickmeyer Erich

Test machine AWOW NY41 Int.cel 4125- Lubuntu Jammy daily ISO 01-04-2022 and same result as in original report - unbootable system after upgrade and reboot.

tags: added: verification-failed
Changed in calamares (Ubuntu):
status: Fix Committed → Confirmed
Revision history for this message
Leó Kolbeinsson (leok) wrote :

Tested Lubuntu Jammy 22.04 and performed the following :

Removed space_cache from btrfs mount options in ..modules/fstab/fstab.conf before installing as suggested by @tsimong2 -

Ran the install and successfully booted the system with a btrfs partition.

Machine tested Dell Optiplex 7040 running in UEFI mode

Simon Quigley (tsimonq2)
Changed in calamares (Ubuntu):
assignee: nobody → Simon Quigley (tsimonq2)
importance: Undecided → Medium
milestone: ubuntu-22.04 → jammy-updates
Changed in calamares (Ubuntu Jammy):
assignee: nobody → Simon Quigley (tsimonq2)
milestone: none → jammy-updates
Changed in calamares (Ubuntu Kinetic):
milestone: jammy-updates → ubuntu-22.05
Changed in calamares (Ubuntu Jammy):
importance: Undecided → Medium
status: New → In Progress
Changed in calamares (Ubuntu Kinetic):
status: Confirmed → In Progress
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Saw the IRC logs - I will update the workaround guide to instruct users to remove the option entirely.

Revision history for this message
Leó Kolbeinsson (leok) wrote :

Tested Lubuntu Kinetic daily iso 16-05-2022 and Ubuntu Studio Kinetic daily 15-05-2022 and btrfs install was successfull.

Test machine Dell Optiplex 7040 running in UEFI mode.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Hardware: HP Z220 SFF Workstation, 32 GB RAM, Intel Xeon CPU, UEFI, no secure boot. Tested Lubuntu 2022-05-16 ISO in virt-manager (QEMU/KVM) with SeaBIOS, 4 GB RAM, 2 CPU cores, and 20 GB disk space, manual partitioning with btrfs install. All good, newly installed system was bootable with no need to modify config files or run special commands before, during, or after the installation.

Simon Quigley (tsimonq2)
Changed in calamares-settings-ubuntu (Ubuntu Jammy):
status: New → In Progress
Changed in calamares-settings-ubuntu (Ubuntu Kinetic):
status: New → Fix Released
Changed in calamares-settings-ubuntu (Ubuntu Jammy):
importance: Undecided → Medium
Changed in calamares-settings-ubuntu (Ubuntu Kinetic):
importance: Undecided → Medium
Changed in calamares-settings-ubuntu (Ubuntu Jammy):
assignee: nobody → Simon Quigley (tsimonq2)
Changed in calamares-settings-ubuntu (Ubuntu Kinetic):
assignee: nobody → Simon Quigley (tsimonq2)
no longer affects: calamares (Ubuntu)
no longer affects: calamares (Ubuntu Jammy)
no longer affects: calamares (Ubuntu Kinetic)
description: updated
description: updated
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Debdiff containing fix for this bug.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Leó, or anyone else affected,

Accepted calamares-settings-ubuntu into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/calamares-settings-ubuntu/1:22.04.4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in calamares-settings-ubuntu (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
removed: verification-failed
Revision history for this message
Leó Kolbeinsson (leok) wrote :

Tested from proposed version calamares-settings-ubuntu/1:22.04.4.1
on Dell Optiplex 7040 bare metal - BTRFS partition and reboot - no errors

tags: added: verification-done-jammy
removed: verification-needed
Revision history for this message
Leó Kolbeinsson (leok) wrote (last edit ):

Tested calamares-settings-ubuntu/1:22.04.4.1 from proposed on Lubuntu Jammy ISO from testing tracker daily image 28.07.22 -

Installed the proposed and formatted and rebooted using BTRFS / partition with no errors.

Revision history for this message
Leó Kolbeinsson (leok) wrote :

A bit of bad news..just tested the daily Lubuntu Jammy 28.1-07-2022 and this bug was still present.

Sorry for previous comments and any confusion.

tags: removed: verification-done-jammy
tags: added: verification-needed
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Booted latest Lubuntu Jammy daily ISO, installed calamares-settings-lubuntu and then installed Lubuntu with EFI and BTRFS - install was successful, installed system booted properly and Firefox functioned without problems on Reddit.

I am NOT marking this as verification-done yet as Ubuntu Studio still needs tested with this bug fix.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Booted latest Ubuntu Studio Jammy daily ISO, installed calamares-settings-ubuntustudio and then installed Ubuntu Studio with BIOS and BTRFS - install was successful, installed system booted properly and Firefox functioned without problems on Reddit.

Marking this as verification-done.

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Leó Kolbeinsson (leok) wrote :

Tested calamares-settings-ubuntu/1:22.04.4.1 from proposed on Lubuntu Jammy ISO from testing tracker daily image 220728.1 and this time installed calamares-settings-lubuntu and installed with BTRFS with no errors after reboot.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package calamares-settings-ubuntu - 1:22.04.4.1

---------------
calamares-settings-ubuntu (1:22.04.4.1) jammy; urgency=medium

  * Fixed BTRFS installation bug (LP: #1966774).

 -- Aaron Rainbolt <email address hidden> Sun, 24 Jul 2022 14:37:49 -0500

Changed in calamares-settings-ubuntu (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for calamares-settings-ubuntu has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.