few ideas for zfsloader (boot environments)

Navdeep Parhar np at FreeBSD.org
Thu Apr 29 21:15:25 UTC 2010


On Thu, Apr 29, 2010 at 07:29:58PM +0300, Andriy Gapon wrote:
> on 16/03/2010 21:07 Andriy Gapon said the following:
> > 3. Currently ZFS boot chain lacks an ability to switch bootfs property of a pool.
> > So, if a (new) boot environment is not quite bootable and bootfs points to it,
> > then an alternative boot media (e.g. livecd) is needed to correct the situation.
> > Implementing selection of a boot filesystem in ZFS boot chain seems like a hard task.
> > Alternative idea: a new FreeBSD-specific pool property, nextbootfs.  This property
> > would designate a boot filesystem for the next boot and would be automatically
> > reset by a boot loader at sufficiently early stage.  If the next boot doesn't
> > succeed, then we are back to the regular bootfs property, if it does succeed, then
> > bootfs can be safely changed to the new value.
> 
> I've git it all backwards.
> It is hard to implement nextbootfs property, see my other post about nextboot.
> It is possible to implement boot environment selection in zfs boot code.
> 
> We could use the same approach as in OpenSolaris version of GRUB.
> E.g. have a file in root filesystem of a pool (the filesystem that has the same
> name as the pool) named, say, boot/boot.list that would have a one-per-line list
> of supposedly bootable filesystems in a pool.
> zfsboot would read that file and present the list to a user.  Entry selected by
> bootfs would be a default one.  If user chooses a different filesystem, then the
> boot code would try it for boot (find loader, etc).
> 
> BTW, it's already possible to use FreeBSD+ZFS+GRUB and have this ability (in some
> form).  But it would great to have that "natively".
> 
> Couple of useful links:
> http://grub.enbug.org/GRUB2FreeBSDZFS

^^^^ Oh, and I hope you weren't crediting me for any of the functionality
explained at the link above..?  I have nothing to do with it - it's all
someone else's work.  In fact, I'm not too fond of the kfreebsd,
kfreebsd_module, ...  style of booting FreeBSD from GRUB2 personally.

> http://www.mail-archive.com/grub-devel@gnu.org/msg15161.html

The patch in this email is the only functionality I've ever offered to the
GRUB project.

Regards,
Navdeep

> Thanks to Navdeep for the GRUB work!
> 
> BTW, Navdeep, was there any progress on your grub+zfsloader patch?
> Or GRUB folks plainly refused it?
> 
> -- 
> Andriy Gapon


More information about the freebsd-fs mailing list