Skip to content

Commit afaaae3

Browse files
committed
Mount Options TUI.
1 parent 1c1ce5a commit afaaae3

34 files changed

Lines changed: 1388 additions & 640 deletions

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ $ sudo ./build-x86-images.sh -- -v linux6.7
103103
- predefined templates for LVM, LUKS, and combinations of them.
104104
- predefined partitioning templates.
105105
- selected devices will be automatically cleaned up.
106-
- TUI for setting of file system features and options.
106+
- TUI for setting up of file system features and options.
107+
- TUI for setting up of mount options.
107108
- TUI dynamically changes depending on selected template.
108109
- uses `/mnt` for chroot by default.
109110
- allows to use an alternative rootdir via `--rootdir` command line argument.

lib/btrfs_common.pl

Lines changed: 0 additions & 39 deletions
This file was deleted.

lib/extfs_common.pl

Lines changed: 0 additions & 109 deletions
This file was deleted.

lib/f2fs_common.pl

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,10 @@
5050
, opt4(fs_size, size, 0, '--fs_size') % Create the filesystem using size bytes on the subsequent device.
5151
]).
5252

53+
prop_info(mnt_bcachefs_feat, feat4s('--options', ',', on_off), [
54+
prop_feat4(degraded, off, std, none)
55+
, prop_feat4(very_degraded, off, std, none)
56+
, prop_feat4(nochanges, off, std, none)
57+
]).
58+
5359

