initramfs-tools does not include fsck binaries in the initrd if all mount pass are 0

Bug #1917780 reported by Ioanna Alifieraki
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Critical
Unassigned
Bionic
Fix Released
Critical
Dan Streetman
Focal
Fix Released
Critical
Dan Streetman
Groovy
Fix Released
Critical
Dan Streetman

Bug Description

[Impact]

 * initramfs-tools does not include fsck in initrd if MNT_PASS equals zero in the fstab entries.

This has lead to the following situation :
when dropping to initramfs shell during boot due to fs errors, we are not able to run fsck manually
because it is not included in initrd.

fsck should be included regardless of the MNT_PASS value.

[Test Plan]

 * change /etc/fstab with PASSNO set to 0 for all entries
 * update-initramfs -u
 * lsinitramfs that is just generated
 * observe that it includes fsck utilities for the filesystems in /etc/fstab. I.e. fsck.ext4 e2fsck must exist

[Where problems could occur]

 * The initramfs size will increase slightly upon upgrade, for the same initramfs-tools default options & kernel. However, one can control and remove fsck binaries (or include more of them) by setting FSTYPE variable in the initramfs settings.

[scope]

this is required for b/f/g

this is fixed already in h and i

[other info]

debian MR is open:
https://salsa.debian.org/kernel-team/initramfs-tools/-/merge_requests/49

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
tags: added: rls-hh-incoming
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

We must honor MNT_PASS.

The actual bug is that many things do not set it to 1 by default as they should have.
I.e. bits in curtin, maas, subiquity, cloud-images.
It is correctly set to 1 on ubiquity desktop images and d-i based installs.

So this bug is a duplicate of https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1902103

