HN
Today

Diskless Linux boot using ZFS, iSCSI and PXE

This highly detailed guide walks through configuring a diskless Debian Linux boot environment on a gaming PC, leveraging ZFS, iSCSI, and PXE to avoid dual-boot headaches and facilitate AI model testing. It's a deep dive into advanced system networking and storage, appealing to tech-savvy users who appreciate intricate solutions to common computing woes. The comprehensive, step-by-step approach showcases a complex setup that many might find daunting, offering practical solutions for managing diverse operating systems.

35
Score
3
Comments
#2
Highest Rank
6h
on Front Page
First Seen
May 7, 5:00 AM
Last Seen
May 7, 10:00 AM
Rank Over Time
234465

The Lowdown

The author outlines their motivation for building a diskless Linux boot environment, primarily to test AI models on their gaming PC without disturbing their Windows installation. Frustrated with Windows' developer experience and its propensity to break GRUB, they sought a remote boot solution using their existing NAS.

  • Motivation & Limitations: The goal was a dedicated Linux environment for AI model testing, sidestepping Windows issues and repartitioning. While acknowledging slower OS performance, the author deemed it acceptable given that models would primarily load into RAM.
  • Architectural Overview: The setup centers around a Debian 13 server (a Proxmox host) acting as the hub for Netboot.xyz, TFTP, iSCSI Target, and ZFS ZVol, with DNSMasq handled by an Asus router.
  • Netboot.xyz Configuration: The post provides exhaustive steps for installing and tailoring Netboot.xyz, including creating custom menu entries for iSCSI boot and the Debian installer, along with downloading necessary Debian netboot files.
  • TFTP & DNSMasq Setup: Instructions detail configuring tftpd-hpa and setting up DNSMasq on the DHCP server to ensure compatibility with both PXE and iPXE for BIOS and UEFI clients.
  • ZFS ZVol & iSCSI Deep Dive: This section covers the creation of a ZFS ZVol to serve as the remote Debian disk, followed by a meticulous configuration of iSCSI using targetcli, encompassing backstore creation, target definition, ACLs, mutual CHAP authentication, and LUN mapping.
  • Debian Installation Process: A step-by-step visual guide walks through the Debian installer, specifically highlighting critical interactions required to connect to the iSCSI target (e.g., modifying the initiator name, restarting iscsid, and supplying authentication credentials) to install Debian onto the remote ZVol.
  • Post-Installation Boot: The guide concludes by demonstrating the successful boot of the newly installed Debian from the iSCSI target via Netboot.xyz, confirming the functional diskless setup.

This guide meticulously illustrates a robust and advanced method for achieving a diskless Linux boot, presenting a sophisticated alternative for users aiming to isolate operating systems or optimize resource allocation through network-attached storage and boot capabilities.

The Gossip

Nifty Network Notions

While the detailed iSCSI approach is lauded, some commenters point out NFS as a more traditional route for diskless setups. However, a user shared their struggles with root-on-NFS causing issues with package managers, implicitly highlighting potential benefits of the iSCSI method for stability.

Booting Brilliance Beyond Basic

One commenter proposed an advanced boot method involving a minimal, ephemeral initrd to display a selection menu, which could then kexec new kernels and initrds without needing a full system reboot. This offers a more dynamic and potentially faster way to manage different boot environments.