archiso-zfs/init

29 lines
579 B
Plaintext
Raw Normal View History

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