Date: Sun, 12 Jul 2009 16:56:35 +0200 From: Olivier SMEDTS <olivier@gid0.org> To: Scot Hetzel <swhetzel@gmail.com> Cc: freebsd-current <freebsd-current@freebsd.org> Subject: Re: [SOLVED]Re: How to create ZFS on Root using MBR slices? Message-ID: <367b2c980907120756k3977ec5ah4e56d76dd4cfbd52@mail.gmail.com> In-Reply-To: <790a9fff0907111855md9de566n62926c0037606514@mail.gmail.com> References: <790a9fff0907101159w495b644dge4a4bd81de0bda9b@mail.gmail.com> <20090710211809.GA84773@crodrigues.org> <790a9fff0907101911y7143ed4bnbb050d78ebc21558@mail.gmail.com> <790a9fff0907110606t61da8ebbufa5575d12d949ca@mail.gmail.com> <367b2c980907111603t74766651gf52310d38dc48dd2@mail.gmail.com> <790a9fff0907111855md9de566n62926c0037606514@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2009/7/12 Scot Hetzel <swhetzel@gmail.com>: >> Can you successfuly boot this ZFS-Only FreeBSD on MBR slices ? >> > Yes, my system has successfully booted from the ZFS-Only Root > filesystem as outlined in > http://wiki.freebsd.org/ZFSOnRootWithZFSboot. =A0I did have to set > exec=3Don for the /var/tmp directory, otherwise it wouldn't let pkg_add > run the +INSTALL scripts from the package staging area in /var/tmp. > >> I tried the zfsboot trick few months ago and it didn't work for me. >> And it still doesn't work, I'm stuck at the loader with no prompt. I >> tried both with a BSD partition (freebsd-zfs type) and without, >> directly on the MBR slice. >> > > Did it get stuck at the Boot Manager menu (F1 - Win, F2 - FreeBSD, > ...) or did it show that it was running /boot/loader? > > If it was running /boot/loader, you need to make sure that > LOADER_ZFS_SUPPORT (add it to src.conf) was used to build /boot/loader > =A0and installed on your system. > > Also make sure that /boot/zfs/zpool.cache was copied to your ZFS zpool > (i.e zroot/boot/zfs/). I did both. Here is what I did exactly : # cd /usr/src # make -j4 buildworld LOADER_ZFS_SUPPORT=3Dyes # make -j4 buildkernel # zpool destroy tank # gpart delete -i 2 ada0 # gpart add -b 104856255 -s 209712510 -t freebsd -i 2 ada0 # dd if=3D/dev/zero of=3D/dev/ada0s2 bs=3D512 count=3D64 # gpart create -s BSD /dev/ada0s2 # gpart add -t freebsd-zfs ada0s2 # zpool create -R /mnt tank ada0s2a # zpool export tank # dd if=3D/boot/zfsboot of=3D/dev/ada0s2 bs=3D512 count=3D1 # dd if=3D/boot/zfsboot of=3D/dev/ada0s2a bs=3D512 skip=3D1 seek=3D1024 # zpool import -o altroot=3D/mnt tank # zfs create tank/freebsd # zpool set bootfs=3Dtank/freebsd tank # zfs create -V 2G tank/swap # zfs set org.freebsd:swap=3Don tank/swap # zfs set checksum=3Doff tank/swap # make installworld DESTDIR=3D/mnt/freebsd/ # make installkernel DESTDIR=3D/mnt/freebsd/ # make distribution DESTDIR=3D/mnt/freebsd/ # cp /boot/zfs/zpool.cache /mnt/freebsd/boot/zfs/ # cp /boot/loader.conf /mnt/freebsd/boot/ # cat << EOF >> /mnt/freebsd/boot/loader.conf zfs_load=3D"YES" vfs.zfs.prefetch_disable=3D"1" vfs.root.mountfrom=3D"zfs:tank/freebsd" EOF # touch /mnt/freebsd/etc/fstab TODO : tmpfs # cat << EOF > /mnt/freebsd/etc/rc.conf zfs_enable=3D"YES" EOF # zfs unmount tank # reboot I don't use the FreeBSD boot manager but grub. Loader does not output anything, and I can't abort it with a key. I tried with a GPT partition scheme on a USB key and it worked, but I couldn't manage to get it working with MBR slices. With or without BSD partitions inside the slice. Olivier --=20 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."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?367b2c980907120756k3977ec5ah4e56d76dd4cfbd52>