From owner-freebsd-fs@FreeBSD.ORG Tue Nov 25 02:09:08 2008 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 91C321065670 for ; Tue, 25 Nov 2008 02:09:08 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.186]) by mx1.freebsd.org (Postfix) with ESMTP id 1DAF38FC14 for ; Tue, 25 Nov 2008 02:09:07 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so2777659fkk.11 for ; Mon, 24 Nov 2008 18:09:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ZDsrz9PR3ErLbMnkbSGCimtGskEI52yH04OeZefZ2Ys=; b=bvT0uGbFoha9pCDTnUqJ3Z71DP57Qz97UcLekSebcPkppFKQJYbMX2nN0/wbv3/Z8Q epDl/ILr7Zl7bThNr9awco28eBr4TV23jYkyxoePBbWSPGKbezYE7qSGVvLBMH++W5J4 gu+KVOGqGZSDLtXCbnJXDGgL8lUiU6+vptta4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=dzbQSDKWXY60ZOqG1dYH+AbX8JStdjLlYwWb4bSHh8wN9ZnVmCHUwfCYevgoK+Bz0e h1cHP+HihKYXk+Z4b2l0gZyeIiNGjYJxo5kGcyf3uce5ubVdrZtuc69M2ibRF5FVTlzi a75BBxv63sywIe8kymRFGyu+bpLNuwUX5O/JA= Received: by 10.181.139.4 with SMTP id r4mr1346070bkn.89.1227577695623; Mon, 24 Nov 2008 17:48:15 -0800 (PST) Received: by 10.180.236.13 with HTTP; Mon, 24 Nov 2008 17:48:15 -0800 (PST) Message-ID: <70e8236f0811241748w41884a12la50e4e63f83a7542@mail.gmail.com> Date: Tue, 25 Nov 2008 01:48:15 +0000 From: "Joao Barros" To: "Doug Rabson" In-Reply-To: <367b2c980811211331v551893a8sde2231c3bc65468c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <367b2c980811191412h5e0af470k165b37edc2fc5853@mail.gmail.com> <16C31872-6A83-4FAB-AC85-213D604CDDE4@rabson.org> <367b2c980811211331v551893a8sde2231c3bc65468c@mail.gmail.com> Cc: freebsd-fs@freebsd.org Subject: Re: ZFSBoot try and bsdlabel bootstrap code 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: Tue, 25 Nov 2008 02:09:08 -0000 On Fri, Nov 21, 2008 at 9:31 PM, Olivier SMEDTS wrote: > 2008/11/20 Doug Rabson : >> >> On 19 Nov 2008, at 22:12, Olivier SMEDTS wrote: >> >>> Hello, >>> >>> I want to boot off a ZFS pool (version 13) on an USB stick for testing >>> purposes. But I'm stuck with the bsdlabel bootstrap code size... >>> I'm using a 2 hours old CURRENT. >>> >>> # kldload usb2_storage_mass >>> # kldload zfs >>> # dd if=/dev/zero of=/dev/da0 bs=512 count=32 >>> # fdisk -BI da0 >>> # dd if=/dev/zero of=/dev/da0s1 bs=512 count=32 >>> # bsdlabel -wB -b /boot/zfsboot da0s1 >>> bsdlabel: boot code /boot/zfsboot is wrong size >>> >>> Is what I'm trying to do with bsdlabel wrong ? >>> I previously tried with the default bootstrap code but I had an >>> (expected) "boot: Not ufs" error at boot. >>> >>> PS : I'm not subscribed to this list. >> >> The process for install zfsboot is a bit manual (and undocumented). Try >> something like this: >> >> # dd if=/boot/zfsboot of=/dev/da0s1 count=1 >> # dd if=/boot/zfsboot of=/dev/ds0s1 skip=1 seek=1024 >> >>Alternatively, you might try using the brand new support for GPT that I committed yesterday: >> >> # gpt create -f da0 >> # gpt boot -b /boot/pmbr -g /boot/gptzfsboot da0 >> # gpt add -t freebsd-zfs da0 >> # zpool create mypool da0p2 > > It works ! > > Now I'm stuck at loader(8) prompt. That's a me too. I tried this under vmware with LOADER_ZFS_SUPPORT=yes on make.conf: # gpart create -s gpt ad0 # gpart add -b 34 -s 128 -t freebsd-boot ad0 ad0p1 added # gpart add -b 162 -s 15078327 -t freebsd-zfs ad0 ad0p2 added # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad0 # zpool create tank ad0p2 # zpool set bootfs = tank tank lsdev on loader shows: cd devices: disk devices: disk0: BIOS drive c: disk0p1: FreeBSD boot disk0p2: FreeBSD ZFS pxe devices: zfs devices: Any hints? -- Joao Barros