Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jul 2009 14:06:19 +0200
From:      Stefan Bethke <stb@lassitu.de>
To:        noackjr@alumni.rice.edu
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Booting from ZFS raidz
Message-ID:  <67089745-3E3B-45CF-B4E8-91F3B52C8A4C@lassitu.de>
In-Reply-To: <e255c2534239be5cfec8e301b887f752.squirrel@www.noacks.org>
References:  <9461581F-F354-486D-961D-3FD5B1EF007C@rabson.org> <20090201072432.GA25276@server.vk2pj.dyndns.org> <246ecf0c87f944d70c5562eeed4165c9@mail.rabson.org> <9cc826f0720e1624489dd6e6d384babc.squirrel@www.noacks.org> <e6a5ee8d701b0d3393a6d3966ebfe634.squirrel@www.noacks.org> <e255c2534239be5cfec8e301b887f752.squirrel@www.noacks.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 12.07.2009 um 09:06 schrieb Jonathan Noack:

> Anyone know how I should proceed?  I'm really frustrated that I  
> haven't
> been able to get this working.

Me too. I just decided to revisit this, and unfortunatly, I'm still  
stuck with the loader having trouble reading blocks off the raidz1  
volume.  I've updated the creation script (see below).  This is on  
r195709, with LOADER_ZFS_SUPPORT?=YES in /etc/make.conf.


Boot output, transcribed by hand:
error 4 lba 4290782259
error 4 lba 4290782258
error 4 lba 4290782259
error 4 lba 4290782258
error 4 lba 4290782257
error 4 lba 4290782257
...
error 4 lba 4292652987
error 4 lba 4292652986
error 4 lba 4292652987

BTX loader 1.00  BTX version is 1.02
Consoles: internal video/keyboard
BIOS drive A: is disk0
BIOS drive C: is disk1
BIOS drive D: is disk2
BIOS drive E: is disk3
BIOS 638kB/2095040kB available memory

FreeBSD/i386 bootstrap loader, Revision 1.1
(root@freebsd-current-lassitu.de, Wed Jul 15 19:31.22 CEST 2009)
Loading /boot/defaults/loader.conf
ZFS: i/o error - all block copies unavailable
ZFS: i/o error - all block copies unavailable
... (about 10 more of these)
Unable to load a kernel!
can't load 'kernel'

Then the prompt.


My setup script:

# cat prepare-zfs-boot
#!/bin/sh

idx=0

label() {
	dd if=/dev/zero of=/dev/$1 bs=1m count=10
	sz="$(diskinfo /dev/$1 | awk '{print $4}')"
	echo $sz
	gpart destroy $1
	gpart create -s gpt $1
	gpart add -b 34 -s 128 -t freebsd-boot -l "boot${idx}" $1
	gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 $1
	gpart add -b 512 -s $(($sz-1024)) -t freebsd-zfs -l "zfs${idx}" $1
	gpart list $1
	idx="$((idx+1))"
}

set -x

zpool destroy zroot

label da1
label da2
label da3

zpool create zroot raidz /dev/gpt/zfs[0-2]
zpool set bootfs=zroot zroot

zfs create -V 1gb zroot/swap
zfs set org.freebsd:swap=on zroot/swap
zfs set checksum=off zpool/swap

cd /usr/src && make installworld installkernel distribution DESTDIR=/ 
zroot
cp /boot/loader.conf /zroot/boot/loader.conf
echo 'zfs_load="YES"' >>/zroot/boot/loader.conf
echo 'vfs.root.mountfrom="zfs:zroot"' >>/zroot/boot/loader.conf

zpool export zroot
zpool import zroot
cp /boot/zfs/zpool.cache /zroot/boot/zfs/
zfs set mountpoint=legacy zroot
# eof

-- 
Stefan Bethke <stb@lassitu.de>   Fon +49 151 14070811







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?67089745-3E3B-45CF-B4E8-91F3B52C8A4C>