Automates a UEFI Debian installation on an encrypted ZFS pool
Go to file
2022-11-05 00:36:26 -04:00
scripts Install Debian 11 on OpenZFS via live session 2022-10-04 03:10:43 -04:00
.gitignore Install Debian 11 on OpenZFS via live session 2022-10-04 03:10:43 -04:00
debianzfs.pkr.hcl Install Debian 11 on OpenZFS via live session 2022-10-04 03:10:43 -04:00
debianzfs.sh Add installation instructions in the comments 2022-11-05 00:36:26 -04:00
LICENSE Install Debian 11 on OpenZFS via live session 2022-10-04 03:10:43 -04:00
Makefile Install Debian 11 on OpenZFS via live session 2022-10-04 03:10:43 -04:00
README.md Fix fstab by using a UUID for boot 2022-10-27 01:16:57 -04: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. Grab auto-generated passwords from the log

    grep PW= debianzfs.log
    
  5. 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
    
  6. If dropped into UEFI shell

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

    zpool import -f rpool
    exit
    
  8. Enter rpool password

  9. Login with root's password

License

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