helloSystem / ISO

helloSystem Live and installation ISO
https://github.com/helloSystem/
BSD 3-Clause "New" or "Revised" License
806 stars 58 forks source link

Consider making non-ISO USB images using 'zpool checkpoint' #81

Open probonopd opened 3 years ago

probonopd commented 3 years ago

Addressing https://github.com/helloSystem/ISO/issues/4, in BSD Now Episode 383: "Scale the tail" it is explained that sing just ZFS it is not possible to generate a writeable pool from read-only media plus read-write media (such as RAM).

https://www.freebsdnews.com/2021/01/01/bsd-now-episode-383-scale-the-tail/

But it is suggested that since few people are using actual DVD media anymore, we could construct non-ISO disk images with ZFS on them (similar to what NomadBSD is doing), but then using zpool checkpoint (think of it as a "pool-wide snapshot").

During the boot process, one could go back to the last checkpoint.

Advantages:

Disadvantages:

Maybe we can at least find a way to boot into Xorg from truly read-only media by mounting a few tmpfs in the right places like /etc, /var, /usr/local/etc, /usr/local/var? This way one could at least install the system from a DVD. Is it worth the extra hassle? I don't know.

grahamperrin commented 3 years ago

Wonder whether this approach might work around https://github.com/helloSystem/ISO/issues/75#issuecomment-753476482 uname and other commands not working in single user mode …

probonopd commented 3 years ago

Don't think the topics are related.

probonopd commented 3 years ago

How would one do this to the system one has booted from?

zpool export zroot
zpool import --rewind-to-checkpoint zroot
Cannot unmount '/': Invalid argument

So one would probably only be able to do this from a ramdisk.