From owner-freebsd-fs@FreeBSD.ORG Fri Nov 21 21:31:32 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 9D3F71065674 for ; Fri, 21 Nov 2008 21:31:32 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.168]) by mx1.freebsd.org (Postfix) with ESMTP id 8367C8FC16 for ; Fri, 21 Nov 2008 21:31:32 +0000 (UTC) (envelope-from olivier@gid0.org) Received: by wf-out-1314.google.com with SMTP id 24so1191710wfg.7 for ; Fri, 21 Nov 2008 13:31:32 -0800 (PST) Received: by 10.142.193.13 with SMTP id q13mr466770wff.265.1227303091174; Fri, 21 Nov 2008 13:31:31 -0800 (PST) Received: by 10.142.179.14 with HTTP; Fri, 21 Nov 2008 13:31:31 -0800 (PST) Message-ID: <367b2c980811211331v551893a8sde2231c3bc65468c@mail.gmail.com> Date: Fri, 21 Nov 2008 22:31:31 +0100 From: "Olivier SMEDTS" To: "Doug Rabson" In-Reply-To: <16C31872-6A83-4FAB-AC85-213D604CDDE4@rabson.org> 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> 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: Fri, 21 Nov 2008 21:31:32 -0000 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 It works ! Now I'm stuck at loader(8) prompt. After having a look at your patch, I tried building world with "LOADER_ZFS_SUPPORT=yes". And it seems broken, at least on amd64 : # cd /usr/src # make buildworld LOADER_ZFS_SUPPORT=yes [...] ===> sys (all) ===> sys/boot (all) ===> sys/boot/ficl (all) ===> sys/boot/efi (all) ===> sys/boot/efi/libefi (all) ===> sys/boot/zfs (all) ln -sf /work/src/sys/boot/zfs/../../../i386/include machine cc -O2 -pipe -march=native -I/work/src/sys/boot/zfs/../common -I/work/src/sys/boot/zfs/../.. -I. -I/work/src/sys/boot/zfs/../../../lib/libstand -I/work/src/sys/boot/zfs/../../cddl/boot/zfs -ffreestanding -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -Wformat -Wall -c /work/src/sys/boot/zfs/zfs.c /work/src/sys/boot/zfs/zfs.c:1: error: -mpreferred-stack-boundary=2 is not between 4 and 12 *** Error code 1 Stop in /work/src/sys/boot/zfs. *** Error code 1 Stop in /work/src/sys/boot. *** Error code 1 Stop in /work/src/sys. *** Error code 1 Stop in /work/src. *** Error code 1 Stop in /work/src. *** Error code 1 Stop in /work/src. > Alternatively, you might try using the brand new support for GPT that I > committed yesterday: Well, this one was broken on amd64 and is now disconnected from the build. Any advice ? Olivier -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas."