Hello!
My problem seems to be that I've configured my root ZFS to contain both, MBR-based partitions and GPT-based partitions, but the system won't boot because of multiple schemes.
After trying out various approaches, I'm getting confident that root ZFS cannot be booted like this. Could someone prove me wrong, please?
What I've tried so far is:
The problem appeared like this:
I omitted a lot of details, but I will provide if anyone is willing and able to help me boot my mixed scheme. My personal best bet is GRUB 2, so for starters, below is the boot script I tried:
GRUB 2: grub.cfg:
Thanks!
My problem seems to be that I've configured my root ZFS to contain both, MBR-based partitions and GPT-based partitions, but the system won't boot because of multiple schemes.
After trying out various approaches, I'm getting confident that root ZFS cannot be booted like this. Could someone prove me wrong, please?
What I've tried so far is:
- repeat the scenario under VirtualBox: doing similar (but not exactly the same...) things as on my real box, I get into a similar (again, not exactly the same...) boot problem.
- boot the FreeBSD kernel directly using GRUB 2: kernel stops to ask for a root location, because it couldn't find the one specified (not found, error 2)
- import the root pool when running from a FreeBSD live CD: importing didn't indicate any integrity problems, so the data should be fine. (Though, I didn't scrub it, because of another, unidentified problem: the scrubbing crawls only at 500kB/sec!)
- booting from either of the previosly working, 250GB GPT disks (see below) produces identical problem report.
The problem appeared like this:
- I had a perfectly working FreeBSD 9 set up using two-disk ZFS mirror setup, using 250GB GPT-partitioned disks.
- I had three more disks, two 320GB ones, containing old stuff I wanted to keep. The larger disk was a brand new 750GB disk.
- My plan was add these disks to the root pool, mirroring the 750GB one with the 320GB ones, leaving the remainder of the big disk for other use.
- I thought I'd like to be able to run Windows XP on the same machine, so I decided to use MBR scheme to partition the 750GB disk for compatibility reasons.
- Setting this up worked well by looking up tips from the net as problems arose. Finally I had roughly 800GB+ of partially mirrored and filled space available. I copied the stuff over from the 320GB disks, but didn't re-format them. So the vdevs on the 750GB disk didn't have mirrors yet.
- Ok, everything looking great so far. So I shut down the box at some point and then later started it again, but: Boom. Stops on error talking about a missing dataset.
I omitted a lot of details, but I will provide if anyone is willing and able to help me boot my mixed scheme. My personal best bet is GRUB 2, so for starters, below is the boot script I tried:
GRUB 2: grub.cfg:
Code:
menuentry "FreeBSD 9" {
insmod echo
echo "loading grub modules"
insmod bsd
insmod part_bsd
insmod part_gpt
insmod part_msdos
insmod zfs
insmod zfsinfo
echo "searching zroot..."
search -s -l zroot
echo "loading freebsd kernel"
kfreebsd /@/boot/kernel/kernel
echo "loading device hints"
kfreebsd_loadenv /@/boot/device.hints
echo "loading zpool cache"
kfreebsd_module /@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
echo "loading kernel modules"
kfreebsd_module_elf /@/boot/kernel/opensolaris.ko
kfreebsd_module_elf /@/boot/kernel/zfs.ko
kfreebsd_module_elf /@/boot/kernel/coretemp.ko
kfreebsd_module_elf /@/boot/kernel/geom_bsd.ko
kfreebsd_module_elf /@/boot/kernel/geom_mbr.ko
echo "setting kernel variables"
set kFreeBSD.vfs.root.mountfrom=zfs:zroot
set kFreeBSD.maxvnodes=250000
echo "grub done, booting OS..."
}
Thanks!