btrfs partioning with calamares results in unbootable system
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-
into the VM.
* Install either the calamares-
calamares-
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
ProcVersionSign
Uname: Linux 5.15.0-23-generic x86_64
.etc.calamares.
---
restartNowMode: user-checked
restartNowCommand: "systemctl -i reboot"
.etc.calamares.
---
dontChroot: true
timeout: 30
script:
- calamares-
.etc.calamares.
---
unpack:
- source: "/cdrom/
sourcefs: "squashfs"
ApportVersion: 2.20.11-0ubuntu79
Architecture: amd64
CasperMD5CheckR
CasperVersion: 1.467
CurrentDesktop: LXQt
Date: Mon Mar 28 14:46:10 2022
LiveMediaBuild: Lubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220327)
RelatedPackageV
calamares-
calamares-
xfsprogs 5.13.0-1ubuntu2
btrfs-progs 5.16.2-1
SourcePackage: calamares
UpgradeStatus: No upgrade log present (probably fresh install)
tags: |
added: ubuntustudio removed: studio |
tags: | added: lubuntu |
Changed in calamares (Ubuntu): | |
milestone: | none → ubuntu-22.04 |
Changed in calamares (Ubuntu): | |
status: | Fix Committed → Confirmed |
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 |
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 |
tags: | added: verification-needed |
Attached is a screenshot from Lenovo 14VILL machine also tested for btrfs partition and the boot errors.