Re: Creating my own Preseeded ISO with partman replaced by a ZFS step

2018-08-10 Thread Raymond Burkholder

On 2018-08-10 04:51 PM, Bailey Parker wrote:

I'd like to somehow modify the installer ISO that I create when preseeding to
include ZFS (so that before the package manager is configured, a ZFS pool can
be created), replace the partman step with some custom scripting that [creates
a zpool and sets up the datasets][2], and finally install zfs-dkms (also
zfsutils-linux and zfs-initramfs).
I use the late_command to install kernel modules, packages, mirrors, 
kernels, etc.  I have used this to install the zfs modules for 
non-root-zfs boots where zfs partitions are used in other capacities


The late-command allows package install as well as 'in-target' style 
commands, which could call scripts loaded via the preseed process.

In digging through mail archives, I also came across [this script][5], but it's
unclear to me how exactly that would fit into my desired workflow. This sounds
like you'd need to manually drop to a shell to install/setup ZFS.

could probably be handled by the preseed late_command in-target abilities

Is there a sane way to go about adding ZFS root support to my preseeded install
or should I abandon this and wait for better support?  If the latter, are there
steps I could take to add better support given my limited knowledge of d-i?



I've used SaltStack to build my various preseed scripts depending upon 
how physical or virtual machines are built.




Re: Creating my own Preseeded ISO with partman replaced by a ZFS step

2018-08-10 Thread Nicholas D Steeves
On Sat, Aug 11, 2018 at 01:32:40AM +0200, Cyril Brulebois wrote:
> Hi,
> 
> Bailey Parker  (2018-08-10):
> > Is there a sane way to go about adding ZFS root support to my preseeded
> > install or should I abandon this and wait for better support?  If the
> > latter, are there steps I could take to add better support given my
> > limited knowledge of d-i?
> 
> I'm afraid we're not going to support ZFS as that would mean supporting
> out-of-tree kernel modules, which we migrated away from years ago.

Automated Debian on ZFS installation seems like a problem that FAI
should be able to solve.  https://wiki.debian.org/FAI

They don't yet have ZFS support, it's on the roadmap, and they might
be looking for someone to implement it.
  https://fai-project.org/roadmap

Cheers,
Nicholas


signature.asc
Description: PGP signature


Re: Creating my own Preseeded ISO with partman replaced by a ZFS step

2018-08-10 Thread Cyril Brulebois
Hi,

Bailey Parker  (2018-08-10):
> Is there a sane way to go about adding ZFS root support to my preseeded
> install or should I abandon this and wait for better support?  If the
> latter, are there steps I could take to add better support given my
> limited knowledge of d-i?

I'm afraid we're not going to support ZFS as that would mean supporting
out-of-tree kernel modules, which we migrated away from years ago.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Creating my own Preseeded ISO with partman replaced by a ZFS step

2018-08-10 Thread Bailey Parker
Hello,

I'm looking to preseed an installer for a cluster, but I'd like all machines to
boot from ZFS roots. [The best recommendation I've found][1] wants me to boot a
LiveCD, install ZFS, setup the zpool, and the `chroot` in and repeat the
installation manually. This seems really tedious and error-prone, and somewhat
defeats the purpose of the preseeded installer.

I'd like to somehow modify the installer ISO that I create when preseeding to
include ZFS (so that before the package manager is configured, a ZFS pool can
be created), replace the partman step with some custom scripting that [creates
a zpool and sets up the datasets][2], and finally install zfs-dkms (also
zfsutils-linux and zfs-initramfs).

Looking at [an example stretch preseed file][3] (and I must confess, a friend
who is capable of scrolling to the end of a file found this--why
partman/early_command is at the end and not with the other partman stuff is
beyond me!), it seems like if I was able to add the compiled ZFS kernel module
and utils to initrd (along with my preseed file), I could run my zpool stuff
from partman/early_command. However, I'd still need a way to skip the default
partman stuff so that it couldn't overwrite all my work and somehow inform the
rest of the install process to use my ZFS root.

I also came across [partman-zfs][4], but apparently this is only for a FreeBSD
port. Could that be useful in any way?

In digging through mail archives, I also came across [this script][5], but it's
unclear to me how exactly that would fit into my desired workflow. This sounds
like you'd need to manually drop to a shell to install/setup ZFS.

Is there a sane way to go about adding ZFS root support to my preseeded install
or should I abandon this and wait for better support?  If the latter, are there
steps I could take to add better support given my limited knowledge of d-i?

Thanks,
Bailey Parker

  [1]: https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS
  [2]: 
https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS#step-3-system-installation
  [3]: https://www.debian.org/releases/stable/example-preseed.txt
  [4]: https://packages.debian.org/sid/partman-zfs
  [5]: https://lists.debian.org/debian-boot/2018/01/msg00334.html