Solved ZFS to ISO

New to ZFS, and wondering what exists in BSDland to easily create a bootable .iso image and spread the goodness.

I've been using clonezilla for years, works great on UFS filesystem, but not so much anymore as I just learned clonezilla does not support ZFS.

The only thing I can think of would be to manually build using dd, etc. but that sucks. And surely something better exists, so no point in reinventing the wheel. Also, maybe there's some clever way of doing this using ZFS itself?

Any words of wisdom are much appreciated.
 
New to ZFS, and wondering what exists in BSDland to easily create a bootable .iso image and spread the goodness.

I've been using clonezilla for years, works great on UFS filesystem, but not so much anymore as I just learned clonezilla does not support ZFS.

The only thing I can think of would be to manually build using dd, etc. but that sucks. And surely something better exists, so no point in reinventing the wheel. Also, maybe there's some clever way of doing this using ZFS itself?

Any words of wisdom are much appreciated.
I'm a noob to zfs also. Why not take snapshots of your important information/data/files whatever. Store them off site. Then even you need it say after a fresh install send it back and do a rollback?
 
src/release/Makefile builds the ISO images, so you could either use it, or reference it to write your own Makefile / script.

poudriere image has an option to build ISOs

I don't think you can use ZFS exclusively because you need a boot partition. You could have a ZFS snapshot that you send to one of the partitions though.
 
Thanks for the replies. I had come across poudriere, but will take another look since it seems there's not a whole lot available that's, eg. not in alpha stage of developement like poudriere.

So as I expected, I'm kind of going to have to build my own wheel mostly.

<rant> zfs has been out a while now, why hasn't 3rd party (ie clonezilla) started supporting this better? </rant>

I'll leave this thread open a bit longer to see if anyone else piles on, hopefully there's still a better way.
 
I don't think you can use ZFS exclusively because you need a boot partition.
I don't think that's what the OP is looking for. More a command like zfs createiso .... that would automagically create a bootable ISO from the referenced dataset. Or at least that's how I understood it. No such command exist. Creating a bootable ISO is quite an undertaking. Also note that CDs have an ISO-9660 filesystem, DVDs use UDF. It's not ZFS or UFS on those disks.
 
It's likely that, not knowing what I don't know, am looking at this incorrectly.

What I need to know is, how to get a thumbdrive bootable/installable image of a freebsd machine on ZFS filesystem, so we can quickly image dozens of machines quickly. Anyone doing something similar? I'm not married to ISO.

At this point I'm considering making my bootable image of just freebsd on a 20G UFS partition. After imaging a machine, I will just need a script to create a ZFS pool on the rest of the hard drive and move some data onto it. But I'd rather just image it and be done.
 
Your line of questioning seems similar to mine with a ISO slant.
@covacats suggestion is the one I like to try. zfs send to memory disk backed by a file..
It sounds like Andriy 's suggestion of zpool-reguid is worthy of reading up on. The secret sauce.

Anyone doing something similar?
The poudriere image solution is really your best bet for ZFS images.
 
So to recap create image with Poudriere Image -t zfs+gpt

Take the resulting image file and copy onto bootable medium like USB Live stick and bootup on that.
Flash image to target disk.
You could also flash target drive offline if not fixed medium.

You can use the FreeBSD memstick installer and expand it with gpart resize/growfs.
Then use spare room for images to flash.
 
What I need to know is, how to get a thumbdrive bootable/installable image of a freebsd machine on ZFS filesystem, so we can quickly image dozens of machines quickly.

If I understand your intention correctly, you are looking for solution with two thumbdrives: a bootable FreeBSD thumbdrive (minimal OS) and a second thumbdrive containing file with raw image of ZFS slice (of fully configured FreeBSD installation). Boot off 1st pendrive, dd file from the second pendrive to HDD, reboot, job done.
 
Fit everything on one stick. Don't dd(1) the ZFS filesystem, that'll cause various identifiers to be the same everywhere too. Not entirely sure what the impact of that would be but it doesn't look good.

I'd zfs send a basic system to a file. Create a bootable medium, that can partition the drive, set up the bootcode, etc. and use zfs receive to stream the dataset back to a disk. Rinse and repeat.

Just use UFS on a memory stick, much easier to set up than a (bootable) CD/DVD ISO image. Easier to maintain too.
 
Thanks for all the help everyone! I'm going to try that zfs send/receive method, that sounds promising. Marking solved.
 
Back
Top