From owner-freebsd-fs@FreeBSD.ORG Thu Apr 29 16:30:03 2010 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC027106566B for ; Thu, 29 Apr 2010 16:30:03 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1146D8FC12 for ; Thu, 29 Apr 2010 16:30:00 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA13378; Thu, 29 Apr 2010 19:29:59 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4BD9B406.5070009@icyb.net.ua> Date: Thu, 29 Apr 2010 19:29:58 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: freebsd-fs@FreeBSD.org References: <4B9FD6E0.5000303@icyb.net.ua> In-Reply-To: <4B9FD6E0.5000303@icyb.net.ua> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Navdeep Parhar 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 16:30:03 -0000 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 http://www.mail-archive.com/grub-devel@gnu.org/msg15161.html 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