Install ZFS root with FAI?
Steffen Grunewald
steffen.grunewald at aei.mpg.de
Fri Dec 7 12:21:47 CET 2018
On Thu, 2018-11-15 at 19:56:56 +0100, Steffen Grunewald wrote:
> On Mon, 2018-11-12 at 12:54:52 +0800, Chris Hsiang wrote:
> > Dear Steffen
> >
> > How do you install debians os afterwards and config grub? follow
> > https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS
> > or??
>
> Hi Chris,
>
> Basically that's the document, yes. I didn't get that far yet, other
> duties interrupted my work. I have a nfsroot that can find and report
> existing zfs pools, so the sysinfo part is ready, but whether I'll
> be able to install a zfs root without or with UEFI enabled still has
> to be found out. (There's another article suggesting that the "with
> UEFI" kind might be easier, because you'll have access to the
> bootloader via a separate partition - that gets created by zpool
> create anyway.)
> I'm planning to report back when it's done, this or the other way.
After fiddling a bit with grub installation, starting with the
GRUB_PC/10-setup script from the examples, I'm finding the following:
Setting up a root zpool mirroring three disks, I get
BOOT_DEVICE="/dev/disk/by-id/ata-INTEL_SSDSC2KW128G8_PHLA805104HX128BGN /dev/disk/by-id/ata-INTEL_SSDSC2KW128G8_PHLA805102QH128BGN /dev/disk/by-id/ata-INTEL_SSDSC2KW128G8_PHLA805007K6128BGN"
which looks innocent.
10-setup although converts this to
GROOT="(hostdisk//dev/sda) (hostdisk//dev/sdm) (hostdisk//dev/sdn)"
(actually, there are linefeeds!)
If this is passed to a single grub-install command, it chokes at the
parentheses. Replacing that one with a loop over all items in $GROOT,
and stripping the (), I get failures of the following kind:
grub-install: error: cannot find a GRUB drive for hostdisk//dev/sda. Check your device.map.
Next step would be to strip the hostdisk/ prefix (why is this there?),
but I remember having seen a different problem then. Got to rinse
and repeat.
BTW, as the linux-headers package gets consistently installed after the
spl-dkms one, a trick similar to the nfsroot hook described earlier is
also necessary to get the modules built inside the target chroot.
I may have to go for UEFI to have a non-ZFS boot partition as written up
in http://www.thecrosseroads.net/2016/02/booting-a-zfs-root-via-uefi-on-debian
as this starts to eat my precious time.
No, I'd like to avoid a MD RAID for /.
Thanks,
Steffen
More information about the linux-fai
mailing list