Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
advanced:target [2018/10/03 13:51] – Add warning dan | advanced:target [2018/10/10 00:02] (current) – [Build ZFS on Linux] dan | ||
---|---|---|---|
Line 6: | Line 6: | ||
Unfortunately, | Unfortunately, | ||
- | + | ===== Create a non-privileged user with sudo capability ===== | |
- | ===== Rebuild | + | < |
- | To ensure | + | adduser fred |
+ | usermod -aG sudo fred | ||
+ | </ | ||
+ | ===== Install | ||
+ | In order to build ZFS, you must have the headers for the running kernel installed | ||
< | < | ||
- | sudo apt update && sudo apt upgrade | + | wget http://deb.odroid.in/5422-s/ |
- | sudo apt install git gcc g++ build-essential | + | sudo dpkg -i linux-headers-4.14.73-136_20181001_armhf.deb |
- | git clone --depth 1 https://github.com/hardkernel/linux -b odroidxu4-4.14.y | + | |
- | cd linux | + | |
- | make odroidxu4_defconfig | + | |
- | make -j8 | + | |
- | sudo make modules_install | + | |
- | sudo cp -f arch/arm/ | + | |
- | sudo cp -f arch/ | + | |
- | sudo cp -f arch/ | + | |
- | sudo cp -f arch/ | + | |
- | sudo cp .config / | + | |
- | sudo update-initramfs -c -k `make kernelrelease` | + | |
- | sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d / | + | |
- | sudo cp / | + | |
- | sync | + | |
</ | </ | ||
- | Then reboot your system to start using the new kernel. | ||
===== Build ZFS on Linux ===== | ===== Build ZFS on Linux ===== | ||
These instructions are taken from the [[https:// | These instructions are taken from the [[https:// | ||
< | < | ||
- | sudo apt install build-essential autoconf libtool gawk alien fakeroot zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev parted lsscsi ksh libssl-dev libelf-dev | + | sudo apt install |
</ | </ | ||
Then download, build, and install the ZFS code: | Then download, build, and install the ZFS code: | ||
Line 56: | Line 45: | ||
===== Enable encryption, and create an encrypted dataset ===== | ===== Enable encryption, and create an encrypted dataset ===== | ||
+ | |||
The idea of this system is to be a standalone storage " | The idea of this system is to be a standalone storage " | ||
< | < | ||
Line 67: | Line 57: | ||
===== Create a replication user ===== | ===== Create a replication user ===== | ||
- | For the sake of security, it would be best if replication to this device ran as a user other than root. | + | For the sake of security, it would be best if replication to this device ran as a user other than root. |
+ | |||
+ | Then, on the Odroid, as root, run | ||
< | < | ||
- | adduser zfsuser | + | adduser zfsuser |
</ | </ | ||
- | Disable login for that user: | + | where " |
+ | |||
+ | Now allow that user to make changes on the encrypted dataset: | ||
< | < | ||
- | chsh -s /bin/false zfsuser | + | zfs allow -ldu zfsuser create, |
</ | </ | ||
- | Generate a SSH keypair for that user: | + | ===== Install Zerotier ===== |
+ | [[https:// | ||
< | < | ||
- | sudo -u zfsuser ssh-keygen | + | sudo apt install curl |
+ | curl https:// | ||
</ | </ | ||
- | Now allow that user to make changes on the encrypted dataset: | ||
- | < | ||
- | zfs allow -u zfsuser create, | ||
- | </ | ||
- |