Live data from Hacker News

Diskless Linux boot using ZFS, iSCSI and PXE

aniket.foo

41–50 of 108 posts

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#41
post #39

Earlier quoted context omitted.

The 'target' moves slow so once you learn it, it all stays relevant forever. ... And it's very, very fun.

Does it offer performance advantages over NFS root?

I kind of expect the performance is worse, but one neat thing is that iscsi is a block device, so you could run e.g. disk crypto, volume management or whatever on it. Not to mention any FS. And you don't need to deal with NFS or RPC.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#42
Very neat. I've never seen the Debian installer using iscsi. No other installer either for that matter.

Looks like ZFS is only used to store the image on the server, though. I was expecting this to be more interesting because of that.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#43

Does zfs support error correcting instead of just finding (already) broken files? I have been waiting for such a feature for like 15 years now. Without it, zfs is just a fad and useless filesystem (all that complexity for NOTHING). ext2 for the win! still

I don't know if I'm understanding your question, but ZFS actively corrects data on disk when it finds a checksum error [0]. Those checksum errors can be found when accessing that data, or doing a 'scrub' action that scans the whole volume to check integrity.

--

  0: https://klarasystems.com/articles/troubleshooting-zfs-common-issues-how-to-fix-them/

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#44
Friends don't let friends use grub.

rEFInd is _so_ much simpler: one efi entry, one text config file in the efi partition, nothing that needs to change when the kernel updates, and no massive pile of templating and moving parts to mysteriously break dumping you at an impenetrable grub “rescue” shell.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#45
post #36

Earlier quoted context omitted.

or just copy the latest kernel to something like /vmlinux and /initramfs

Or use UKI and throw the current kernel to /efi/boot/bootx64.efi; there's plenty of solutions to sane bootloader/kernel management if you're willing to invest 15 minutes into the topic and not act like it's scary and complicated (it really is the opposite).

Grub2 is scary and complicated. Remove grub from the equation, and all the scary goes away.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#46
post #44

Friends don't let friends use grub. rEFInd is _so_ much simpler: one efi entry, one text config file in the efi partition, nothing that needs to change when the kernel updates, and no massive pile of templating and moving parts to mysteriously break dumping you at an impenetrable grub “rescue” shell.

There's also systemd-boot, which seems to be getting more popular.

https://systemd.io/BOOT/

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#47

> UEFI fixes that to some extent, but it’s a pain to maintain the UEFI entries manually and change them every time the kernel updates. … you don't have to update the UEFI entries every time the kernel updates. (I guess you might if you do like a kernel w/ CONFIG_EFI_STUB, and you place the new kernel under a different filename than what the UEFI boot entry point to then you might … but I was under the impression that…

I have 2 entries, /efi/current.efi and /efi/old.efi... when I upgrade, I copy current to old, and copy my new kernel out of /boot as current and reboot.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#48

Nice. I'm extra fond of ZFS backed network root filesystem, because it lets you put an OS on ZFS without needing to deal with ZFS support in that OS. (One of these days I want to try OpenBSD with its root on NFS on ZFS, either from Linux or FreeBSD.) Does anyone have an opinion on iSCSI vs NBD?

I think you need NBD if you're going to use glustre, but I could also be thinking of ceph.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#49

Pretty cool! You could also boot into an ephemeral minimal initrd that displays a selection menu instead of doing it in iPXE. That would grab the new kernel and initrd from the network and kexecs it without reboot.

> You could also boot into an ephemeral minimal initrd

Wouldn't that need a local disk?

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#50

"I didn’t want to get into the hassle of repartitioning everything that the boot loader works with both Linux & Windows." Hmmh? I haven't done so in years, but configuring multi-boot used to be considerably easier than disk-less operation.

The Debian installer is less than optimal for repartitioning. The Linux NTFS resizing code also has a tendency to trigger data corruption. Not really Linux' fault, but it's a good reason to do partitioning from inside of Windows, which can be a pain already. Another issue I've run into is Windows creating a very small (~300MiB) EFI partition that barely fits the Windows bootloader, let alone a Linux bootloader and ke…

>Not really Linux' fault

If Linux corrupts someone files, it is 100% Linux's fault and is absolutely unacceptable.

Post reply on HN