Hi
I'm experimenting with ZFS file system to learn more about it. I'm trying to boot my system from USB (having /boot partition in USB and rest in HDD). For simplicity no encryption involved.
USB Stick: da0
HDD: ada0
Here is the steps I took (Boot from DVD (FreeBSD 10) and select shell, also /mnt is Read/Write):
Creating ZFS Pools:
Creating Data Set:
Install FreeBSD:
My /etc/rc.conf, /boot/loader.conf, and /etc/fstab
My problem is when I reboot, my system won't boot, it's looking for /boot/kernel/kernel. Does anyone knows what I did wrong on my ZFS setup?
Thanks
I'm experimenting with ZFS file system to learn more about it. I'm trying to boot my system from USB (having /boot partition in USB and rest in HDD). For simplicity no encryption involved.
USB Stick: da0
HDD: ada0
Here is the steps I took (Boot from DVD (FreeBSD 10) and select shell, also /mnt is Read/Write):
Code:
gpart create -s gpt da0
gpart create -s gpt ada0
gpart add -a 4k -s 512K -t freebsd-boot da0
gpart add -a 4k -t freebsd-zfs da0
gpart add -a 4k -s 2G -t freebsd-swap ada0
gpart add -a 4k -t freebsd-zfs ada0
gpart set -a bootme -i 2 da0
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
Creating ZFS Pools:
Code:
zpool create -o altroot=/mnt -o cachefile=/tmp/zpool.cache usbboot /dev/da0p2
zpool create -o altroot=/mnt -o cachefile=/tmp/zpool.cache hddroot /dev/ada0p2
zfs set mountpoint=none usbboot
zfs set mountpoint=none hddroot
zfs set checksum=fletcher4 usbboot
zfs set checksum=fletcher4 hddroot
Creating Data Set:
Code:
zfs create -o mountpoint=none hddroot/ROOT
zfs create -o mountpoint=/ hddroot/ROOT/default
zfs create -o mountpoint=/home hddroot/home
zfs create -o mountpoint=/usr hddroot/usr
zfs create -o mountpoint=/var hddroot/var
zfs create -o mountpoint=/tmp hddroot/tmp
chmod 1777 /mnt/tmp
zfs create -o mountpoint=/boot -o compression=off usbboot/boot
zpool set bootfs=hddroot/ROOT/default hddroot
Install FreeBSD:
Code:
cd /usr/freebsd-dist
for i in base kernel src ports; do
xz -d -c $i.txz | tar -C /mnt -xf -
done
chroot /mnt
touch /etc/rc.conf
touch /etc/fstab
touch /boot/loader.conf
exit
cp /tmp/zpool.cache /mnt/boot/zfs/
shutdown -r now
My /etc/rc.conf, /boot/loader.conf, and /etc/fstab
Code:
# /etc/rc.conf
zfs_enable="YES"
# /boot/loader.conf
zfs_load="YES"
# /etc/fstab
/dev/ada0p1 none swap sw 0 0
My problem is when I reboot, my system won't boot, it's looking for /boot/kernel/kernel. Does anyone knows what I did wrong on my ZFS setup?
Thanks