Bug 1862784 - silverblue fails to install when /boot is a directory
Summary: silverblue fails to install when /boot is a directory
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: ostree
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1887116 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-02 13:14 UTC by Tomas Kovar
Modified: 2023-12-07 12:57 UTC (History)
20 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-12-05 20:59:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
anaconda.log (21.14 KB, text/plain)
2020-08-02 16:26 UTC, Chris Murphy
no flags Details
program.log (6.25 KB, text/plain)
2020-08-02 16:26 UTC, Chris Murphy
no flags Details
storage.log (118.76 KB, text/plain)
2020-08-02 16:26 UTC, Chris Murphy
no flags Details
syslog (526.49 KB, text/plain)
2020-08-02 16:26 UTC, Chris Murphy
no flags Details
storage.log f37 (331.76 KB, text/plain)
2022-06-09 00:56 UTC, Chris Murphy
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-591 0 None None None 2022-09-06 14:25:20 UTC

Description Tomas Kovar 2020-08-02 13:14:25 UTC
Description of problem:

When installing silverblue on btrfs with boot directory (not subvolume), the installation fails.

Version-Release number of selected component (if applicable):

Rawhide 2020-07-31.

How reproducible:

Install silverblue with one of the following partition schemes (using advanced-custom with blivet, using UEFI and GPT partition scheme):

sda1  vfat  /boot/efi
sda2  btrfs /
  subvolume home  /var/home
  
OR

sda1  vfat  /boot/efi
sda2  btrfs (not-mounted)
  subvolume root  /
  subvolume home  /var/home

In both cases, the /boot is a subdirectory. If it were subvolume, it would succeed (but hit a different bug, see bellow for additional info).

Actual results:

Installation fails with error message in acaconda GUI:

The following error occurred while installing.  This is a fatal error and installation will be aborted.

mount ['--bind', '/mnt/sysimage/boot/efi', '/mnt/sysroot/boot/efi'] exited with code 32

and following entries in anaconda-log:

Running... mount --bind /mnt/sysimage/boot/efi /mnt/sysroot/boot/efi
mount: /mnt/sysroot/boot/efi: mount point does not exist.
Return code: 32

Expected results:

Successful installation.

Additional info:

These are scenarios #3 and #4 described in https://bugzilla.redhat.com/show_bug.cgi?id=1753485

This is only install time problem; after this is solved, these scenarios may still hig bug described in https://bugzilla.redhat.com/show_bug.cgi?id=1862783.

Comment 1 Chris Murphy 2020-08-02 14:38:39 UTC
I think this happens because the /boot dir hasn't been created yet, so the /boot/efi mount fails. But then, I'd expect the same problem to happen on any other file system. At least in Custom partitioning, using a /boot directory used to work, so I wonder if it's only a problem in Advanced-Custom.

Comment 2 Chris Murphy 2020-08-02 16:22:19 UTC
Problem happens on Fedora-Silverblue-ostree-x86_64-Rawhide-20200731.n.0.iso with ext4 in the same situation, /boot dir on sysroot (no separate /boot).


Problem doesn't happen with Fedora-Workstation-Live-x86_64-Rawhide-20200731.n.0.iso, so it seems to be a uniquely silverblue/rpm-ostree problem.

Comment 3 Chris Murphy 2020-08-02 16:26:07 UTC
Created attachment 1703208 [details]
anaconda.log

Comment 4 Chris Murphy 2020-08-02 16:26:19 UTC
Created attachment 1703209 [details]
program.log

Comment 5 Chris Murphy 2020-08-02 16:26:31 UTC
Created attachment 1703210 [details]
storage.log

Comment 6 Chris Murphy 2020-08-02 16:26:58 UTC
Created attachment 1703211 [details]
syslog

Comment 7 Chris Murphy 2020-08-02 16:30:06 UTC
Dup of bug 1395910 which says this won't be fixed soon. So arguably the installer should just disallow this on Silverblue.

Comment 8 Ben Cotton 2020-08-11 13:51:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 9 Vladimír Slávik 2020-09-10 13:57:07 UTC
PR with "fix": https://github.com/rhinstaller/anaconda/pull/2848

Basically Anaconda won't allow /boot as a directory, same as suggested in https://bugzilla.redhat.com/show_bug.cgi?id=1395910#c11

Comment 10 Chris Murphy 2020-09-10 18:18:27 UTC
Hold up, this might be fixed in ostree...
cc: cwalters

https://github.com/ostreedev/ostree/pull/2149

Comment 11 Vladimír Slávik 2020-09-29 14:16:26 UTC
Switching to ostree, see discussion in https://github.com/rhinstaller/anaconda/pull/2848

