Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1242434

Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs

From Pascal Hambourg <pascal@plouf.fr.eu.org>
Newsgroups linux.debian.bugs.dist, linux.debian.maint.boot
Subject Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs
Date 2025-04-17 13:00 +0200
Message-ID <KCv8l-e9SL-11@gated-at.bofh.it> (permalink)
References <KA6H7-cAG4-3@gated-at.bofh.it> <KA6H7-cAG4-3@gated-at.bofh.it> <KAbnr-cDCk-3@gated-at.bofh.it> <KA6H7-cAG4-3@gated-at.bofh.it> <KAbnr-cDCk-3@gated-at.bofh.it>
Organization Plouf !

Cross-posted to 2 groups.

Show all headers | View raw


On 11/04/2025 at 03:21, Nicholas D Steeves wrote:
>
> Rather than reimplement our own thing for Debian Rescue, I think that it
> would be maximally beneficial to talk to the grub-btrfs
> (https://github.com/Antynea/grub-btrfs) project (and maybe
> btrfsmaintenance, and/or the new systemd-based one). or even btrfs-progs
> upstream about where this logic should be centralised.  For example,
> what are the requirements for a bootable rootfs subvolume?
> 
>    /sbin/init, /etc/init, /bin/init, /usr/bin/init?, /bin/sh, /usr/bin/sh?
> 
> I've read that's the order the kernel looks for things.  Should we also
> look for /lib/modules?  Now /usr/lib/modules because of usrmerge?  Not
> to mention /lib/firmware...now /usr/lib/firmware because of usrmerge.

This is not specific to btrfs and d-i rescue mode does not even do any 
of these checks with any filesystem type.

> If grub-btrfs and Debian Rescue use different logic for determining
> viable boot environments, or if they order them differently, then many
> users will be confused, and various red-eyed Reddit avatars will gripe
> about our our "half-baked" solution.

Do they serve the same purpose ? Is d-i rescue mode intended to be a 
generic tool or primarily for reasonably "standard" Debian systems ?

> What solutions have you thought of?

For now, what about just this :
if the selected device filesystem is btrfs, then try to mount in order
- the @rootfs subvolume (Debian/Fedora style)
- the @ subvolume (SUSE/Ubuntu style)
- the default (or top level ?) subvolume (buster and older Debian style)

Patch: <https://salsa.debian.org/pham/rescue/-/tree/pham/btrfs_subvol>

It should work with most standard Debian systems installed with d-i.

PS: There is a flaw in partman-btrfs @rootfs creation. If using an 
existing filesystem whose default subvolume is not the top level 
subvolume, then @rootfs is created in the default subvolume instead of 
the top level subvolume. If another @rootfs subvolume does not already 
exist in the top level subvolume, then mounting @rootfs silently fails 
and d-i writes target files in its own rootfs.
I admit that this is an edge case and probably nobody has ever hit it, 
but the fix seems trivial: mount the top level subvolume instead of the 
default subvolume before creating @rootfs. Patch available.

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Tyler Riddle <cardboardaardvark@gmail.com> - 2025-04-10 22:30 +0200
  Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Nicholas D Steeves <sten@debian.org> - 2025-04-11 03:30 +0200
    Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Cyril Brulebois <kibi@debian.org> - 2025-04-11 06:30 +0200
      Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Pascal Hambourg <pascal@plouf.fr.eu.org> - 2025-04-21 18:50 +0200
        Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Cyril Brulebois <kibi@debian.org> - 2025-04-21 20:00 +0200
          Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Tyler Riddle <cardboardaardvark@gmail.com> - 2025-04-21 20:10 +0200
          Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Pascal Hambourg <pascal@plouf.fr.eu.org> - 2025-04-21 21:10 +0200
        Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Holger Wansing <hwansing@mailbox.org> - 2025-04-21 21:10 +0200
          Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Cyril Brulebois <kibi@debian.org> - 2025-04-22 12:30 +0200
            Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Tyler Riddle <cardboardaardvark@gmail.com> - 2025-04-22 19:40 +0200
              Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Nicholas D Steeves <sten@debian.org> - 2025-04-22 22:00 +0200
          Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Nicholas D Steeves <sten@debian.org> - 2025-04-22 23:00 +0200
    Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Pascal Hambourg <pascal@plouf.fr.eu.org> - 2025-04-17 13:00 +0200
      Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Nicholas D Steeves <sten@debian.org> - 2025-04-18 03:50 +0200
        Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Pascal Hambourg <pascal@plouf.fr.eu.org> - 2025-04-18 17:50 +0200
          Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Nicholas D Steeves <sten@debian.org> - 2025-04-23 00:00 +0200
    Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Tyler Riddle <cardboardaardvark@gmail.com> - 2025-04-18 01:30 +0200
      Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Pascal Hambourg <pascal@plouf.fr.eu.org> - 2025-04-18 15:50 +0200
        Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Tyler Riddle <cardboardaardvark@gmail.com> - 2025-04-18 20:40 +0200
  Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Martin-Éric Racine <martin-eric.racine@iki.fi> - 2025-04-19 14:30 +0200
  Bug#1102604: debian-installer: Rescue mode can not execute shell when root filesystem is btrfs Martin-Éric Racine <martin-eric.racine@iki.fi> - 2025-04-23 07:40 +0200
    Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Nicholas D Steeves <sten@debian.org> - 2025-05-10 19:10 +0200
      Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Martin-Éric Racine <martin-eric.racine@iki.fi> - 2025-05-10 19:30 +0200
        Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Nicholas D Steeves <sten@debian.org> - 2025-05-10 23:00 +0200
        Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Cyril Brulebois <kibi@debian.org> - 2025-05-11 02:00 +0200
          Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Martin-Éric Racine <martin-eric.racine@iki.fi> - 2025-05-12 08:10 +0200
            Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Cyril Brulebois <kibi@debian.org> - 2025-05-12 19:00 +0200
            Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Pascal Hambourg <pascal@plouf.fr.eu.org> - 2025-05-12 19:40 +0200
            Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Nicholas D Steeves <sten@debian.org> - 2025-05-13 22:30 +0200
  Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Cyril Brulebois <kibi@debian.org> - 2025-05-13 14:50 +0200
  Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Pascal Hambourg <pascal@plouf.fr.eu.org> - 2025-05-21 12:50 +0200
  Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Pascal Hambourg <pascal@plouf.fr.eu.org> - 2025-05-21 13:30 +0200
  Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Steve McIntyre <steve@einval.com> - 2025-05-29 12:20 +0200
  Bug#1102604: rescue-mode: Provide rootfs subvolume selection menu Steve McIntyre <steve@einval.com> - 2025-05-29 12:20 +0200

csiph-web