lib/fs_btrfs.pl

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
% vi: noexpandtab:tabstop=4:ft=gprolog
2+
% Copyright (c) 2024 Sergey Sikorskiy, released under the GNU GPLv2 license.
3+
4+
% man btrfs
5+
% man 5 btrfs
6+
% man mkfs.btrfs
7+
% ls /sys/fs/btrfs/features/
8+
% btrfs_feat(name, [compat, safe, default], descr), "default" means "enabled".
9+
% kv - kernel version.
10+
prop_info(btrfs_feat, feat4s('--features', ',', pref1('^')), [
11+
prop_feat4('mixed-bg', off, std, attr([compat=kv(2, 6, 37), safe=kv(2, 6, 37)], 'mixed data and metadata block groups (compat=2.6.37, safe=2.6.37)'))
12+
, prop_feat4(quota, off, std, attr([compat=kv(3, 4, 0)], 'quota support (qgroups) (compat=3.4)'))
13+
, prop_feat4(extref, on, std, attr([compat=kv(3, 7, 0), safe=kv(3, 12, 0), default=kv(3, 12, 0)], 'increased hardlink limit per file to 65536 (compat=3.7, safe=3.12, default=3.12)'))
14+
, prop_feat4(raid56, off, std, attr([compat=kv(3, 9, 0)], 'raid56 extended format (compat=3.9)'))
15+
, prop_feat4('skinny-metadata', on, std, attr([compat=kv(3, 10, 0), safe=kv(3, 18, 0), default=kv(3, 18, 0)], 'reduced-size metadata extent refs (compat=3.10, safe=3.18, default=3.18)'))
16+
, prop_feat4('no-holes', on, std, attr([compat=kv(3, 14, 0), safe=kv(4, 0, 0), default=kv(5, 15, 0)], 'no explicit hole extents for files (compat=3.14, safe=4.0, default=5.15)'))
17+
, prop_feat4('free-space-tree', on, std, attr([compat=kv(4, 5, 0), safe=kv(4, 9, 0), default=kv(5, 15, 0)], 'free space tree (space_cache=v2) (compat=4.5, safe=4.9, default=5.15)'))
18+
, prop_feat4(raid1c34, off, std, attr([compat=kv(5, 5, 0)], 'RAID1 with 3 or 4 copies (compat=5.5)'))
19+
, prop_feat4(zoned, off, std, attr([compat=kv(5, 12, 0)], 'support zoned devices (compat=5.12)'))
20+
, prop_feat4('block-group-tree', off, std, attr([compat=kv(6, 1, 0)], 'block group tree to reduce mount time (compat=6.1)'))
21+
, prop_feat4('raid-stripe-tree', off, std, attr([compat=kv(6, 7, 0)], ''))
22+
, prop_feat4(squota, off, std, attr([compat=kv(6, 7, 0)], ''))
23+
]).
24+
25+
prop_info(btrfs_rw, opt4s(' '), [
26+
opt4('byte-count', int, 0, '--byte-count')
27+
, opt4(checksum, enum([crc32c, xxhash, sha256, blake2]), crc32c, '--checksum')
28+
, opt4(data, enum([raid0, raid1, raid1c3, raid1c4, raid5, raid6, raid10, single, dup]), single, '--data')
29+
, opt4(metadata, enum([raid0, raid1, raid1c3, raid1c4, raid5, raid6, raid10, single, dup]), raid1, '--metadata')
30+
, opt4(mixed, enable, no, '--mixed')
31+
, opt4(nodesize, size, 16384, '--nodesize')
32+
, opt4(sectorsize, size, 16384, '--sectorsize')
33+
, opt4(label, str, '', '--label')
34+
, opt4(nodiscard, enable, no, '--nodiscard')
35+
, opt4(shrink, enable, no, '--shrink')
36+
, opt4(force, enable, no, '--force')
37+
, opt4(uuid, guid, '', '--uuid')
38+
]).
39+
40+
prop_info(mnt_btrfs_feat, feat4s('--options', ',', on_off), [
41+
prop_feat4(acl, on, pref1(no), none)
42+
, prop_feat4(autodefrag, off, pref1(no), none)
43+
, prop_feat4(compress, off, std, none)
44+
, prop_feat4('compress-force', off, std, none)
45+
, prop_feat4(barrier, on, pref1(no), none)
46+
, prop_feat4(check_int, off, std, none)
47+
, prop_feat4(check_int_data, off, std, none)
48+
, prop_feat4(clear_cache, off, std, none)
49+
, prop_feat4(datacow, on, pref1(no), none)
50+
, prop_feat4(datasum, on, pref1(no), none)
51+
, prop_feat4(degraded, off, std, none)
52+
, prop_feat4(discard, off, pref1(no), none)
53+
, prop_feat4(enospc_debug, off, pref1(no), none)
54+
, prop_feat4(flushoncommit, off, pref1(no), none)
55+
, prop_feat4(nologreplay, off, pref1(no), none)
56+
, prop_feat4(norecovery, off, pref1(no), none)
57+
, prop_feat4(rescan_uuid_tree, off, pref1(no), none)
58+
, prop_feat4(skip_balance, off, pref1(no), none)
59+
, prop_feat4(space_cache, off, pref1(no), none)
60+
, prop_feat4(ssd, off, pref1(no), none)
61+
, prop_feat4(ssd_spread, off, pref1(no), none)
62+
, prop_feat4(treelog, on, pref1(no), none)
63+
, prop_feat4(usebackuproot, off, pref1(no), none)
64+
, prop_feat4(user_subvol_rm_allowed, off, pref1(no), none)
65+
]).
66+
67+
prop_info(mnt_btrfs_opt, opt3s('--options', ','), [
68+
opt3(check_int_print_mask, int, 0)
69+
, opt3(commit, int, 30)
70+
, opt3(compress, enum([zlib, lzo, zstd, no]), zlib)
71+
, opt3('compress-force', enum([zlib, lzo, zstd, no]), zlib)
72+
, opt3(device, str, '')
73+
, opt3(discard, enum([sync, async]), async)
74+
, opt3(fatal_errors, enum([bug, panic]), bug)
75+
, opt3(fragment, enum([off, data, metadata, all]), off)
76+
, opt3(max_inline, int, 2048)
77+
, opt3(metadata_ratio, int, 0)
78+
, opt3(rescue, enum([usebackuproot, nologreplay, ignorebadroots, ibadroots, ignoredatacsums, idatacsums, all]), all)
79+
, opt3(space_cache, enum([v1, v2]), v2)
80+
, opt3(subvol, str, '')
81+
, opt3(subvolid, int, 0)
82+
, opt3(thread_pool, int, 0)
83+
]).
84+

lib/fs_exfat.pl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
% vi: noexpandtab:tabstop=4:ft=gprolog
2+
% Copyright (c) 2024 Sergey Sikorskiy, released under the GNU GPLv2 license.
3+
4+
% man mkfs.exfat
5+
6+
prop_info(exfat_rw, opt4s(' '), [
7+
opt4('boundary-align', size, '16k', '-b')
8+
, opt4('cluster-size', size, '4k', '-c')
9+
, opt4('full-format', enable, no, '-f')
10+
, opt4(label, str, '', '-L')
11+
, opt4(guid, guid, '', '-U')
12+
, opt4('pack-bitmap', enable, no, '--pack-bitmap')
13+
, opt4(quite, enable, no, '-q')
14+
]).
15+
16+
prop_info(mnt_exfat_opt, opt3s('--options', ','), [
17+
opt3(umask, octal, 0)
18+
, opt3(dmask, octal, 0)
19+
, opt3(fmask, octal, 0)
20+
, opt3(uid, int, 0)
21+
, opt3(gid, int, 0)
22+
]).
23+

0 commit comments

Comments
 (0)