From owner-freebsd-stable@FreeBSD.ORG Mon Jun 1 10:27:13 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBADD106566B for ; Mon, 1 Jun 2009 10:27:13 +0000 (UTC) (envelope-from hlh@restart.be) Received: from tignes.restart.be (tignes.restart.be [IPv6:2001:41d0:2:2d29:0:1::]) by mx1.freebsd.org (Postfix) with ESMTP id 42AD68FC12 for ; Mon, 1 Jun 2009 10:27:13 +0000 (UTC) (envelope-from hlh@restart.be) Received: from restart.be (avoriaz.tunnel.bel [IPv6:2001:41d0:2:2d29:1:ffff::]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "avoriaz.restart.be", Issuer "CA master" (verified OK)) by tignes.restart.be (Postfix) with ESMTPS id 7680E4DBB; Mon, 1 Jun 2009 12:27:12 +0200 (CEST) Received: from morzine.restart.bel (morzine.restart.be [IPv6:2001:41d0:2:2d29:1:2::]) (authenticated bits=0) by restart.be (8.14.3/8.14.3) with ESMTP id n51AR95E029790; Mon, 1 Jun 2009 12:27:09 +0200 (CEST) (envelope-from hlh@restart.be) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=restart.be; s=avoriaz; t=1243852032; bh=CJXYr9Mdjn7jucow2iQ0dtM+w69tN4wvzckns47hbS8=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=YQPrvbrHcM3vGy67OtTKq1nDmaVrlREtvYOfsiWFG2NA432Xjlg1aJTldbBjB2n58 LyYiF6p3yvE/ylU7pvB0w== DomainKey-Signature: a=rsa-sha1; s=avoriaz; d=restart.be; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:content-type: content-transfer-encoding:x-scanned-by; b=Mq2InzISSALLyu3uaFxr1ptqbVXgfUHTThnGaqpXqNS07PJrSRIO/3wAlgFtrJvYA 54ycpl+iOrAVbE59KCZcw== Message-ID: <4A23ACFD.102@restart.be> Date: Mon, 01 Jun 2009 12:27:09 +0200 From: Henri Hennebert Organization: RestartSoft User-Agent: Thunderbird 2.0.0.21 (X11/20090412) MIME-Version: 1.0 To: Lorenzo Perone References: <29579856-69F7-4CDC-A52A-B414A40180ED@yellowspace.net> <4A1B0B4F.1020106@h3q.com> <18972.5870.795005.186542@already.dhcp.gene.com> <4A1C18CC.7080902@icyb.net.ua> <18972.7173.216763.407615@already.dhcp.gene.com> <4A23A81A.5050600@restart.be> In-Reply-To: <4A23A81A.5050600@restart.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on IPv6:2001:41d0:2:2d29:1:1:: Cc: Mickael MAILLOT , FreeBSD Stable Mailing List Subject: Re: ZFS booting without partitions X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 10:27:14 -0000 Henri Hennebert wrote: > Lorenzo Perone wrote: >> Hi, >> >> I tried hard... but without success ;( >> >> the result is, when choosing the disk with the zfs boot >> sectors in it (in my case F5, which goes to ad6), the kernel >> is not found. the console shows: >> >> forth not found >> definitions not found >> only not found >> (the above repeated several times) > > This is the file /boot/loader from 7.2-STABLE which is wrong. > > You can find a copy from 8.0-CURRENT and a script that I tested on a USB > key) and is running for me: > > http://verbier.restart.be/xfer/boot-zfs/ > > Put this directory somewhere, eg /tmp/boot-zfs > > and run the script eg: > `cd /tmp/boot-zfs && sh -x make_usb_key.sh da6 kingston` > > good luck CAVEAT: The script put tuning in '/boot/loader.conf' wich imply "options KVA_PAGES=384" in my i386 kernel. Henri > > Henri >> >> can't load 'kernel' >> >> and I get thrown to the loader prompt. >> lsdev does not show any ZFS devices. >> >> Strange thing: if I boot from the other disk, F1, which is my >> ad4 containing the normal ufs system I used to make up the other >> one, and escape to the loader prompt, lsdev actually sees the >> zpool which is on the other disk, and shows: >> zfs0: tank >> >> I tried booting with boot zfs:tank or zfs:tank:/boot/kernel/kernel, >> but there I get the panic: free: guard1 fail message. >> (would boot zfs:tank:/boot/kernel/kernel be correct, anyways?) >> >> Sure I'm doing something wrong, but what...? Is it a problem that >> the pool is made out of the second disk only (ad6)? >> >> Here are my details (note: latest stable and biosdisk.c merged >> with changes shown in r185095. no problems in buildworld/kernel): >> >> >> >> Machine: p4 4GHz 4 GB RAM (i386) >> >> Note: the pool has actually a different name (heidi >> instead of tank, if this can be of any relevance...), >> just using tank here as it's one of the conventions... >> >> mount (just to show my starting situation) >> >> /dev/mirror/gm0s1a on / (ufs, local) >> devfs on /dev (devfs, local) >> /dev/mirror/gm0s1e on /tmp (ufs, local, soft-updates) >> /dev/mirror/gm0s1f on /usr (ufs, local, soft-updates) >> /dev/mirror/gm0s1d on /var (ufs, local, soft-updates) >> >> gmirror status >> Name Status Components >> mirror/gm0 DEGRADED ad4 >> (ad6 used to be the second disk...) >> >> echo 'LOADER_ZFS_SUPPORT=yes' >> /etc/make.conf >> >> cd /usr/src >> make buildworld && make buildkernel KERNCONF=HEIDI >> make installkernel KERNCONF=HEIDI >> mergemaster >> make installworld >> shutdown -r now >> >> dd if=/dev/zero of=/dev/ad6 bs=512 count=32 >> >> zpool create tank ad6 >> zfs create tank/usr >> zfs create tank/var >> zfs create -V 4gb tank/swap >> zfs set org.freebsd:swap=on tank/swap >> zpool set bootfs=tank tank >> >> rsync -avx / /tank >> rsync -avx /usr/ /tank/usr >> rsync -avx /var/ /tank/var >> cd /usr/src >> make installkernel KERNCONF=HEIDI DESTDIR=/tank >> >> zpool export tank >> >> dd if=/boot/zfsboot of=/dev/ad6 bs=512 count=1 >> dd if=/boot/zfsboot of=/dev/ad6 bs=512 skip=1 seek=1024 >> >> zpool import tank >> >> zfs set mountpoint=legacy tank >> zfs set mountpoint=/usr tank/usr >> zfs set mountpoint=/var tank/var >> >> shutdown -r now ... >> >> at the 'mbr prompt' I pressed F5 (the second disk, ad6) >> .. as written above, loader gets loaded (at this stage >> I suppose it's the stuff dd't after block 1024?), >> but kernel not found. >> >> /usr/src/sys/i386/conf/HEIDI: >> (among other things...): >> options KVA_PAGES=512 >> >> (/tank)/boot/loader.conf: >> vm.kmem_size="1024M" >> vm.kmem_size_max="1024M" >> vfs.zfs.arc_max="128M" >> vfs.zfs.vdev.cache.size="8M" >> vfs.root.mountfrom="zfs:tank" >> >> (/tank)/etc/fstab: >> # Device Mountpoint FStype Options Dump Pass# >> tank / zfs rw 0 0 >> /dev/acd0 /cdrom cd9660 ro,noauto 0 0 >> >> >> >> any help is welcome... don't know where to go from here right now. >> >> BTW: I can't stop thanking the team for the incredible >> pace at which bugs are fixed these days! >> >> >> Regards, >> >> Lorenzo >> >> >> >> On 26.05.2009, at 18:42, George Hartzell wrote: >> >>> Andriy Gapon writes: >>>> on 26/05/2009 19:21 George Hartzell said the following: >>>>> Dmitry Morozovsky writes: >>>>>> On Tue, 26 May 2009, Mickael MAILLOT wrote: >>>>>> >>>>>> MM> Hi, >>>>>> MM> >>>>>> MM> i prefere use zfsboot boot sector, an example is better than a >>>>>> long talk: >>>>>> MM> >>>>>> MM> $ zpool create tank mirror ad4 ad6 >>>>>> MM> $ zpool export tank >>>>>> MM> $ dd if=/boot/zfsboot of=/dev/ad4 bs=512 count=1 >>>>>> MM> $ dd if=/boot/zfsboot of=/dev/ad6 bs=512 count=1 >>>>>> MM> $ dd if=/boot/zfsboot of=/dev/ad4 bs=512 skeep=1 seek=1024 >>>>>> MM> $ dd if=/boot/zfsboot of=/dev/ad6 bs=512 skeep=1 seek=1024 >>>>>> >>>>>> s/skeep/skip/ ? ;-) >>>>> >>>>> What is the reason for copying zfsboot one bit at a time, as opposed >>>>> to >>>>> >>>>> dd if=/boot/zfsboot of=/dev/ad4 bs=512 count=2 >>>> >>>> seek=1024 for the second part? and no 'count=1' for it? :-) >>>> >>>> [Just guessing] Apparently the first block of zfsboot is some form >>>> of MBR and the >>>> rest is zfs-specific code that goes to magical sector 1024. >>> >>> Ok, I managed to read the argument to seek as "one block", apparently >>> my coffee hasn't hit yet. >>> >>> I'm still confused about the two parts of zfsboot and what's magical >>> about seeking to 1024. >>> >>> g. >>> >>> _______________________________________________ >>> freebsd-stable@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >>> To unsubscribe, send any mail to >>> "freebsd-stable-unsubscribe@freebsd.org" >> >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"