Automates a UEFI Debian installation on an encrypted ZFS pool
Go to file
2023-06-12 01:42:00 -04:00
scripts Updated debianzfs for Debian 12 (Bookworm) 2023-06-12 00:47:58 -04:00
.gitignore Install Debian 11 on OpenZFS via live session 2022-10-04 03:10:43 -04:00
debianzfs.pkr.hcl Updated debianzfs for Debian 12 (Bookworm) 2023-06-12 00:47:58 -04:00
debianzfs.sh Remove unused and deprecated function 2023-06-12 01:42:00 -04:00
LICENSE Add CLI options for mirroring 2022-11-27 03:35:55 -05:00
Makefile Updated debianzfs for Debian 12 (Bookworm) 2023-06-12 00:47:58 -04:00
README.md Add CLI options for mirroring 2022-11-27 03:35:55 -05:00

DebianZFS

DebianZFS is a bash script that automates a UEFI Debian installation on an encrypted ZFS pool. The script installs zfsutils-linux on Debian Live, then proceeds to partition, create the boot and root zpools, and debootstraps a minimal system.

Due to licensing concerns with OpenZFS and Linux, distributing the resulting binaries together in a disk image may be a copyright violation. However, nothing keeps you from legally building and keeping your own disk images.

  • Requires packer and qemu to build images

Quick Start

  1. Clone the repository and navigate into the directory

    git clone https://git.krislamo.org/kris/debianzfs
    cd debianzfs
    
  2. Build image

    make
    
  3. Copy qcow2 image to libvirt/images

    sudo cp output/debianzfs.qcow2 /var/lib/libvirt/images/
    
  4. Make a Libvirt VM and start

    sudo virt-install --name debianzfs \
      --description 'Debian ZFS' \
      --ram 2048 \
      --vcpus 2 \
      --disk /var/lib/libvirt/images/debianzfs.qcow2 \
      --os-type generic  \
      --network bridge=virbr0 \
      --graphics vnc,listen=127.0.0.1,port=5901 \
      --boot uefi,loader=/usr/shar/OVMF/OVMF_CODE.fd
    
  5. If dropped into UEFI shell

    Shell> FS0:
    FS0:\> EFI\debian\grubx64.efi
    
  6. If dropped into initramfs

    zpool import -f rpool
    exit
    
  7. Enter rpool password: letmeinzfs!

  8. Login with root's password: changeme

License

  • DebianZFS is licensed under 0BSD, a public domain equivalent license; see the LICENSE file for more information