aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: a75dc991d73373b6f7a21666b8fd438449034f87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

OpenZFS Build Environment

Original document location.

Current environment covers OpenZFS for GNU/Linux version 2.2.6.

Also available are branches with Debian build fixes.

Debian Dependencies

Install build dependencies, tested with Debian 12 following OpenZFS's Building ZFS.

sudo apt install alien autoconf automake build-essential debhelper-compat dh-autoreconf dh-dkms dh-python dkms fakeroot gawk git libaio-dev libattr1-dev libblkid-dev libcurl4-openssl-dev libelf-dev libffi-dev libpam0g-dev libssl-dev libtirpc-dev libtool libudev-dev linux-headers-generic parallel po-debconf python3 python3-all-dev python3-cffi python3-dev python3-packaging python3-setuptools python3-sphinx uuid-dev zlib1g-dev

apt install linux-headers-amd64 libselinux-dev parted lsscsi wget ksh gdebi python3-distutils

Pull sources

OpenZFS Source

Fetching the original sources.

git clone https://github.com/openzfs/zfs
cd zfs
git checkout -b b_zfs-2.2.6 zfs-2.2.6
cd ..

With Debian Build Fix

Fetching the jausoft branch

git clone git://jausoft.com/srv/scm/openzfs/zfs.git
cd zfs
git checkout -b b_zfs_2.2.6 --track origin/b_zfs_2.2.6
cd ..

Build

The following is captured within make-all.sh script.

mkdir -p build

cd zfs
git clean -d -f -x
# select branch/tag ..
./autogen.sh
./configure --enable-systemd
make -j$(nproc)
make -j1 deb-utils deb-dkms
mv *.tar.gz *.deb ../build
make clean
rm -f *.rpm
cd ..

Convenience scrips

You can find convenient removal and install scripts within scripts folder.

  • scripts: ZFS debian package remova and install scripts
  • rescue: Manual ZFS rescue scripts
  • setup: Misc ZFS setup and tuning scripts

Manual ZFS Rescue

Documented shell script rescue/chroot_zfs.sh shows how-to

  • auto import local zfs pools
  • chroot into the imported root filesystem
    • bind special devices and pipes to zfs realm
    • chroot into the zfs system
  • shows three typical recovery tasks
    • update-initramfs -u -k all
    • update-grub
    • grub-install /dev/disk/by-id/your_boot_root_device
      • perhaps repeat this for all your ZFS pool devices

ZFS Compatibility Settings

Following compatibility feature sets have been tested

  • Read-Only Feature Sets etc/zfs/compatibility.d/readonly
  • Extended GRUB2 and Read-Only Feature Sets etc/zfs/compatibility.d/grub2_readonly