archiso-zfs/init
2020-05-05 21:01:07 +02:00

29 lines
579 B
Bash
Executable file

#!/bin/bash
# This script load zfs kernel module for any archiso.
# github.com/eoli3n
# Thanks to CalimeroTeknik on #archlinux-fr
set -e
print () {
echo -e "\n\033[1m> $1\033[0m\n"
}
print "Testing if archiso is running"
grep archiso /proc/cmdline
print "Install zfs module"
pacman -U http://archzfs.com/archive_archzfs/zfs-linux-.*_$(pacman -Qi linux | sed -n 's/^Version\s*: //p')-x86_64.pkg.*
print "Increasing cowspace to half of RAM"
mount -o remount,size=50% /run/archiso/cowspace
print "Loading zfs kernel module"
modprobe zfs
print "ZFS module is working"