From owner-freebsd-fs@FreeBSD.ORG Thu Apr 29 21:15:25 2010 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1205) id CB8151065672; Thu, 29 Apr 2010 21:15:25 +0000 (UTC) Date: Thu, 29 Apr 2010 21:15:25 +0000 From: Navdeep Parhar To: Andriy Gapon Message-ID: <20100429211525.GA91893@hub.freebsd.org> References: <4B9FD6E0.5000303@icyb.net.ua> <4BD9B406.5070009@icyb.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BD9B406.5070009@icyb.net.ua> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@FreeBSD.org Subject: Re: few ideas for zfsloader (boot environments) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2010 21:15:25 -0000 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