Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Sep 2009 11:13:38 +0200
From:      Oliver Fakler <oliver@namp.de>
To:        "Bernhard Schmidt" <bschmidt@techwires.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: boot from raidz
Message-ID:  <27537.1252314818@namp.de>

next in thread | raw e-mail | index | archive | help


On Mon 07/09/09 10:07 , Bernhard Schmidt  wrote:
 Am 06.09.2009 um 21:45 schrieb Oliver Fakler:
 >
 >
 > Hi all,
 >
 > i installed a 8.0 beta 3 amd64 based testsystem.
 >
 > i tried with a root on a raidz, but i have a problem after the
first
 > reboot, there is a error message:
 >
 > can't load kernel
 > I found something that boot root from raidz is not supported, but
 > maybe there is a solution??
 > Hope some can help me
 There are patches from Doug Rabson which add support for booting
from =20
 raidz/raidz2.

http://lists.freebsd.org/pipermail/freebsd-fs/2008-December/005498.html
[1]"
target=3D"_blank">http://lists.freebsd.org/pipermail/freebsd-fs/2008-Decemb=
er/005498.html
 --
 Bernhard
	I tried it, but after a make obj && make depend the make failed with
different errors like undeclared and has no member named.

	I used patch raidzboot-14052009.diff started patching from
/usr/src/sys/ , i'm not sure if this was the right way.

	I'm also not sure if the way of installation was the right one,
here's the way i go:
	gpart create -s GPT da0
gpart add -b 34 -s 128 -t freebsd-boot da0
gpart add -b 162 -s 5242880 -t freebsd-swap da0
gpart add -b 5243042 -s 11534141 -t freebsd-zfs da0
gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 da0
gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 da1
gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 da2
kldload /mnt2/boot/kernel/opensolaris.ko
kldload /mnt2/boot/kernel/zfs.ko

zpool create tank raidz da0p3 da1p1 d2p1

zfs create tank/tmp
zfs create tank/usr
zfs create tank/var

cd /dist/8.0-BETA3/base
export DESTDIR=3D/tank
=2E/install.sh
You are about to extract the base distribution into /tank - are you
SURE
you want to do this over your installed system (y/n)? y
cd ../kernels
=2E/install.sh generic
cd /tank/boot
cp -Rp GENERIC/* kernel/

cd /dist/8.0-BETA3/src
=2E/install.sh all
Extracting sources into /usr/src...
  Extracting source component: base
  Extracting source component: bin
  Extracting source component: cddl
  Extracting source component: contrib
  Extracting source component: crypto
  Extracting source component: etc
  Extracting source component: games
  Extracting source component: gnu
  Extracting source component: include
  Extracting source component: krb5
  Extracting source component: lib
  Extracting source component: libexec
  Extracting source component: release
  Extracting source component: rescue
  Extracting source component: sbin
  Extracting source component: secure
  Extracting source component: share
  Extracting source component: sys
  Extracting source component: tools
  Extracting source component: ubin
  Extracting source component: usbin
Done extracting sources.
Done extracting sources.
cd ../manpages
=2E/install.sh

echo 'zfs_enable=3D"YES"' > /tank/etc/rc.conf
echo 'LOADER_ZFS_SUPPORT=3D"YES"' > /tank/etc/src.conf
echo 'zfs_load=3D"YES"' > /tank/boot/loader.conf
echo 'vfs.root.mountfrom=3D"zfs:tank"' >> /tank/boot/loader.conf
echo &acute;/dev/da0p2 none swap sw 0 0&acute;>> /tank/etc/fstab

mkdir /boot/zfs
zpool export tank && zpool import tank
cp /boot/zfs/zpool.cache /tank/boot/zfs/

chroot /tank
mount -t devfs devfs /dev
unset DESTDIR
cd /usr/src/sys/boot/
make obj
make depend
make
cd i386/loader
make install
umount /dev
touch /etc/fstab
exit

export LD_LIBRARY_PATH=3D/mnt2/lib
zfs set mountpoint=3Dlegacy tank
zfs set mountpoint=3D/tmp tank/tmp
zfs set mountpoint=3D/var tank/var
zfs set mountpoint=3D/usr tank/usr
zpool set bootfs=3Dtank tank
	Cheers
	Oliver

Links:
------
[1] http://mail.kuehlbox.de/parse.php?redirect=3D<a href=3D



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27537.1252314818>