Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Oct 2016 05:48:41 +0200
From:      Rolf Nielsen <rnmtw70@yandex.com>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: BSD labels vs. root-on-ZFS
Message-ID:  <acede6ec-aa09-3e8c-cbe7-53af498bfe21@yandex.com>
In-Reply-To: <CAGBxaXmERV1kt7Dbxr1sbCEXASDqvC531=HTGuepvqY_MbZLtA@mail.gmail.com>
References:  <CAGBxaXmERV1kt7Dbxr1sbCEXASDqvC531=HTGuepvqY_MbZLtA@mail.gmail.com>

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


On 2016-10-20 05:17, Aryeh Friedman wrote:
> I have a SSD that doesn't work with any partioning scheme except BSD labels
> (fought with it over GPT [all variants] and MBR [BIOS]).   How do I install
> the OS with ZFS in this case?
> 

You can create a small a partition, e.g. ada0a, that contains only the
boot directory, then another partition, e.g. ada0e, that will be the ZFS
device. The a partition should be UFS (type 4.3BSD) and the other
partition should be set to type ZFS.

The boot directory on the a partition should have the same files as the
boot directory on / in a standard installation, and it is required to be
called boot, or the loader will not find the kernel and config files.
Also keep in mind, that whenever you update your system, the boot files
will be installed in /boot rather than in the boot directory of the
smaller partition, so you'll need to copy it to the smaller partition. I
have such a setup myself, and I handle this by having the boot directory
of the small partition an exact copy of /boot, and whenever I update, I
mount the small partition on /mnt, cd to / and issue the following command.

cp -fa boot /mnt

This has served me well for several years.

loader.conf(5) needs to be edited to include

vfs.root.mountfrom="zfs:sysroot"

Substitute the name of your pool for sysroot.

-- 
Vänligen / Sincerely,
Rolf Nielsen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?acede6ec-aa09-3e8c-cbe7-53af498bfe21>