update-initramfs complains about missing /sbin/fsck.btrfs

Bug #1483975 reported by Anders Kaseorg
122
This bug affects 34 people
Affects Status Importance Assigned to Milestone
btrfs-tools (Debian)
Fix Released
Unknown
btrfs-tools (Ubuntu)
Fix Released
Medium
Unassigned
initramfs-tools (Debian)
Fix Released
Unknown
initramfs-tools (Ubuntu)
Fix Released
Medium
Andy Whitcroft

Bug Description

/sbin/fsck.btrfs moved to /bin/fsck.btrfs with btrfs-tools 4.0-2 (http://bugs.debian.org/784234), which causes

$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.1.0-3-generic
Warning: /sbin/fsck.btrfs doesn't exist, can't install to initramfs, ignoring.

I assume this means that fsck won’t run on a btrfs /, which seems bad.

Tags: xenial
Changed in initramfs-tools (Debian):
status: Unknown → New
Changed in btrfs-tools (Debian):
status: Unknown → New
Revision history for this message
Andy Whitcroft (apw) wrote :

The copy of fsck.btrfs is triggered by the hook script carried in btrfs-tools. This is therefore not a initramfs-tools bug. This appears to be fixed in the following btrfs-tools upload:

  btrfs-tools (4.0-2) unstable; urgency=medium

    * Adjust initramfs hooks and udev rules for move of all binaries to
      /bin. (Closes: #784234)

   -- Dimitri John Ledkov <email address hidden> Mon, 04 May 2015 18:51:07 +0100

Changed in btrfs-tools (Ubuntu):
importance: Undecided → Medium
Changed in initramfs-tools (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Andy Whitcroft (apw)
Changed in btrfs-tools (Ubuntu):
status: New → Fix Released
Changed in initramfs-tools (Ubuntu):
status: New → Invalid
Revision history for this message
Anders Kaseorg (andersk) wrote :

You might think that, but in fact the hook shipped with btrfs-tools only copies in /bin/fsck.btrfs if /usr/share/initramfs-tools/hooks/fsck is not executable. It is executable, so this has no effect.

I have checked on current wily with / on btrfs that my initramfs really is missing fsck.btrfs (in either /bin or /sbin).

Changed in initramfs-tools (Ubuntu):
status: Invalid → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Jonni (jonni-egarden) wrote :

I'm running an up-to-date Wily installation and
sudo update-initramfs -u
gives warning:
Warning: /sbin/fsck.btrfs doesn't exist, can't install to initramfs, ignoring.
the warning comes from /usr/share/initramfs-tools/hooks/fsck script
dpkg -S /usr/share/initramfs-tools/hooks/fsck
shows that the file belongs to the initramfs-tools package. And here is info about the currently installed initramfs-tools:
$ apt-cache policy initramfs-tools
initramfs-tools:
  Installed: 0.120ubuntu5
  Candidate: 0.120ubuntu5
  Version table:
 *** 0.120ubuntu5 0
        500 http://se.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

It still happens for me on Wily. It was reported almost 2 months ago, is it so difficult to fix?

Revision history for this message
Barafu-albino-cheetah (barafu-albino-cheetah) wrote :

Don't be so impatient. If bug does not prevent Unity from starting it will linger for years. Anyway, here is workaround. The /bin/fsck.btrfs exists. If it is not there, reinstall btrfs-tools. Then,
    sudo ln -s /bin/fsck.btrfs /sbin/fsck.btrfs
and all is fine.

Revision history for this message
Jason Straight (jason-jeetkunedomaster) wrote :

btrfs fsck is currently a last resort to recovery of a btrfs filesystem.

You don't want it to run and "fix" as a first resort on reboot with problems detected.

https://btrfs.wiki.kernel.org/index.php/Btrfsck

Changed in initramfs-tools (Debian):
status: New → Fix Committed
Revision history for this message
Sasa Paporovic (melchiaros) wrote :

Still to observe in Ubuntu16.04(xenial). Adding tag.

tags: added: xe
tags: added: xenial
removed: xe
Changed in initramfs-tools (Debian):
status: Fix Committed → Fix Released
Changed in btrfs-tools (Debian):
status: New → Incomplete
Changed in btrfs-tools (Debian):
status: Incomplete → Fix Released
Revision history for this message
Guy Rouillier (guy-rouillier) wrote :

I'm still seeing this message in Ubuntu Mate 20.04 on December 22,2020:

"W: /sbin/fsck.btrfs doesn't exist, can't install to initramfs"

Has the released fix just not been incorporated into the distros after 18 months?

Revision history for this message
Benjamin Drung (bdrung) wrote :

Commit 371221bf2f8ed19423aa2253a302c69a54c93b58 uses command to find the path of the fsck.${type} binary. This commit is part of initramfs-tools 0.121 and therefore fixed in Ubuntu 20.04 LTS "Focal Fossa".

You can still see this error message in case btrfs-progs is not installed. So please install btrfs-progs in that case. If you still experience this failure, please open a new bug report.

Changed in initramfs-tools (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.