0%

树莓派 3B 编译安装 zfs

  • 安装依赖

    1
    2
    3
    4
    5
    sudo apt remove 3.6-trunk-rpi
    sudo apt update
    sudo apt install build-essential autoconf libtool gawk alien fakeroot
    sudo apt install dkms zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
    sudo apt install python3-dev python3-setuptools python3-cffi
  • 安装内核头文件

    1
    sudo apt upgrade raspberrypi-kernel raspberrypi-kernel-headers
  • 这里下载源代码并解压

    1
    wget https://github.com/zfsonlinux/zfs/releases/download/zfs-0.8.1/zfs-0.8.1.tar.gz && tar zxf zfs-0.8.1.tar.gz
  • 编译安装

    1
    2
    3
    4
    5
    6
    cd ../zfs-0.8.1
    autoreconf --install --force
    ./configure --with-config=srpm
    sed -E 's/(^RPMBUILD = rpmbuild.*)/\1 --target=armhf/' -i Makefile
    make pkg-utils deb-dkms
    for deb in *.deb; do sudo dpkg -i "$deb"; done
  • 重启系统

本文到此结束  感谢您的阅读