|
Guides All Guides and HOWTO's. |
|
Thread Tools | Display Modes |
|
||||
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 | SWAP | 2 GB | | /tmp | 512 MB | mounted on SWAP with mdmfs(8) ------------+------+--------------------------------------- MBR SLICE 2 | /usr | REST | ZFS dataset | /var | REST | ZFS dataset Code:
MBR SLICE 1 | / | 512 MB | UFS/read-only ------------+------+--------+------------------------------ MBR SLICE 2 | SWAP | 1 GB | | /tmp | 512 MB | mounted on SWAP with mdmfs(8) ------------+------+--------+------------------------------ MBR SLICE 3 | /usr | REST | ZFS dataset | /var | REST | ZFS dataset Code:
[ DISK0 ] [ DISK1 ] [ DISK2 ] [ / ] < RAID1 > [ / ] < RAID1 > [ / ] [ SWAP0 ] [ SWAP1 ] [ SWAP2 ] [ Z ] < RAID5 > [ F ] < RAID5 > [ S ] 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.4.1 Generate the newaliases(8) database 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 RELOADED1.5 / 2011-07-08 / added subsection: 2.4.1 Generate the newaliases(8) database MIRROR THREAD: http://forums.freebsd.org/showthread.php?t=10334 POLISH VERSION: http://bsdguru.org/dyskusja/viewtopic.php?t=19392
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd Last edited by vermaden; 8th July 2011 at 10:19 AM. |
Tags |
ahci, gjournal, install, lodaer.conf, rc.conf, setup, swap, sysinstall, termcap, tmp, tmpmfs, zfs |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HOWTO: Install and configure NVIDIA drivers on FreeBSD | tangram | Guides | 2 | 29th March 2009 08:23 PM |
HOWTO: Install and setup MLDonkey on FreeBSD | tangram | Guides | 0 | 7th January 2009 05:13 PM |
HOWTO: Always install an up-to-date port | chris | Guides | 8 | 28th May 2008 11:53 AM |