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 Jelle van der Waa (jelly) - Monday, 18 September 2023, 17:53 GMT
Opened by Ceriel Jacobs (cj1) - Sunday, 19 November 2017, 12:14 GMT
Last edited by Jelle van der Waa (jelly) - Monday, 18 September 2023, 17:53 GMT
|
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
Closed by Jelle van der Waa (jelly)
Monday, 18 September 2023, 17:53 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/a rch-install-scripts/issues/63
Monday, 18 September 2023, 17:53 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/a rch-install-scripts/issues/63
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]
For example, fsck.btrfs is a script which does either: nothing, or prints a warning (which means we should then remove fsck.xfs).
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.
# locate fsck.f2fs ; echo $?
1
# locate fsck.fat ; echo $?
/usr/bin/fsck.fat
0
# locate fsck.hfsplus ; echo $?
1
# locate fsck.exfat ; echo $?
1
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
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?
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).