Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Aug 2009 17:43:48 +0300
From:      Artis Caune <artis.caune@gmail.com>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Howto setup multiboot with GPT?
Message-ID:  <9e20d71e0908170743v49cad8f6le715524ce93331b7@mail.gmail.com>
In-Reply-To: <147751250284069@webmail117.yandex.ru>
References:  <147751250284069@webmail117.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/8/15 Andrey V. Elsukov <bu7cher@yandex.ru>:
> Hi,
>
> I have installed 8.0-BETA2 amd64 on ZFS root with GPT. I made addition pa=
rtition and
> made new ZFS pool, builded and installed i386 world and kernel to this po=
ol.
> So, is there some way to select from which partition i want to boot?
>
> My configuration:
>> gpart show ad10
> =3D> =C2=A0 =C2=A0 =C2=A0 =C2=A034 =C2=A01250263661 =C2=A0ad10 =C2=A0GPT =
=C2=A0(596G)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A034 =C2=A0 =C2=A0 =C2=A0 =C2=A0 256 =C2=
=A0 =C2=A0 1 =C2=A0freebsd-boot =C2=A0(128K)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 290 =C2=A0 =C2=A0 8388608 =C2=A0 =C2=A0 2 =C2=
=A0freebsd-swap =C2=A0(4.0G)
> =C2=A0 =C2=A0 8388898 =C2=A0 209715200 =C2=A0 =C2=A0 3 =C2=A0freebsd-zfs =
=C2=A0(100G)
> =C2=A0 218104098 =C2=A0 209715200 =C2=A0 =C2=A0 4 =C2=A0freebsd-zfs =C2=
=A0(100G)
> =C2=A0 427819298 =C2=A0 822444397 =C2=A0 =C2=A0 =C2=A0 =C2=A0- free - =C2=
=A0(392G)
>
>> zpool list
> NAME =C2=A0 =C2=A0SIZE =C2=A0 USED =C2=A0AVAIL =C2=A0 =C2=A0CAP =C2=A0HEA=
LTH =C2=A0ALTROOT
> amd64 =C2=A099,5G =C2=A010,5G =C2=A089,0G =C2=A0 =C2=A010% =C2=A0ONLINE =
=C2=A0-
> x86 =C2=A0 =C2=A099,5G =C2=A0 346M =C2=A099,2G =C2=A0 =C2=A0 0% =C2=A0ONL=
INE =C2=A0/mnt
>
>> cat /boot/loader.conf
> zfs_load=3D"YES"
> vfs.root.mountfrom=3D"zfs:amd64"


You can try using one freebsd-zfs partition, one pool and just change
bootfs zpool property:

# zpool create rpool ad10p3
# zfs create rpool/ROOT/amd64
# zfs create rpool/ROOT/x86
# zpool set bootfs=3Drpool/amd64 rpool

echo 'vfs.root.mountfrom=3D"zfs:rpool/amd64"' >> /ROOT/amd64/boot/loader.co=
nf
echo 'vfs.root.mountfrom=3D"zfs:rpool/x86"' >> /ROOT/x86/boot/loader.conf


and then change bootfs on the fly:

amd64# zpool set bootfs=3Drpool/x86 rpool
amd64# reboot

x86# zpool set bootfs=3Drpool/amd64 rpool
x86# reboot





--=20
Artis Caune

    Everything should be made as simple as possible, but not simpler.



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