diff --git a/setup.sh b/setup.sh index bfddaf2..ce8a107 100644 --- a/setup.sh +++ b/setup.sh @@ -258,6 +258,16 @@ function add_zfs_hook_to_initramfs () { '/mnt/etc/mkinitcpio.conf' } +function set_initramfs_build_list () { + # No need to build fallback initramfs, our new fallback is ZFS snapshots + sed -ri \ + -e '/^#/d' \ + -e '/^$/d' \ + -e '/^fallback/d' \ + -e 's'$'\x1''^(PRESETS=)[^\r\n\f]*'$'\x1''\1('"'"'default'"'"')'$'\x1''g' \ + '/mnt/etc/mkinitcpio.d/linux.preset' +} + function add_zfs_files_to_new_os () { for zfs_file in '/etc/hostid' '/etc/zfs/zpool.cache' '/etc/zfs/zpool.key'; do rsync -av --itemize-changes {'','/mnt'}"${zfs_file}" @@ -510,6 +520,7 @@ function main () { set_hostname set_locale add_zfs_hook_to_initramfs + set_initramfs_build_list add_zfs_files_to_new_os enter_chroot # We're done in chroot