Last active
June 26, 2024 20:49
-
-
Save ReSearchITEng/cd559fcc0ec6932c6d8ffe1fb4845d9b to your computer and use it in GitHub Desktop.
build latest zfs kernel module from source code on raspberrypi2 arm 32bit debian pios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -r -i'.BAK' 's/^deb(.*)$/deb\1 contrib/g' /etc/apt/sources.list | |
# MUST REMOVE zfs-dkms zfs-zed , so modules will not conflict: | |
sudo apt purge -y zfs-dkms zfs-zed zfsutils-linux | |
sudo apt update -y | |
sudo apt upgrade -y | |
echo "NOW REBOOT, to both: fully remove zfs-dkms&zfs-zed AND take eventually latest kernel, you are now $(uname -r)" | |
sleep 100 | |
#reboot # to take latest uname -r | |
#sudo apt install linux-generic -y | |
sudo apt install linux-image-$(uname -r) -y # --reinstall | |
sudo apt install linux-modules-$(uname -r) -y # --reinstall | |
sudo apt install linux-modules-extra-$(uname -r) -y # --reinstall | |
#sudo apt --autoremove --yes purge linux-generic linux-image-generic linux-headers-generic | |
sudo apt install -y linux-headers | |
sudo apt install libncurses5-dev libffi-dev libtool -y #suggested by gemini | |
#sudo apt install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-generic python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging git libcurl4-openssl-dev debhelper-compat dh-python po-debconf python3-all-dev python3-sphinx parallel | |
# | |
sudo apt install -y build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging git libcurl4-openssl-dev debhelper-compat dh-python po-debconf python3-all-dev parallel | |
#python3-sphinx samba | |
sudo apt install -y ksh bc bzip2 fio acl sysstat mdadm lsscsi parted attr dbench nfs-kernel-server rng-tools pax linux-perf selinux-utils quota | |
git checkout zfs-2.2.4 | |
cd zfs | |
sh autogen.sh | |
./configure | |
make -s -j$(nproc) | |
sudo make install; sudo ldconfig; sudo depmod | |
sudo modprobe zfs | |
sudo make -C module/ install | |
sudo make -C modules/ install | |
echo "some kernel cleanup" | |
apt purge linux-headers-$(uname -r)-v6 linux-headers-$(uname -r)-v6* linux-image-$(uname -r)-v6* linux-headers-rpi-v6* linux-image-rpi-v6* -y | |
apt purge linux-headers-$(uname -r)-v8* linux-headers-$(uname -r)-v8* linux-image-$(uname -r)-v8* linux-headers-rpi-v8* linux-image-rpi-v8* -y | |
apt purge linux-headers-$(uname -r)-v7l* linux-headers-$(uname -r)-v7l* linux-image-$(uname -r)-v7l* linux-headers-rpi-v7l* linux-image-rpi-v7l* -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment