From owner-freebsd-sparc64@FreeBSD.ORG Thu Jul 29 08:55:10 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ECF8106564A for ; Thu, 29 Jul 2010 08:55:10 +0000 (UTC) (envelope-from freebsd-sparc@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id C0B248FC17 for ; Thu, 29 Jul 2010 08:55:09 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OeOeq-0005Ay-0U for freebsd-sparc64@freebsd.org; Thu, 29 Jul 2010 10:40:04 +0200 Received: from 193.33.173.33 ([193.33.173.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Jul 2010 10:40:03 +0200 Received: from c.kworr by 193.33.173.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Jul 2010 10:40:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-sparc64@freebsd.org From: Volodymyr Kostyrko Date: Thu, 29 Jul 2010 11:06:59 +0300 Lines: 43 Message-ID: References: <201007270945.32010.jhb@freebsd.org> <20100728210257.GB10197@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 193.33.173.33 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; uk-UA; rv:1.9.1.11) Gecko/20100722 Thunderbird/3.0.6 In-Reply-To: <20100728210257.GB10197@alchemy.franken.de> Subject: Re: ZFS root partition X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 08:55:10 -0000 29.07.2010 00:02, Marius Strobl написав(ла): >>> Is is possible to have a ZFS root with sparc64? I've used one of the >>> guides on the wiki, http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot, on >>> amd64 and it worked fine, but that doesn't seem to apply, since the >>> /boot/pmbr and /boot/gptzfsboot files don't exist on sparc64. >> >> Booting from a GPT isn't supported for OpenFirmware, so it doesn't work for >> sparc64. The problem might reside in protective MBR. gpart creates PMBR the way some older BIOS'es would be confused - it doesn't align partitions. I have surpassed that on older i386/amd64 machines by editing pmbr with fdisk an giving fdisk chance to 'fix' protective partition. > Looking at the description of the ZFS on-disk format it should > be possible to implement something similar with the VTOC scheme > though; the first-stage loader (8K max., we have no zero-stage > on sparc64) probably should jump to something like a 1.5-stage > loader located in the 3.5MB boot block area located after the > ZFS uberblock and would need to know how to read ZFS in order > to finally load /boot/loader. I haven't looked at how the GPT > variant works in detail but I suspect most of the ZFS-specific > actually could be recycled. The other missing part would be to > teach some part (maybe GEOM_PART) how to write something to the > ZFS boot block area. Any takers? :) It's already done for i386/amd64 through zfsboot. You just need to: dd if=/boot/zfsboot of=/zpool/shard bs=512 count=1 dd if=/boot/zfsboot of=/zpool/shard bs=512 seek=1024 skip=1 This scheme has some disadvantages also: - you can't update boot code on running pool; - ZFS would not propagate boot loader to other mirrors/spares (current available version, there was talk about that on opensolaris mailing lists). That way gpart partitioning gives you: - separate partition to contain extra boot-code; - ability to add some swap on raw disk and not on vdev. -- Sphinx of black quartz judge my vow.