HOWTO: Modern FreeBSD Install (vermaden way)
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. Here is the layout of the system with 1 harddisk: Code:
MBR SLICE 1 | / | 512 MB | UFS/read-only Code:
MBR SLICE 1 | / | 512 MB | UFS/read-only Code:
[ DISK0 ] [ DISK1 ] [ DISK2 ] 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 1.2. Create your temporary working environment 1.3. Load needed modules 1.4. Create/mount needed filesystems 1.5. Actually install needed FreeBSD sets 1.6. Provide basic configuration needed to boot new system 1.6.1. 1.6.1. 1.7. Unmount filesystems and reboot Now lets talk things you will need to do after reboot. 2.0. At boot loader select boot into single user mode 4. Boot FreeBSD in single user mode2.1. Login as root without password 2.2. Set root password 2.3. Set hostname 2.4. Set timezone and date/time 2.5. Tune the ZFS filesystem (only for i386) 2.6. Mount /tmp on SWAP 2.7. Move termcap into /etc (instead of useless link on crash) 2.8. Add latest security patches 2.9. Make all changes to configuration in /etc, then set / to be mounted read-only in /etc/fstab 2.10. Reboot and enjoy modern install of FreeBSD system To summarise, this setup provides us these things: -- bulletproof 'base system' [1] on UFS (w/o SU) mounted read-only CHANGELOG 1.0 / 2010-01-14 / initial version 1.1 / 2010-01-15 / simplified PATH +fixit# setenv PATH /mnt2/rescue:/mnt2/usr/bin1.2 / 2010-01-15 / added link for termcap (instead of duplicate on /etc and /usr) [2.6.] .# rm /etc/termcap1.3 / 2010-01-21 / removed unneeded mount commands [2.0.] -# zfs mount basefs/var1.4 / 2010-03-08 / added setup for 3 disks + cleanup too much to fit here, we can as well call this new version RELOADED ;)MIRROR THREAD: http://daemonforums.org/showthread.php?t=4200 MIRROR THREAD: http://forums.freebsd.org/showthread.php?t=10334 POLISH VERSION: http://bsdguru.org/dyskusja/viewtopic.php?t=19392 |
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.
|
@Jeebizz | @rndm_luser
Thanks, I have added a section on how to create redundant setup with 3 disks and improved/simplified overall process. |
Greetings:
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 Any help is appreciated. |
@blood_omen
Try /rescue/zpool import -f basefs instead of /rescue/zpool import -D then. 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. |
Hi,
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? Cheers, Tink |
@Tinkster
Hi and thanks. 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. Regards mate. |
Your call ... my concern was (is) that it will end up as a
catch-all thread for any random questions popping up. Cheers, Tink |
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 Code:
# zpool upgrade Code:
# zpool list -o version |
Great tutorial thanks, but......
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 |
Quote:
Code:
# zpool create basefs raidz ad0s3 ad1s3 ad2s3 |
Hello,
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 ? Roelof |
ada0 - disk
ada0s1 - 1st MBR partition (Windows) ada0s2 - 2nd MBR partition (FreeBSD) ada0s2a - 1st BSDLABEL partition of 2nd MBR partition I haven't setup FreeBSD boot alongside Windows 7, so You will have to google that out. Just make sure that both Windows and FreeBSD MBR partitions are PRIMARY partitions. |
Thanks
So ad0 for me is ad0s1 ?? And can I better follow this one or better the newer tutorial which can be found here : http://www.linuxquestions.org/questi...sd-4175412036/ Roelof |
@charlie_lab
I definitely prefer the new one (ZFS Madness) and that is what I use on my servers and laptop, mostly because of the ZFS Boot Environments which are now possible on FreeBSD with sysutils/beadm port. ad0 (generally adX drives) were used in the past if AHCI was not enabled. As AHCI support has been implemented in FreeBSD the drives are ada0 (or adaX generally) to distinguish them from adX drives without AHCI enabled. Probably the best part of AHCI is the NCQ, which can be described here: http://expertester.files.wordpress.c...x-ncq_svg1.png |
My GAWD! Once again I see why I have not EVER been successful in installing ANY flavor of BSD. (numerous attempts)
|
Quote:
If You want easy fast install, then use bsdinstall: https://youtube.com/watch?v=5FGmnBGgUvU ... or You can use PC-BSD DVD/USB to install PLAIN FreeBSD with their QT graphical installer: http://youtube.com/watch?v=AQ8WBEVRTYQ |
Quote:
LoL!!! |
Quote:
install http://www.ghostbsd.org/ or http://www.pcbsd.org/ |
...and...now...http://www.linuxquestions.org/questi...4/#post5237375
Quote:
|
I've installed Free/PC-BSD plenty of times without incident.
ZFS is complex but the installation for it is fairly straight forward, even on FreeBSD and PCBSD distributions, and works well. |
I can't see much point in file systems like hammer, zfs or btrfs on a desktop system. Certainly if you're just installing an operating system in order to run one of these file systems and have to ask questions on a forum to do it - you're probably installing that OS for all the wrong reasons.
|
HOWTO: Install FreeBSD (desktop version for newbies)
https://forums.freebsd.org/threads/59432/ My contribution to this obsolete post ! [01-21-10, 04:05 PM] :hattip: |
Install
Just tried a basic FreeBSD install, dd'd a image to a USB that booted OK and even enabled/used my wifi. Ran through the installation and background messages annoyingly kept popping up to overwrite the install text, that could totally throw a neub. More so if the wifi details you enter are incorrect, repeated attempts/failures and the install dialog screens are pretty much wiped out.
Installed to a partition, all seemed to have worked until I tried to boot that and after pointing the boot loader at that partition ... nothing. Need to boot0cfg ... but no indication of need to do that (and if it did more likely the user would wipe out their Windows or other Linux boot loaders). |
If FreeBSD is to be installed to a slice on a drive where other OS are already installed - you would configure that OS' boot loader to load FreeBSD.
|
All times are GMT -5. The time now is 11:33 PM. |