-
-
Save rca/d237b086ce820405f2b438c0cda96bfe to your computer and use it in GitHub Desktop.
ZFS 0.8 at Raspberry Pi
This file contains hidden or 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
#!/usr/bin/env sh | |
set -e | |
set -x | |
ZFS_RELEASE=zfs-2.0-release | |
# keep track of the current directory | |
CUR_PWD="$(pwd)" | |
# switch over to the directory that contains the script | |
cd "$(dirname $0)" | |
# if the zfs repo does not yet exist, prepare the system for building and clone the repo | |
if [ ! -d zfs ]; then | |
# https://github.com/zfsonlinux/zfs/wiki/Building-ZFS | |
sudo apt-get install -y build-essential autoconf automake libtool gawk alien fakeroot ksh | |
sudo apt-get install -y zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev | |
sudo apt-get install -y libacl1-dev libaio-dev libdevmapper-dev libssl-dev libelf-dev | |
sudo apt-get install -y python3 python3-dev python3-setuptools python3-cffi | |
#sudo apt-get install -y linux-headers-$(uname -r) | |
sudo apt-get install raspberrypi-kernel-headers | |
sudo apt-get install -y git | |
git clone https://github.com/zfsonlinux/zfs.git | |
fi | |
cd zfs | |
git checkout . | |
git checkout ${ZFS_RELEASE} | |
git pull | |
git branch | |
make clean || true | |
make distclean || true | |
./autogen.sh | |
autoreconf --install --force | |
./configure | |
make -s -j$(nproc) | |
sudo make install | |
sudo ldconfig | |
sudo depmod -a | |
sudo modprobe zfs | |
sudo zpool import -a | |
sudo zpool import -a -d /dev | |
cd "${CUR_DIR}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment