[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
--- xfsprogs (5.13.0-1ubuntu2.1) jammy; urgency=medium * Backport from upstream: - fix fsck.xfs run by different shells when fsck.mode=force is set (LP: #2081163). -- Gerald Yang Thu, 17 Oct 2024 06:49:09 + This change ensures xfs_repair actually runs when fsck.mode=force is set, but it's missing an earlier upstream change that seems required for xfs_repair to actually *succeed*. With only these changes in 5.13.0-1ubuntu2.1, fsck.xfs drops into a rescue shell on boot if the filesystem requires a repair. Please see https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2101888 for details on the exact behaviour and potential solution, as I wasn't sure of the procedure to report side effects resulting from a particular fix. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
This bug was fixed in the package xfsprogs - 6.6.0-1ubuntu2.1 --- xfsprogs (6.6.0-1ubuntu2.1) noble; urgency=medium * Backport from upstream: - fix fsck.xfs run by different shells when fsck.mode=force is set (LP: #2081163). -- Gerald Yang Thu, 17 Oct 2024 07:36:15 + ** Changed in: xfsprogs (Ubuntu Noble) Status: Fix Committed => Fix Released ** Changed in: xfsprogs (Ubuntu Jammy) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
This bug was fixed in the package xfsprogs - 5.3.0-1ubuntu2.1 --- xfsprogs (5.3.0-1ubuntu2.1) focal; urgency=medium * Backport from upstream: - fix fsck.xfs run by different shells when fsck.mode=force is set (LP: #2081163). -- Gerald Yang Thu, 17 Oct 2024 05:32:23 + -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
This bug was fixed in the package xfsprogs - 5.13.0-1ubuntu2.1 --- xfsprogs (5.13.0-1ubuntu2.1) jammy; urgency=medium * Backport from upstream: - fix fsck.xfs run by different shells when fsck.mode=force is set (LP: #2081163). -- Gerald Yang Thu, 17 Oct 2024 06:49:09 + ** Changed in: xfsprogs (Ubuntu Focal) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
** Merge proposal unlinked: https://code.launchpad.net/~liushuyu-011/ubuntu/+source/xfsprogs/+git/xfsprogs/+merge/477153 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Verified xfsprogs 6.6.0-1ubuntu2.1 in noble-proposed and confirmed it fixes the issue ** Tags removed: verification-needed verification-needed-noble ** Tags added: verification-done verification-done-noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Hello gerald.yang, or anyone else affected, Accepted xfsprogs into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xfsprogs/6.6.0-1ubuntu2.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- noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed-noble. 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: xfsprogs (Ubuntu Noble) Status: In Progress => Fix Committed ** Tags removed: verification-done ** Tags added: verification-needed verification-needed-noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
I've reached out to @liushuyu-011 about bug 2076309, to see if we could proceed with this one first. Given the framepointer SRU still needs to address some pending issues and might take some time, he graciously agreed to let us proceed with this bug first (many thanks, Zixing!). I've sponsored this again for Noble, containing only Gerald's changes and a minor version adjustment. It builds correctly on my PPA [1], and passed autopkgtests for all-proposed across supported architectures. Once someone from the SRU team reviews and accepts it, we can proceed with clearing out the -proposed versions for xfsprogs as well. [1] https://launchpad.net/~halves/+archive/ubuntu/test -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Releasing focal and jammy updates is blocked on having a fix for noble; our policy is that we will not allow a situation where upgrading to a supported release introduces a known regression. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Hi Brian, It seems that xfsprogs contains the fix is still in focal-proposed and jammy-proposed, not released to -updates. Only oracular and plucky have it in -updates, could you help to check? Thanks, Gerald -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
This bug was fixed in the package xfsprogs - 6.8.0-2.2ubuntu1.1 --- xfsprogs (6.8.0-2.2ubuntu1.1) oracular; urgency=medium * Backport from upstream: - fix fsck.xfs run by different shells when fsck.mode=force is set (LP: #2081163). -- Gerald Yang Thu, 17 Oct 2024 07:48:37 + ** Changed in: xfsprogs (Ubuntu Oracular) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
** Changed in: xfsprogs (Ubuntu Noble) Status: Incomplete => New ** Description changed: [Impact] tl;dr: fsck.mode=force is not correctly applied in the initramfs, causing XFS to not be checked or repaired. When fsck.mode=force is specified in the kernel command line, fsck.xfs is executed during the boot process. However, when the default shell is not bash, $PS1 should be a different value, consider the following script: cat ps1.sh echo "$PS1" run ps1.sh with different shells: ash ./ps1.sh $ bash ./ps1.sh dash ./ps1.sh $ ksh ./ps1.sh zsh ./ps1.sh On systems like Ubuntu, where dash is the default shell during the boot process to improve startup speed. This results in FORCE being incorrectly set to false and then xfs_repair is not invoked: if [ -n "$PS1" -o -t 0 ]; then FORCE=false fi Other distros may encounter this issue too if the default shell is set to anoother shell. Check "-t 0" is enough to determine if we are in interactive mode, and xfs_repair is invoked as expected regardless of the shell used. [Test Case] 1. install Ubuntu Focal with two disks (one for the system, the other for test xfs partition) 2. create partition and xfs file system on the second drive (in my case it is /dev/vdb (the disk), /dev/vdb1 (the xfs partition)) 3. create mount point dir (ie, /data) and add appropriate line to the /etc/fstab, ie: /dev/vdb1 /data xfs defaults 0 2 4. sudo mount --all to test the above, next: sudo umount /data 5. break the xfs fs on /dev/vdb1: sudo xfs_db -x -c blockget -c "blocktrash -s 512109 -n 1000" /dev/vdb1 6. verify it's broken: sudo mount --all 7. add the "fsck.mode=force" to the kernel boot option in grub (/etc/default/grub): GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 fsck.mode=force" 8. sudo update-grub 9. reboot the system and make sure xfs is repaired - [Where things could go wrong] + [Where the problems can occur] The patche removes $PS1 check, "-t 0" is already enough to determine if it's in interactive mode in different shells, check $PS1 is more likely causing unexpected issues mentioned above, in this case, this change won't cause other issues. This has been merged into upstream: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?h=for-next&id=19dde7fac0f38af2990e367ef4dd8ec512920c12 - [ Original Bug Report ] + [Original Bug Report] https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2071474 ** Description changed: [Impact] tl;dr: fsck.mode=force is not correctly applied in the initramfs, causing XFS to not be checked or repaired. When fsck.mode=force is specified in the kernel command line, fsck.xfs is executed during the boot process. However, when the default shell is not bash, $PS1 should be a different value, consider the following script: cat ps1.sh echo "$PS1" run ps1.sh with different shells: ash ./ps1.sh $ bash ./ps1.sh dash ./ps1.sh $ ksh ./ps1.sh zsh ./ps1.sh On systems like Ubuntu, where dash is the default shell during the boot process to improve startup speed. This results in FORCE being incorrectly set to false and then xfs_repair is not invoked: if [ -n "$PS1" -o -t 0 ]; then FORCE=false fi Other distros may encounter this issue too if the default shell is set to anoother shell. Check "-t 0" is enough to determine if we are in interactive mode, and xfs_repair is invoked as expected regardless of the shell used. [Test Case] 1. install Ubuntu Focal with two disks (one for the system, the other for test xfs partition) 2. create partition and xfs file system on the second drive (in my case it is /dev/vdb (the disk), /dev/vdb1 (the xfs partition)) 3. create mount point dir (ie, /data) and add appropriate line to the /etc/fstab, ie: /dev/vdb1 /data xfs defaults 0 2 4. sudo mount --all to test the above, next: sudo umount /data 5. break the xfs fs on /dev/vdb1: sudo xfs_db -x -c blockget -c "blocktrash -s 512109 -n 1000" /dev/vdb1 6. verify it's broken: sudo mount --all 7. add the "fsck.mode=force" to the kernel boot option in grub (/etc/default/grub): GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 fsck.mode=force" 8. sudo update-grub 9. reboot the system and make sure xfs is repaired - [Where the problems can occur] + [Where the problems could occur] The patche removes $PS1 check, "-t 0" is already enough to determine if it's in interactive mode in different shells, check $PS1 is more likely causing unexpected issues mentioned above, in this case, this change won't cause other issues. This has been merged into upstream: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?h=for-next&id=19dde7fac0f38af2990e367ef4dd8ec512920c12 [Original Bug Report] https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2071474 ** Description changed: [Impact] t
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Hi Gerald, I have proposed a combined patch https://code.launchpad.net/~liushuyu-011/ubuntu/+source/xfsprogs/+git/xfsprogs/+merge/477153 so that both changes can be uploaded in one revision. Thanks, Zixing -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
** Merge proposal linked: https://code.launchpad.net/~liushuyu-011/ubuntu/+source/xfsprogs/+git/xfsprogs/+merge/477153 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Hi Julian, I can send another noble debdiff for this SRU once bug 2076309 is merged. Thanks, Gerald -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Also verified for oracular ** Tags removed: verification-needed-oracular ** Tags added: verification-done-oracular -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Also done for plucky ** Tags removed: verification-needed ** Tags added: verification-done -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
I've verified the package in -proposed for focal and jammy ** Tags removed: verification-needed-focal verification-needed-jammy ** Tags added: verification-done-focal verification-done-jammy -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
I see the debdiffs got sponsored (comment #14) and accepted by SRU reviewers, so I'm dropping the ~ubuntu-sponsors subscription. Please re- subscribe, should you need another sponsor in the future. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Hello gerald.yang, or anyone else affected, Accepted xfsprogs into oracular-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xfsprogs/6.8.0-2.2ubuntu1.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- oracular to verification-done-oracular. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-oracular. 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: xfsprogs (Ubuntu Oracular) Status: In Progress => Fix Committed ** Tags added: verification-needed verification-needed-oracular ** Changed in: xfsprogs (Ubuntu Jammy) Status: In Progress => Fix Committed ** Tags added: verification-needed-jammy -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
This bug was fixed in the package xfsprogs - 6.8.0-2.2ubuntu2 --- xfsprogs (6.8.0-2.2ubuntu2) plucky; urgency=medium * Backport from upstream: - fix fsck.xfs run by different shells when fsck.mode=force is set (LP: #2081163). -- Gerald Yang Thu, 07 Nov 2024 10:48:33 +0800 ** Changed in: xfsprogs (Ubuntu Plucky) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
I changed the version numbers for the correct SRU format, and uploaded but I noticed now that it clashes with Zixing's upload for noble in bug 2076309, so we're going to need to sort that out and merge the two and someone needs to own the merged one. ** Changed in: xfsprogs (Ubuntu Noble) Status: In Progress => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
** Description changed: [Impact] + tl;dr: fsck.mode=force is not correctly applied in the initramfs, causing XFS to not be checked or repaired. + When fsck.mode=force is specified in the kernel command line, fsck.xfs is executed during the boot process. However, when the default shell is not bash, $PS1 should be a different value, consider the following script: cat ps1.sh echo "$PS1" run ps1.sh with different shells: ash ./ps1.sh $ bash ./ps1.sh dash ./ps1.sh $ ksh ./ps1.sh zsh ./ps1.sh On systems like Ubuntu, where dash is the default shell during the boot process to improve startup speed. This results in FORCE being incorrectly set to false and then xfs_repair is not invoked: if [ -n "$PS1" -o -t 0 ]; then FORCE=false fi Other distros may encounter this issue too if the default shell is set to anoother shell. Check "-t 0" is enough to determine if we are in interactive mode, and xfs_repair is invoked as expected regardless of the shell used. [Test Case] 1. install Ubuntu Focal with two disks (one for the system, the other for test xfs partition) 2. create partition and xfs file system on the second drive (in my case it is /dev/vdb (the disk), /dev/vdb1 (the xfs partition)) 3. create mount point dir (ie, /data) and add appropriate line to the /etc/fstab, ie: /dev/vdb1 /data xfs defaults 0 2 4. sudo mount --all to test the above, next: sudo umount /data 5. break the xfs fs on /dev/vdb1: sudo xfs_db -x -c blockget -c "blocktrash -s 512109 -n 1000" /dev/vdb1 6. verify it's broken: sudo mount --all 7. add the "fsck.mode=force" to the kernel boot option in grub (/etc/default/grub): GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 fsck.mode=force" 8. sudo update-grub 9. reboot the system and make sure xfs is repaired [Where things could go wrong] The patche removes $PS1 check, "-t 0" is already enough to determine if it's in interactive mode in different shells, check $PS1 is more likely causing unexpected issues mentioned above, in this case, this change won't cause other issues. This has been merged into upstream: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?h=for-next&id=19dde7fac0f38af2990e367ef4dd8ec512920c12 [ Original Bug Report ] https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2071474 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
debdiff for plucky ** Attachment added: "debdiff.plucky" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5835226/+files/debdiff.plucky -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
It looks in xfsprogs/debian/changelog, the package name is still oracular https://launchpad.net/ubuntu/+source/xfsprogs I will wait some time, when it's changed to plucky, I will provide debdiff.plucky -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
** Also affects: xfsprogs (Ubuntu Plucky) Importance: Medium Assignee: gerald.yang (gerald-yang-tw) Status: In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
** Description changed: [Impact] When fsck.mode=force is specified in the kernel command line, fsck.xfs is executed during the boot process. However, when the default shell is not bash, $PS1 should be a different value, consider the following script: cat ps1.sh echo "$PS1" run ps1.sh with different shells: ash ./ps1.sh $ bash ./ps1.sh dash ./ps1.sh $ ksh ./ps1.sh zsh ./ps1.sh On systems like Ubuntu, where dash is the default shell during the boot process to improve startup speed. This results in FORCE being incorrectly set to false and then xfs_repair is not invoked: if [ -n "$PS1" -o -t 0 ]; then FORCE=false fi Other distros may encounter this issue too if the default shell is set to anoother shell. Check "-t 0" is enough to determine if we are in interactive mode, and xfs_repair is invoked as expected regardless of the shell used. [Test Case] 1. install Ubuntu Focal with two disks (one for the system, the other for test xfs partition) 2. create partition and xfs file system on the second drive (in my case it is /dev/vdb (the disk), /dev/vdb1 (the xfs partition)) 3. create mount point dir (ie, /data) and add appropriate line to the /etc/fstab, ie: /dev/vdb1 /data xfs defaults 0 2 4. sudo mount --all to test the above, next: sudo umount /data 5. break the xfs fs on /dev/vdb1: sudo xfs_db -x -c blockget -c "blocktrash -s 512109 -n 1000" /dev/vdb1 6. verify it's broken: sudo mount --all 7. add the "fsck.mode=force" to the kernel boot option in grub (/etc/default/grub): GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 fsck.mode=force" 8. sudo update-grub 9. reboot the system and make sure xfs is repaired [Where things could go wrong] - The patche removes $PS1 check, the "-t 0" is already enough to determine if it's in interactive mode, no need to check $PS1, this won't cause other issues. + The patche removes $PS1 check, "-t 0" is already enough to determine if it's in interactive mode in different shells, check $PS1 is more likely causing unexpected issues mentioned above, in this case, this change won't cause other issues. This has been merged into upstream: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?h=for-next&id=19dde7fac0f38af2990e367ef4dd8ec512920c12 [ Original Bug Report ] https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2071474 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
update debdiff.jammy based on Heitor's suggestions ** Attachment added: "debdiff.jammy" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5828899/+files/debdiff.jammy -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
update debdiff.noble based on Heitor's suggestions ** Attachment added: "debdiff.noble" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5828900/+files/debdiff.noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
update debdiff.oracular based on Heitor's suggestions ** Attachment added: "debdiff.oracular" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5828901/+files/debdiff.oracular -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
update debdiff.focal based on Heitor's suggestions ** Attachment added: "debdiff.focal" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5828898/+files/debdiff.focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
** Also affects: xfsprogs (Ubuntu Noble) Importance: Undecided Status: New ** Also affects: xfsprogs (Ubuntu Jammy) Importance: Undecided Status: New ** Also affects: xfsprogs (Ubuntu Oracular) Importance: Medium Assignee: gerald.yang (gerald-yang-tw) Status: In Progress ** Also affects: xfsprogs (Ubuntu Focal) Importance: Undecided Status: New ** Changed in: xfsprogs (Ubuntu Noble) Assignee: (unassigned) => gerald.yang (gerald-yang-tw) ** Changed in: xfsprogs (Ubuntu Jammy) Assignee: (unassigned) => gerald.yang (gerald-yang-tw) ** Changed in: xfsprogs (Ubuntu Focal) Assignee: (unassigned) => gerald.yang (gerald-yang-tw) ** Changed in: xfsprogs (Ubuntu Noble) Status: New => In Progress ** Changed in: xfsprogs (Ubuntu Jammy) Status: New => In Progress ** Changed in: xfsprogs (Ubuntu Focal) Status: New => In Progress ** Changed in: xfsprogs (Ubuntu Noble) Importance: Undecided => Medium ** Changed in: xfsprogs (Ubuntu Jammy) Importance: Undecided => Medium ** Changed in: xfsprogs (Ubuntu Focal) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
Need to mention here: the commit ID in master will be the same as the commit ID in for-next branch, so it won't be changed after merging into master -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
debdiff for oracular ** Attachment added: "debdiff.oracular" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5824854/+files/debdiff.oracular -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
debdiff for noble ** Attachment added: "debdiff.noble" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5824799/+files/debdiff.noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
debdiff for jammy ** Attachment added: "debdiff.jammy" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5824797/+files/debdiff.jammy -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
debdiff for focal ** Attachment added: "debdiff.focal" https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+attachment/5824796/+files/debdiff.focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
gerald, thanks for reporting the bug. would you like to contribute a patch? https://ubuntu.com/community/contribute/ubuntu-development -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
** Changed in: xfsprogs (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2081163] Re: fix fsck.xfs run by different shells when fsck.mode=force is set
patch: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?h=for-next&id=19dde7fac0f38af2990e367ef4dd8ec512920c12 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081163 Title: fix fsck.xfs run by different shells when fsck.mode=force is set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2081163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs