From owner-freebsd-fs@FreeBSD.ORG Thu Nov 20 16:07:52 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 7C8AF1065670 for ; Thu, 20 Nov 2008 16:07:52 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (unknown [IPv6:2002:50b1:e8f2:1::143]) by mx1.freebsd.org (Postfix) with ESMTP id 3357B8FC16 for ; Thu, 20 Nov 2008 16:07:52 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc] (unknown [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc]) by itchy.rabson.org (Postfix) with ESMTP id 4C1583FAA; Thu, 20 Nov 2008 16:06:37 +0000 (GMT) Message-Id: <16C31872-6A83-4FAB-AC85-213D604CDDE4@rabson.org> From: Doug Rabson To: Olivier SMEDTS In-Reply-To: <367b2c980811191412h5e0af470k165b37edc2fc5853@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Thu, 20 Nov 2008 16:07:50 +0000 References: <367b2c980811191412h5e0af470k165b37edc2fc5853@mail.gmail.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Scanned: ClamAV 0.92/8653/Thu Nov 20 09:04:07 2008 on itchy.rabson.org X-Virus-Status: Clean 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: Thu, 20 Nov 2008 16:07:52 -0000 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