*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
All these years sysinstall(8) was helping us to install FreeBSD with most options we needed, today with new filesystems/features like GJournal/ZFS/Geli/GMirror/GStripe its no longer up to the task, because it only supports creating installation on UFS filesystem with SoftUpdates turned ON or OFF.
In this guide you will learn how to setup FreeBSD installation in simple yet flexible setup based on read-only UFS (without SoftUpdates) for 'base system' [1], some SWAP space, /tmp mounted on SWAP and all the other filesystems (/var /usr ...) mounted on ZFS. It will not require rebuilding anything, just simple setup on plain MBR partitions. I should also mention that we would be using AHCI mode for disks. I also provided two versions, for system with one harddisk and with three of them for redundant setup.
FreeBSD core, the 'base system' [1] should remain almost unchanged/untouched on daily basis while you can mess all other filesystems, this ensures that when things go wrong, you will be able to fix anything still having working 'base system' [1].
You will need *-dvd-* disk or *-memstick-* image for this installation, *-disk1-* will not do since it does not contain livefs system.
Here is the procedude, described as simple as possible.
1.0. I assume that our disk for the installation would be /dev/ad0 (/dev/ad0 /dev/ad1 /dev/ad2 for system with 3 disks)
1.1. Boot *-dvd-* from DVD disk or *-memstick-* image from pendrive
Code:
Country Selection --> United States
Fixit --> CDROM/DVD (*-dvd-*) or USB (*-memstick-*)
1.2. Create your temporary working environment
Code:
fixit# /mnt2/bin/csh
# setenv PATH /mnt2/rescue:/mnt2/usr/bin:/mnt2/sbin
# set filec
# set autolist
# set nobeep
2.10. Reboot and enjoy modern install of FreeBSD system
Code:
# shutdown -r now
To summarise, this setup provides us these things:
-- bulletproof 'base system' [1] on UFS (w/o SU) mounted read-only
-- /tmp filesystem mounted on SWAP
-- usage of new AHCI mode in FreeBSD
-- flexibility for all other filesystems on ZFS
-- fully working environment on crash (/etc/termcap)
-- disks/filesystems mounted by label, possible device name changes are harmless -- RAID1 for / and RAID5 for all other systems on setup with 3 disks
[1] base system is / and /usr while this setup, in context of this setup I name 'base system'
the most important core of FreeBSD, the / filesystem and its binaries/libraries/configuration
(thanks to phoenix for reminding me what REAL base system is/means)
This is actually really cool! Nice work and maybe this should be stickied. I also wondered how would you install FreeBSD with ZFS, when the standard installer only had the option for UFS/UFS+. Kinda disappointed that version 8 didn't even give you that option. Maybe in 8.1 this might be addressed, but if not your method can be used.
Thank you for sharing. I am relatively new to FreeBSD and didn't know about freebsd-update. It looks like it will be useful for patching production systems that you want to keep on a release candidate rather than going through the process of updating from CVS sources.
I'm following the instructions, but when I get to section 2.0 and issue /rescue/zpool import -D I get an error: no pools available to import.
I have to mention that for some reason FreeBSD recognizes my ONLY drive as ad4 instead ad ad0, I follow all the steps using ad4 and I get no errors except when issuing /rescue/zpool import -D
If Your chipset does not support AHCI, then You will have ad0/ad1/ad2/... disks, they do not always start from ad0 (STATIC NUMBERING is enabled by default on the kernel config), but that is not important since You will be using LABELS instead.
I've stickied your thread, really good work; I'd recommend a closure,
though, as it may quickly become very cluttered. What are your/others
thoughts on a closure?
I would not close it personally, there are always some questions and problems with such big/complicated howtos, as for the 'growing problem', I have also put that howto on other forums, some grew up to 4-5 pages, and sometimes even still grow (I even got late questions about this guide if it works on FreeBSD/SPARC, and the funny thing is it even works there), but I do not see that as a problem, 1st post will remain the howto with all the rest as discussion/comments. I also got several very helpful responds just after posting the howto, which showed several errors in the process, there still may be some smaller ones, as I cannot try every possible configuration out there.
So to make my idea short, IMHO we should not close it.
After FreeBSD 8.1-RELEASE has been released, we can now upgrade our ZPOOL(s) to newer (v13 --> v14) version, below You will find simple way to achieve that.
First check what is currently on You system:
Code:
# uname -m -r
8.1-RELEASE amd64
# zfs get version basefs
NAME PROPERTY VALUE SOURCE
basefs version 3 -
# zpool list -o version
VERSION
13
Now lets proceed with the zpool/zfs upgrade procedure:
Code:
# zpool upgrade
This system is currently running ZFS pool version 14.
The following pools are out of date, and can be upgraded. After being
upgraded, these pools will no longer be accessible by older software versions.
VER POOL
--- ------------
13 basefs
Use 'zpool upgrade -v' for a list of available versions and their associated
features.
# zpool upgrade basefs
This system is currently running ZFS pool version 14.
Successfully upgraded 'basefs' from version 13 to version 14
# zfs upgrade
This system is currently running ZFS filesystem version 3.
All filesystems are formatted with the current version.
After the upgrade we can check again our ZPOOL(s) version:
Code:
# zpool list -o version
VERSION
14
Your pool is now upgraded to newest 'release' zpool/zfs version.
why did u use raid 5 for the zfs partition instead of zraid? I think zraid is superior to even raid5. Just curious why you would setup zfs, and not use its best feature zraid! am i missing something. I am debating weather to use this tutorial, or the automagic mfsroot installer which broke for me after updates something about expecting version 14 got version 15
I might try just the update section of these posts maybe it will fix my mfsroot errors, however i have to agree with you about root being on raid 1, root on zfs (zraid) makes me kind of nervous what if something goes wrong? but then again software raid 1 can be a b!tch too when things go wrong
Maybe a stupid question but can this also be working on a disk where freebsd is on the second partition.
On the first 200G is Win7 installed and on the last 100G FreeBSD can be installed.
If so, what are the names of the disk then ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.