Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#56375 - [arch-install-scripts] file: common: fsck_types array update

Attached to Project: Arch Linux
Opened by Ceriel Jacobs (cj1) - Sunday, 19 November 2017, 12:14 GMT
Last edited by freswa (frederik) - Sunday, 13 September 2020, 13:34 GMT
Task Type General Gripe
Category Arch Projects
Status Assigned
Assigned To Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

The current <https://git.archlinux.org/arch-install-scripts.git/tree/common> state shows a limited list of file systems with fsck tools.

The 4.13.12-1-ARCH state of:
$ pkgfile -vbr '/fsck\..+' | awk -F. '{ print $NF }' | sort
btrfs
cramfs
exfat
ext2
ext3
ext4
f2fs
fat
hfsplus
jfs
minix
msdos
reiserfs
vfat
xfs

Is it wise to update?

declare -A fsck_types=([btrfs]=1
[cramfs]=1
[exfat]=1
[ext2]=1
[ext3]=1
[ext4]=1
[ext4dev]=1
[f2fs]=1
[fat]=1
[hfsplus]=1
[jfs]=1
[minix]=1
[msdos]=1
[reiserfs]=1
[vfat]=1
[xfs]=1)
This task depends upon

Comment by Ceriel Jacobs (cj1) - Sunday, 19 November 2017, 12:17 GMT
[code]
declare -A fsck_types=([btrfs]=1
[cramfs]=1
[exfat]=1
[ext2]=1
[ext3]=1
[ext4]=1
[ext4dev]=1
[f2fs]=1
[fat]=1
[hfsplus]=1
[jfs]=1
[minix]=1
[msdos]=1
[reiserfs]=1
[vfat]=1
[xfs]=1)
[/code]
Comment by Dave Reisner (falconindy) - Sunday, 19 November 2017, 14:39 GMT
Have you verified that these have *real* fsck tools that should be run routinely at bootup?

For example, fsck.btrfs is a script which does either: nothing, or prints a warning (which means we should then remove fsck.xfs).
Comment by Ceriel Jacobs (cj1) - Sunday, 19 November 2017, 22:58 GMT
Oops, I haven't verified.

fsck.f2fs doesn't exist.
/usr/bin/fsck.fat exists.
fsck.hfsplus doesn't exist.

Note: fsck.exfat doesn't exist. That might be a candidate for removal from the list.
Comment by Doug Newgard (Scimmia) - Monday, 20 November 2017, 14:38 GMT
How in the world did you come to the conclusion that those don't exist?
Comment by Ceriel Jacobs (cj1) - Wednesday, 22 November 2017, 09:07 GMT
# updatedb
# locate fsck.f2fs ; echo $?
1
# locate fsck.fat ; echo $?
/usr/bin/fsck.fat
0
# locate fsck.hfsplus ; echo $?
1
# locate fsck.exfat ; echo $?
1
Comment by loqs (loqs) - Wednesday, 22 November 2017, 09:24 GMT
$ pacman -Fo /usr/bin/fsck.f2fs
usr/bin/fsck.f2fs is owned by extra/f2fs-tools 1.9.0-1
$ pacman -Fo /usr/bin/fsck.exfat
usr/bin/fsck.exfat is owned by community/exfat-utils 1.2.7-1
Comment by Doug Newgard (Scimmia) - Wednesday, 22 November 2017, 17:26 GMT
End result, f2fs, fat, and hfsplus could be added.
Comment by Dave Reisner (falconindy) - Wednesday, 22 November 2017, 17:37 GMT
Well no, at least fsck.f2fs doesn't support being called by the fsck CLI. This needs proper auditing, not assumptions.
Comment by Marcos Mello (marcosfrm) - Thursday, 25 January 2018, 12:34 GMT
Another option: link all fsck.xxx that do nothing to /bin/true. This semantic is supported by systemd:

https://github.com/systemd/systemd/blob/v236/src/basic/path-util.c#L570

Then add the ones *not* linked to /bin/true to fsck_types?
Comment by Marcos Mello (marcosfrm) - Tuesday, 13 February 2018, 20:41 GMT
> Well no, at least fsck.f2fs doesn't support being called by the fsck CLI. This needs proper auditing, not assumptions.

Here it works (f2fs-tools 1.10.0-1):

# fsck -a /dev/sdb1
fsck from util-linux 2.31.1
Info: Fix the reported corruption.
Info: [/dev/sdb1] Disk Model: SAMSUNG HD322HJ 1113
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 20971520 (10240 MB)
Info: MKFS version
"Linux version 4.15.2-2-ARCH (builduser@heftig-7084) (gcc version 7.3.0 (GCC)) #1 SMP PREEMPT Thu Feb 8 18:54:52 UTC 2018"
Info: FSCK version
from "Linux version 4.15.2-2-ARCH (builduser@heftig-7084) (gcc version 7.3.0 (GCC)) #1 SMP PREEMPT Thu Feb 8 18:54:52 UTC 2018"
to "Linux version 4.15.2-2-ARCH (builduser@heftig-7084) (gcc version 7.3.0 (GCC)) #1 SMP PREEMPT Thu Feb 8 18:54:52 UTC 2018"
Info: superblock features = 0 :
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 20971520 (10240 MB)
Info: CKPT version = c94531
Info: checkpoint state = 185 : trimmed nat_bits compacted_summary unmount
Info: No error was reported

("Info: Fix the reported corruption." on a clean fs is really confusing btw)

> Another option: link all fsck.xxx that do nothing to /bin/true. This semantic is supported by systemd:
>
> https://github.com/systemd/systemd/blob/v236/src/basic/path-util.c#L570
>
> Then add the ones *not* linked to /bin/true to fsck_types?

Nah, they are still useful to instruct user what tool to run. But since both fsck.btrfs and fsck.xfs do nothing: [btrfs]=0 and [xfs]=0.

fat, exfat, ntfs are not native and we do not have tools for hfs (hfsprogs is no packaged afaik).

Loading...