Changed in initramfs-tools (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Dan Streetman (ddstreet) wrote :

No, initrd needs to include fsck regardless of what's been set in fstab. Without it even *manual* fsck is impossible.

Changed in initramfs-tools (Ubuntu):
status: Won't Fix → In Progress
assignee: nobody → Ioanna Alifieraki (joalif)
tags: removed: rls-hh-incoming
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

wait what?! =/

fsck binaries should totally be there! that sounds very broken if they are not there.

Changed in initramfs-tools (Ubuntu):
importance: Medium → Critical
summary: - initramfs-tools does not include fsck in initrd if mount pass is 0
+ initramfs-tools does not include fsck binaries in the initrd if all
+ mount pass are 0
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

so looking into that hook, it should ignore passno & always include fscks. Will try to upload that.

description: updated
Changed in initramfs-tools (Ubuntu):
status: In Progress → Fix Committed
assignee: Ioanna Alifieraki (joalif) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.139ubuntu3

---------------
initramfs-tools (0.139ubuntu3) hirsute; urgency=medium

  * hooks/fsck: always include fsck binaries irrespective of PASSNO value,
    otherwise initrds fail to mount rootfs and have no ability to fix the
    rootfs. LP: #1917780

 -- Dimitri John Ledkov <email address hidden> Wed, 24 Mar 2021 15:21:50 +0000

Changed in initramfs-tools (Ubuntu):
status: Fix Committed → Fix Released
Dan Streetman (ddstreet)
description: updated
Changed in initramfs-tools (Ubuntu Bionic):
status: New → In Progress
Changed in initramfs-tools (Ubuntu Groovy):
status: New → In Progress
Changed in initramfs-tools (Ubuntu Focal):
status: New → In Progress
Changed in initramfs-tools (Ubuntu Groovy):
importance: Undecided → Critical
Changed in initramfs-tools (Ubuntu Focal):
importance: Undecided → Critical
Changed in initramfs-tools (Ubuntu Bionic):
importance: Undecided → Critical
Dan Streetman (ddstreet)
Changed in initramfs-tools (Ubuntu Bionic):
assignee: nobody → Dan Streetman (ddstreet)
Changed in initramfs-tools (Ubuntu Focal):
assignee: nobody → Dan Streetman (ddstreet)
Changed in initramfs-tools (Ubuntu Groovy):
assignee: nobody → Dan Streetman (ddstreet)
Revision history for this message
Dan Streetman (ddstreet) wrote :

uploaded to b/f/g

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Ioanna, or anyone else affected,

Accepted initramfs-tools into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.137ubuntu12.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-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. 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 initramfs-tools (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Changed in initramfs-tools (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Ioanna, or anyone else affected,

Accepted initramfs-tools into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.136ubuntu6.5 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-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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.

Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Ioanna, or anyone else affected,

Accepted initramfs-tools into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.130ubuntu3.12 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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 initramfs-tools (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Dan Streetman (ddstreet) wrote :

@joalif do you have time to do verification for this bug?

Revision history for this message
Ioanna Alifieraki (joalif) wrote :

#VERIFICATION FOCAL

On a focal machine that has PASSNO set to 0 for all entries,
installed initramfs-tools from -proposed.

# lsinitramfs /boot/initrd.img-5.4.0-72-generic | grep fsck
usr/sbin/e2fsck
usr/sbin/fsck
usr/sbin/fsck.ext4

fsck utilities are included.

Revision history for this message
Ioanna Alifieraki (joalif) wrote :

#VERIFICATION GROOVY

On a groovy machine that has PASSNO set to 0 for all entries,
installed initramfs-tools from -proposed.

# lsinitramfs /boot/initrd.img-5.8.0-50-generic | grep fsck
usr/sbin/e2fsck
usr/sbin/fsck
usr/sbin/fsck.ext4

fsck utilities are included.

Revision history for this message
Ioanna Alifieraki (joalif) wrote :

#VERIFICATION BIONIC

On a bionic machine that has PASSNO set to 0 for all entries,
installed initramfs-tools from -proposed.

# lsinitramfs /boot/initrd.img-5.9.0-rc5+ | grep fsck
sbin/fsck.ext4
sbin/fsck
sbin/e2fsck

fsck utilities are included.

tags: added: verification-done verification-done-bionic verification-done-focal verification-done-groovy
removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-groovy
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for initramfs-tools 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.

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

This bug was fixed in the package initramfs-tools - 0.130ubuntu3.12

---------------
initramfs-tools (0.130ubuntu3.12) bionic; urgency=medium

  * scripts/local-premount/resume:
    - Use readlink -f to correctly handle non-symlink $resume
      (LP: #1876570)
  * hooks/fsck:
    - don't check PASSNO, always include fsck
      (LP: #1917780)
  * hook-functions:
    - include firmware from /lib/firmware/updates
      (LP: #1571506)

 -- Dan Streetman <email address hidden> Thu, 18 Mar 2021 14:48:17 -0400

Changed in initramfs-tools (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.136ubuntu6.5

---------------
initramfs-tools (0.136ubuntu6.5) focal; urgency=medium

  * scripts/local-premount/resume:
    - Use readlink -f to correctly handle non-symlink $resume
      (LP: #1876570)
  * hook-functions:
    - when MODULES=list there will be no 'kernel' dir, so don't try
      to find anything there, as it will log an error
      (LP: #1927779)
  * hooks/fsck:
    - don't check PASSNO, always include fsck
      (LP: #1917780)

 -- Dan Streetman <email address hidden> Thu, 18 Mar 2021 14:48:17 -0400

Changed in initramfs-tools (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.137ubuntu12.1

---------------
initramfs-tools (0.137ubuntu12.1) groovy; urgency=medium

  * scripts/local-premount/resume:
    - Use readlink -f to correctly handle non-symlink $resume
      (LP: #1876570)
  * hook-functions:
    - when MODULES=list there will be no 'kernel' dir, so don't try
      to find anything there, as it will log an error
      (LP: #1927779)
  * hooks/fsck:
    - don't check PASSNO, always include fsck
      (LP: #1917780)

 -- Dan Streetman <email address hidden> Thu, 18 Mar 2021 14:48:17 -0400

Changed in initramfs-tools (Ubuntu Groovy):
status: Fix Committed → 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.