Live data from Hacker News

Diskless Linux boot using ZFS, iSCSI and PXE

aniket.foo

51–60 of 108 posts

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#51
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.

Systemd-boot is my choice for any simple boot scenario. Love it. Agreed that grub is a mess

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#52

Earlier quoted context omitted.

NFS diskless was easier for me to setup when I was doing it. THe caveat was, you needed readonly root, so that meant freezing the OS, anything that needed changing was either stored in a ram disk (that you need to setup) or a per host nfs area (kinda like overlayfs, but not)

Why would you need a read-only root? Do you mean to share across multiple machines?

Yeah it makes things a bit easier to debug. Originally my system was designed to run on multiple machines at once.

If you needed to update the root dir, you chrooted into it and did the (yum) update.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#53

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?

No. PXE boots routinely load the kernel and initramfs directly into RAM with no local disk involved. The initramfs then mounts the real root FS over the network.

Then anaconda or whatover os installer picks up and installs the OS in a PXE install sequence when there is a local disk.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#54
post #45
post #36

Earlier quoted context omitted.

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.

grub is just a operating system. it is quite good when shit hits the fan

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#56
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).

i never got it to work

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#57

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

ZFS supports self healing, you do not have scrub, it will be corrected during a bad read as long you have a copy. Metadata has 2 copies by default for additional safety for a single disk.

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#59
post #28
post #23

This could be an interesting setup for booting off a NAS like Synology or QNAP. I haven't really used iSCSI, it's intimidating how much prep this takes...

iSCSI seems intentionally obscure. One of the improvements I made to NBD was invent a simple, standardized URI format so that you can specify servers easily, eg: nbdinfo nbd://server nbdcopy nbd://server:2001/ nbd+unix:///?socket=/tmp/localsock https://github.com/NetworkBlockDevice/nbd/blob/master/doc/ur...

NBD looks pretty nice! I've been eyeing it from afar for a while.

How well does it work in environments with noticeable network latency?

Re: Diskless Linux boot using ZFS, iSCSI and PXE

#60
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?

Dunno about performance vs NFS, but I've stuffed an unaware OS onto ZVOL-over-iSCSI using a NIC with option ROM.
Post reply on HN