Comment 12 Chris Murphy 2020-10-11 21:04:18 UTC
*** Bug 1862783 has been marked as a duplicate of this bug. ***

Comment 13 Chris Murphy 2020-10-11 21:04:30 UTC
*** Bug 1887116 has been marked as a duplicate of this bug. ***

Comment 14 Chris Murphy 2020-10-11 21:07:10 UTC
This suggests the necessary work isn't done for GRUB yet
https://github.com/ostreedev/ostree/pull/2149#issuecomment-692164435

Setting this to rawhide. Not sure if the component should be rpm-ostree but I'm gonna leave that alone.

Comment 15 Chris Murphy 2020-10-11 21:16:02 UTC
I'd say if /boot directory on the same file system as / is supported by rpm-ostree, it can also be supported on Btrfs whether directory or subvolume so long as the subvolume name is "boot".

But if the use case requires arbitrarily named subvolumes, then that's going to need separate work. And if so, that needs an upstream issue filed describing the use case, and the design, scope and coordination for that work.

Comment 16 Chris Murphy 2020-10-12 01:08:40 UTC
OK so this bug means /boot has an actual path of <Btrfs top-level>/root/boot where "root" can be an arbitrarily named subvolume and "boot" is a directory. I expect this isn't going to work until rpm-ostree becomes more aware of Btrfs specifics. So I'd say it's (a) not a bug (b) works as designed (c) the installer should disallow it. The problem with (c) is that there are a number of things the installer allows for rpm-ostree installs that don't work so *shrug*. I'll leave it up to Colin if he just wants to close this as won't fix, and advise on how to track this upstream and where.

Comment 17 Tomas Kovar 2020-10-12 18:50:24 UTC
The error in the bug report comes from the following place:

pyanaconda/payload/rpmostreepayload.py#L390 (_prepare_mount_targets):

# Handle mounts like /boot (except avoid /boot/efi; we just need the
# toplevel), and any admin-specified points like /home (really
# /var/home). Note we already handled /var above. Avoid recursion since
# sub-mounts will be in the list too.  We sort by length as a crude
# hack to try to simulate the tree relationship; it looks like this
# is handled in blivet in a different way.
for mount in sorted(mount_points, key=len):		# my note: mount_points = payload_utils.get_mount_points()
  if mount in ('/', '/var') or mount in api_mounts:	# my note: api_mounts = ["/dev", "/proc", "/run", "/sys"]
     continue
  self._setup_internal_bindmount(mount, recurse=False)

it will try to mount /boot/efi: "mount --bind /mnt/sysimage/boot/efi /mnt/sysroot/boot/efi", while:

1. /mnt/sysroot/boot is empty dir,
2. thus /mnt/sysroot/boot/efi doesn't exist,
3. /mnt/sysimage/boot was populated by _copy_bootloader_data(), but since /boot is not a separate mountpoint (just a directory on /), it won't get bind-mounted just before mounting /boot/efi (which is always a separate partition). /, as the /boot parent, is not bind-mounted either.

The comment claims that /boot/efi should be avoided; but the code doesn't nothing to handle that case.

Suggested solution: if /boot is not in mount_points, hardcode it's bind-mount just like /usr and api-mounts? Or, if it's not necessary, add '/boot/efi' to the skip list?

Comment 18 Ben Cotton 2021-02-09 15:15:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 19 Ben Cotton 2022-05-12 16:42:49 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 20 Ben Cotton 2022-06-08 01:07:11 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 21 Andrey 2022-06-08 09:00:46 UTC
Should we reopen? Probably still an issue on Rawhide.

Comment 22 Chris Murphy 2022-06-09 00:56:04 UTC
Created attachment 1888173 [details]
storage.log f37

Fedora-Silverblue-ostree-x86_64-Rawhide-20220608.n.0.iso when I set the /boot mountpoint to device type btrfs and ensure it's on the same btrfs as /, /var, /home - the installation succeeds but does not subsequently boot; the BLS snippet path to kernel+initrd lacks inclusion of /boot/ for the subvolume these files reside in.

Same ISO, installed to XFS without a /boot mountpoint, thus it's a directory, fails installation with message "failed to write bootloader configuration", attaching storage.log.

Comment 23 Ben Cotton 2022-08-09 13:11:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 24 Aoife Moloney 2023-11-23 00:03:32 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 25 Aoife Moloney 2023-12-05 20:59:33 UTC
Fedora Linux 37 entered end-of-life (EOL) status on None.

Fedora Linux 37 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 26 Andrey 2023-12-07 12:57:31 UTC
This probably wasn't fixed, can we reopen?


Note You need to log in before you can comment on or make changes to this bug.