# HOWTO: Modern FreeBSD Install (vermaden way)



## vermaden (Jan 14, 2010)

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.

Here is the layout of the DISK:


```
+       /   512 MB --> UFS/read-only 
MBR SLICE 1  +  [SWAP]     2 GB
             +    /tmp     1 GB --> mounted on SWAP with[B] mdmfs(8)[/B]
-----------------------------------------------------------------
             +    /usr        - --> ZFS
MBR SLICE 2  +    /var        - --> ZFS
             +     ...        - --> ZFS
```

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*

*1.1. Boot *-dvd-* from DVD disk or *-memstick-* image from pendrive*

```
Country Selection --> United States
Fixit --> CDROM/DVD ([file]*-dvd-*[/file]) or USB ([file]*-memstick-*[/file])
```

*1.2. Create your temporary working environment*

```
fixit# [color="Blue"]/mnt2/bin/csh[/color]
fixit# [color="blue"]setenv PATH /mnt2/rescue:/mnt2/usr/bin[/color]
fixit# [color="blue"]set filec[/color]
fixit# [color="blue"]set autolist[/color]
fixit# [color="blue"]set nobeep[/color]
```

*1.3. Load needed modules*

```
fixit# [color="#0000ff"]kldload /mnt2/boot/kernel/geom_mbr.ko[/color]
fixit# [color="blue"]kldload /mnt2/boot/kernel/opensolaris.ko[/color]
fixit# [color="blue"]kldload /mnt2/boot/kernel/zfs.ko[/color]
```

*1.4. Create/mount needed filesystems*

```
fixit# [color="blue"]cat > part << __EOF__
p 1 165 63 2560M
p 2 165  *     *
p 3   0  0     0
p 4   0  0     0
a 1
__EOF__[/color]
fixit# [color="blue"]fdisk -f part ad0[/color]

fixit# [color="blue"]bsdlabel -B -w ad0s1[/color]
fixit# [color="blue"]cat > label << __EOF__
# /dev/ad0s1:
8 partitions:
  a: 512m  0 4.2BSD
  b: *     * swap
__EOF__[/color]
fixit# [color="blue"]bsdlabel ad0s1 | tail -1 >> label[/color]
fixit# [color="blue"]bsdlabel -R ad0s1 label[/color]

fixit# [color="Blue"]glabel label rootfs ad0s1a[/color]
fixit# [color="blue"]glabel label swap ad0s1b[/color]

fixit# [color="blue"]newfs /dev/label/rootfs[/color]
fixit# [color="blue"]zpool create basefs ad0s2[/color]
fixit# [color="blue"]zfs create basefs/usr[/color]
fixit# [color="blue"]zfs create basefs/var[/color]

fixit# [color="blue"]mkdir /NEWROOT[/color]
fixit# [color="blue"]mount /dev/label/rootfs /NEWROOT[/color]
fixit# [color="blue"]zfs set mountpoint=/NEWROOT/usr basefs/usr[/color]
fixit# [color="blue"]zfs set mountpoint=/NEWROOT/var basefs/var[/color]
```

*1.5. Actually install needed FreeBSD system sets*

```
fixit# [color="blue"]setenv DESTDIR /NEWROOT[/color]
fixit# [color="blue"]cd /dist/8.0-RELEASE[/color]

fixit# [color="blue"]cd base[/color]
fixit# [color="blue"]./install.sh [/color]# answer [I]'y'[/I] here
fixit# [color="blue"]cd ..[/color]

fixit# [color="blue"]cd manpages[/color]
fixit# [color="blue"]./install.sh[/color]
fixit# [color="blue"]cd ..[/color]

fixit# [color="Blue"]cd kernels[/color]
fixit# [color="blue"]./install.sh generic[/color]
fixit# [color="Blue"]cd ..[/color]

fixit# [color="Blue"]cd /NEWROOT/boot[/color]
fixit# [color="Blue"]rm -r kernel[/color]
fixit# [color="Blue"]mv GENERIC kernel[/color]
```

*1.6. Provide basic configuration needed to boot new system*

```
fixit# [color="Blue"]cat > /NEWROOT/etc/fstab << __EOF__
#dev                #mount   #fs   #opts   #dump   #pass
/dev/label/rootfs   /        ufs   rw      2       2
/dev/label/swap     none     swap  sw      0       0
basefs/var          /var     zfs   rw      0       0
basefs/usr          /usr     zfs   rw      0       0
__EOF__[/color]

fixit# [color="Blue"]cat > /NEWROOT/boot/loader.conf << __EOF__
zfs_load="YES"
ahci_load="YES"
__EOF__
[/color]
fixit# [color="Blue"]zfs set mountpoint=/usr basefs/usr[/color]
fixit# [color="Blue"]zfs set mountpoint=/var basefs/var[/color]
```

*1.7. Unmount filesystems and reboot*

```
fixit# [color="Blue"]umount /NEWROOT/var[/color]
fixit# [color="Blue"]umount /NEWROOT/usr[/color]
fixit# [color="Blue"]umount /NEWROOT[/color]
fixit# [color="Blue"]reboot[/color]
```

*Now lets talk things you will need to do after reboot.*

*2.0. If you will be dropped into 'single user mode'*
Use these commands to import and mount your basefs zpool:

```
newsystem# [color="Green"]zpool import -f basefs[/color]
```

*2.1. Set root password*

```
newsystem# [color="Green"]passwd[/color]
```

*2.2. Set hostname*

```
newsystem# [color="Green"]echo hostname=\"HOSTNAME\" >> /etc/rc.conf[/color]
```

*2.3. Set timezone and date*

```
menu# [color="Green"]tzsetup[/color]
manual# [color="Green"]cat /usr/share/zoneinfo/Europe/Warsaw > /etc/localtime[/color]
time# [color="Green"]date 201001142240[/color]
```

*2.4. Tune ZFS filesystem (only for i386)*

```
newsystem# [color="Green"]cat > /boot/loader.conf << __EOF__
vfs.zfs.prefetch_disable=0      # enable prefetch
vfs.zfs.arc_max=134217728       # 128 MB
vm.kmem_size=536870912          # 512 MB
vm.kmem_size_max=536870912      # 512 MB
vfs.zfs.vdev.cache.size=8388608 #   8 MB
__EOF__[/color]
```

*2.5. Mount /tmp on swap*

```
newsystem# [color="Green"]cat >> /etc/rc.conf << __EOF__
tmpmfs="YES"
tmpsize="1024m"
tmpmfs_flags="-m 0 -o async,noatime -S -p 1777"
__EOF__[/color]
```

*2.6. Move termcap into /etc (instead of useless link on crash)*

```
newsystem# [color="Green"]rm /etc/termcap[/color]
newsystem# [color="Green"]mv /usr/share/misc/termcap /etc[/color]
newsystem# [color="Green"]ln -s /etc/termcap /usr/share/misc/termcap[/color]
```

*2.7. Add latest security patches*

```
newsystem# [color="Green"]freebsd-update fetch[/color]
newsystem# [color="Green"]freebsd-update install[/color]
```

*2.8. Make all changes to configuration in /etc, then set / to be mounted read-only in /etc/fstab*

```
#dev                #mount   #fs   #opts   #dump   #pass
[color="Green"]+/dev/label/rootfs   /        ufs   ro      2       2[/color]
[color="Red"]-/dev/label/rootfs   /        ufs   rw      2       2[/color]
 /dev/label/swap     none     swap  sw      0       0
```

*2.9. Reboot and enjoy modern install of FreeBSD system*

```
newsystem# [color="Green"]shutdown -r now[/color]
```

*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

*[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) ​
*CHANGELOG*

*1.0* / 2010-01-14 / initial version
*1.1* / 2010-01-15 / simplified PATH
+fixit# setenv PATH /mnt2/rescue:/mnt2/usr/bin
-fixit# setenv PATH /mnt2/bin:/mnt2/sbin:/mnt2/usr/bin:/mnt2/usr/sbin​*1.2* / 2010-01-15 / added link for termcap (instead of duplicate on /etc and /usr) [2.6.]
.newsystem# rm /etc/termcap
+newsystem# mv /usr/share/misc/termcap /etc
+newsystem# ln -s /etc/termcap /usr/share/misc/termcap
-newsystem# cp /usr/share/misc/termcap /etc​*1.3* / 2010-01-21 / removed unneeded mount commands [2.0.]
-newsystem# zfs mount basefs/var
-newsystem# zfs mount basefs/usr​
MIRROR THREAD: http://daemonforums.org/showthread.php?t=4200
POLISH VERSION: http://bsdguru.org/dyskusja/viewtopic.php?t=19392


----------



## anomie (Jan 14, 2010)

Pretty good stuff, vermaden. Way to get down to brass tacks.


----------



## graudeejs (Jan 15, 2010)

Why /tmp on swap?
And on which arch did you do this on i386? [AMD64 don't need tuning AFAIK]


----------



## vermaden (Jan 15, 2010)

Thanks *anomie*.



			
				killasmurf86 said:
			
		

> Why /tmp on swap?


Its casual for any 'big iron unix' (AIX/Solaris/...) to mount /tmp on SWAP.

What is typical /tmp filesystem utilization, a lot of small files, often modified, its very similar to pagging space behaviour, so that is one of the reasons to mount /tmp on swap.

Also, /tmp is empty for most of the time, why waste space (for example 512m or 1g) and believe that some day some application will eventually use it, its waste.



			
				killasmurf86 said:
			
		

> And on which arch did you do this on i386? [AMD64 don't need tuning AFAIK]


The guide was done on i386, yes ZFS does not need tuning on amd64, I will add some notice to the guide, thanks.


----------



## graudeejs (Jan 15, 2010)

I was jsut wondering, since I use 100% zfs and only boot from ufs flash, I don't care if I have/don't have /tmp on separate FS 

P.S. I use /tmp quite a lot


----------



## vermaden (Jan 15, 2010)

killasmurf86 said:
			
		

> I was jsut wondering, since I use 100% zfs and only boot from ufs flash, I don't care if I have/don't have /tmp on separate FS


Using /tmp on ZFS solves wasted space problem, but that does not solves fragmentation problem (a lot of small files) 



			
				killasmurf86 said:
			
		

> P.S. I use /tmp quite a lot


Examples?


----------



## graudeejs (Jan 15, 2010)

vermaden said:
			
		

> Using /tmp on ZFS solves wasted space problem, but that does not solves fragmentation problem (a lot of small files)


I haven't noticed so much small files there.
Here's what i have right now:

```
$ find /tmp                                                       
/tmp
/tmp/.XIM-unix
/tmp/.font-unix
/tmp/ssh-x5yc3hPQKo
/tmp/ssh-x5yc3hPQKo/agent.1419
/tmp/.X11-unix
/tmp/.X11-unix/X0
/tmp/gpg-PT0KRV
/tmp/gpg-PT0KRV/S.gpg-agent
/tmp/.ICE-unix
/tmp/.X0-lock
```




			
				vermaden said:
			
		

> Examples?


Whenever I download something, that I won't save on my PC i stave it to /tmp. [on my desktop]
If I need to burn cd I download image to /tmp....


However I somewhat like the idea about /tmp on swap... will think about that and perhaps try it


----------



## graudeejs (Jan 15, 2010)

```
tmpmfs_flags="-m 0 -o async,noatime [red]-S[/red] -p 1777"
```
Why soft updates are turned off {*-S*}? They kinda speed up writing, also you can set *-O time*


----------



## vermaden (Jan 15, 2010)

killasmurf86 said:
			
		

> ```
> tmpmfs_flags="-m 0 -o async,noatime [red]-S[/red] -p 1777"
> ```
> Why soft updates are turned off {*-S*}? They kinda speed up writing, also you can set *-O time*


Havent done any benchmarks comparing to SoftUpdates, but its already mounted in asynchronous mode (mount -o async), -o time is default when there is a lot free space and it changes dynamically to -o space when there is less then 8% free space.


----------



## graudeejs (Jan 15, 2010)

Well, Soft Updates are on by default... so it's probably good.

I remember writing to flash with and without soft updates.....
Without soft updates it's so slow... uhhh


----------



## phoenix (Jan 15, 2010)

Haven't finished reading it yet, one quick clarification:  "base system" refers to everything under / and /usr (except /usr/ports and /usr/local), not just /.  Pedantic/semantics, maybe.  

(Where was this 18 months ago when I started with gmirror for / with ZFS?)


----------



## vermaden (Jan 16, 2010)

Thanks for reminding me, I kind of ?forgot? what the name *base system* covers.



			
				phoenix said:
			
		

> (Where was this 18 months ago when I started with gmirror for / with ZFS?) ]
> Heh, I had a little break from FreeBSD (playing with Linux/OpenSolaris), hardware problem was also involved, but I must say that after setting 8.0 exclusivelly on my box (and laptop earlier) I must say that I missed the robustness and reliability of FreeBSD, its sollutions, generally the 'FreeBSD way' that all of us know.
> 
> IMHO, by messing with Linux, trying newer releases of OpenSolaris alpha/beta builds I feel like I wasted that time/vegetate intead of focusing on to make the job done.


----------



## mfaridi (Jan 16, 2010)

I want check this  AMD64 which one I do not need it


----------



## vermaden (Jan 16, 2010)

@mfaridi

Say what?


----------



## caesius (Jan 16, 2010)

Cool guide. I think I'm gonna try it.

Just one issue (and this may be completely wrong..) but if the base system is read only, does this mean its not possible to cvsup and make {build,install}world anymore?

Cheers


----------



## graudeejs (Jan 16, 2010)

caesius said:
			
		

> Cool guide. I think I'm gonna try it.
> 
> Just one issue (and this may be completely wrong..) but if the base system is read only, does this mean its not possible to cvsup and make {build,install}world anymore?
> 
> Cheers



you can always `# mount -uo rw /`


----------



## mfaridi (Jan 17, 2010)

vermaden said:
			
		

> @mfaridi
> 
> Say what?



I say which part I do not need for amd64 ?


----------



## graudeejs (Jan 17, 2010)

mfaridi said:
			
		

> I say which part I do not need for amd64 ?



If I understand you correctly, you need to skip 2.4 step on amd64


----------



## vermaden (Jan 17, 2010)

@mfaridi

Only 2.4. section has info to omit it on amd64 ...
[CMD=""]2.4. Tune ZFS filesystem (only for i386)[/CMD]

@caesius

Thanks mate.



			
				caesius said:
			
		

> Just one issue (and this may be completely wrong..) but if the base system is read only, does this mean its not possible to cvsup and make {build,install}world anymore?



You will have to remount it as read-write mode like that: `# mount -u -w /` ... and then bring it back to read-only by `# mount -u -r /` ([CMD=""]-o rw[/CMD] | [CMD=""]-o ro[/CMD] does the same).

You may also read about some other issues on read-only / on FreeBSD here:
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2008-06/msg01029.html


----------



## mfaridi (Jan 17, 2010)

when I type this command 

```
fdisk -f part ad4
```
I see this error

```
fdisk: Geom not found : ad4
```


----------



## vermaden (Jan 17, 2010)

mfaridi said:
			
		

> ```
> fdisk: Geom not found : ad4
> ```



If you only remembered to `# kldload /mnt2/boot/kernel/geom_mbr.ko`, then this warning is harmless, and it works (check `# fdisk ad4` after that command).


----------



## mfaridi (Jan 17, 2010)

sometimes when I run 

```
fdisk -f part ad4
```
I see this error

```
file system is full , writing fail
```


----------



## mfaridi (Jan 18, 2010)

in section 1.5
when I go kernels
and type 

```
./install.sh generic
```
I see this error 
tr:not found
cat: .???: not such file or diretory


----------



## mfaridi (Jan 18, 2010)

after reboot and start new , when I run this command

```
zpool create basefs ad4s2
```
I see this error 

```
invalid vdev soecification
use -f to override the following error
/dev/ad4s2 is part of potentially active pool 'basefs'
```


----------



## mfaridi (Jan 18, 2010)

please someone help me
I can not continue cause of this error


----------



## graudeejs (Jan 18, 2010)

```
invalid vdev soecification
[red]use -f to override the following error[/red]
/dev/ad4s2 is part of potentially active pool 'basefs'
```

*-f*


----------



## mfaridi (Jan 18, 2010)

install.sh generic can not find generic
I have many generic in here


----------



## graudeejs (Jan 18, 2010)

uh, man then you are doing something only god knows what.....


start by checking your directory


----------



## mfaridi (Jan 18, 2010)

killasmurf86 said:
			
		

> uh, man then you are doing something only god knows what.....
> 
> 
> start by checking your directory


my problem is in section 1.5 , when I type ./install.sh generic , it can not find which generic must install 
when I go kernel directory and type
ls
I see many generic for example
generic.aa
generic.ab
.....

and I install.sh can not detect which one must install
I use amd54
I can not continue


----------



## graudeejs (Jan 18, 2010)

generic.aa
generic.ab
...

are one single kernel, splinted to many small archives


can you show *exact error*, that ./install.sh shows.... or at least screen shot or photo of screen?

It has to work, I've done this million times


----------



## mfaridi (Jan 18, 2010)

killasmurf86 said:
			
		

> generic.aa
> generic.ab
> ...
> 
> ...



when I type 
	
	



```
./install.sh generic
```
I see this line

```
tr:not found
cat: .??: No such file or directory
```


----------



## graudeejs (Jan 18, 2010)

OK, some weird problem....
*tr* is not found.

I don't know why it's not found because it should be available....
perhaps check your cd/dvd for errors and maybe download new cd/dvd.

or you can try

```
# cat generic.* | tar xf - -C [red]/boot/[/red]
```
replace [red]/boot/[/red] with directory where you need to install kernel


I don't know if this will work, but I don't see why you shouldn't try

Note: I improved, and haven't tested, but you can't damage anything anyway {normally}


----------



## vermaden (Jan 18, 2010)

mfaridi said:
			
		

> ```
> tr:not found
> cat: .???: not such file or diretory
> ```



This was missing in PATH, added: /mnt2/usr/bin


----------



## caesius (Jan 18, 2010)

vermaden said:
			
		

> @mfaridi
> 
> Only 2.4. section has info to omit it on amd64 ...
> [CMD=""]2.4. Tune ZFS filesystem (only for i386)[/CMD]
> ...



Ok, Think I'll give it a shot, just to be clear all I would have to do to update FreeBSD would be to update sources, buildkernel, buildworld, type the first command, installkernel, reboot, type it again, installworld, reboot, then I'm back to normal ro mode on rebooting. Is this correct?


----------



## mfaridi (Jan 19, 2010)

in section 1.7 when I type

```
umount /NEWROOT/var
```
I see error about /var is not root file system , so it can not unmount it 
I see this error about /usr 
when I want umount /NEWROOT , Isee error about /NEWROOT is busy


----------



## vermaden (Jan 19, 2010)

caesius said:
			
		

> Ok, Think I'll give it a shot, just to be clear all I would have to do to update FreeBSD would be to update sources, buildkernel, buildworld, type the first command, installkernel, reboot, type it again, installworld, reboot, then I'm back to normal ro mode on rebooting. Is this correct?



I would do that this way (binary way, far easier):
*2.7. Add latest security patches*

```
newsystem# freebsd-update fetch
newsystem# freebsd-update install
```

...but Yes, the procedure for source update does not change after installing FreeBSD my way.



			
				mfaridi said:
			
		

> ```
> umount /NEWROOT/var
> ```
> I see error about /var is not root file system , so it can not unmount it



Post exact error message.


----------



## mfaridi (Jan 19, 2010)

[
I think this error happen because in section 1.4 when I type 
	
	



```
zpool create basefs ad4s2
```
Is see this error

```
invalid vdev specification
use -f to override the following error :
/dev/ad4s2 is part of potentially active pool 'basefs'
```
so I use 
	
	



```
-f
```
option and go to next stage so I type

```
zpool create -f basefs ad4s2
```
when I type

```
umount /NEWROOT/var
```
I see this error

```
umount: /NEWROOT/var: not a file system root directory
```


----------



## vermaden (Jan 19, 2010)

mfaridi said:
			
		

> I think this error happen because in section 1.4 when I type
> 
> 
> 
> ...


You got this error message, because you already done `# zpool create` on that partition before, so it tells you that you can create it again (like going `# newfs` two times on the same device) or you may import it if its already there by `# zpool import -f basefs`.




			
				mfaridi said:
			
		

> ```
> umount /NEWROOT/var
> ```
> I see this error
> ...


Show me output of `# mount` command just before typing that command.


----------



## mfaridi (Jan 19, 2010)

vermaden said:
			
		

> You got this error message, because you already done `# zpool create` on that partition before, so it tells you that you can create it again (like going `# newfs` two times on the same device) or you may import it if its already there by `# zpool import -f basefs`.
> 
> 
> 
> Show me output of `# mount` command just before typing that command.



I see this when I type mount

```
/dev/md0 on / (ufs,  local)
devfs on /dev (devfs,  local,  multilabel)
/dev/acd0 on /dist (cd9660,  local,  readonly)
basefs on /basefs (zfs, local)
/dev/label/rootfs on /NEWROOT (ufs, local)
basefa/usr on /usr (zfs, local)
basefa/var on /var (zfs, local)
```


----------



## mfaridi (Jan 19, 2010)

please help
I stop in here and can not continue


----------



## graudeejs (Jan 19, 2010)

mfaridi, it seams you messed everything up, I suggest you help yourself and vermaden by doing this:


```
fixit# dd if=/dev/random of=/dev/da0 bs=8m
```
[red]this will erase everything on your hard disk (replace da0 with other disk you need to format)[/red], just remember not to erase disks, that has data, that you need 

and then start ALL OVER, and don't rush

P.S.
I know there are faster ways, but this guarantees, that there will be no problems


----------



## vermaden (Jan 19, 2010)

mfaridi said:
			
		

> I see this when I type mount
> 
> ```
> /dev/md0 on / (ufs,  local)
> ...


So tell me HOW you will be able to umount /NEWROOT/var if *its not mounted there?*

You have now both _basefs_ and _basefa_ (typo propably), a mess in setup, start all over again as *killasmurf86 *suggests.



			
				mfaridi said:
			
		

> please help
> I stop in here and can not continue


You know what FORUMS is mate?

A place where anyone responds WHEN HE/SHE HAS TIME FOR IT, not immediately as someone screams, _please faster I do not want to wait_, I am not nailed to the chair and this is not my job to respond here to people who does not even understand what they try to do.


----------



## Oxyd (Jan 19, 2010)

I would like to expand a little on the "tr: not found" error.  I got that too when I was hand installing FreeBSD 8.0-R AMD64.  In fact, the script kernels/install.sh contains this:
	
	



```
# translate per Makefile:doTARBALL XXX are we sure to have tr?
	tn=`echo ${CONFIG} | tr 'A-Z' 'a-z'`
	cat $tn.?? | tar --unlink -xpzf - -C $BOOT
```
Do note the first line that asks if we have tr.  It appears that someone missed something..  (And yes, that line is copied verbatim -- the ":doTARBALL" part looks like the file was misedited.

And no, we don't have tr:
	
	



```
[starlight] ~/mnt > find . -name tr -print
[starlight] ~/mnt >
```
Output is nothing.  (~/mnt is 8.0-RELEASE-amd64-disc1.iso mounted via loopback).

Anyway, I worked around the problem by simply executing `# cat generic.?? | tar --unlink --xpzf - -C /new-bsd/boot`, /new-bsd being the mountpoint of my new system's root, of course.  The installation was successful in the end, so it works.


----------



## graudeejs (Jan 19, 2010)

you send file pr


----------



## vermaden (Jan 19, 2010)

@Oxyd

I have been using i386 version, after selecting *Fixit --> CD/DVD* I was able to use tr(1) straight away:


```
fixit# /mnt2/usr/bin/tr
usage: tr [-Ccsu] string1 string2
       tr [-Ccu] -d string1
       tr [-Ccu] -s string1
       tr [-Ccu] -ds string1 string2
```

The tr(1) is the reason that I added also /mnt2/usr/bin to PATH (instead of only /mnt2/rescue):



			
				vermaden said:
			
		

> *1.1* / 2010-01-15 / simplified PATH
> +fixit# setenv PATH /mnt2/rescue:/mnt2/usr/bin
> -fixit# setenv PATH /mnt2/bin:/mnt2/sbin:/mnt2/usr/bin:/mnt2/usr/sbin​



I will verify that for amd64 in free time.


----------



## mfaridi (Jan 19, 2010)

vermaden said:
			
		

> So tell me HOW you will be able to umount /NEWROOT/var if *its not mounted there?*
> 
> You have now both _basefs_ and _basefa_ (typo propably), a mess in setup, start all over again as *killasmurf86 *suggests.
> 
> ...



I do dd but I have that problem again and can not umount /NEWROOT/var


----------



## vermaden (Jan 19, 2010)

vermaden said:
			
		

> I will verify that for amd64 in free time.



Yes, tr(1) is also available on amd64 *-dvd-*/*-memstick-* media in *Fixit* environment:

```
fixit# /mnt2/usr/bin/tr
usage: tr [-Ccsu] string1 string2
       tr [-Ccu] -d string1
       tr [-Ccu] -s string1
       tr [-Ccu] -ds string1 string2
```


----------



## vermaden (Jan 19, 2010)

mfaridi said:
			
		

> I do dd but I have that problem again and can not umount /NEWROOT/var



Are you deaf?



			
				vermaden said:
			
		

> So tell me HOW you will be able to umount /NEWROOT/var if *its not mounted there?*


----------



## mfaridi (Jan 19, 2010)

vermaden said:
			
		

> Are you deaf?



So where it mount ?
mount show me it mount in 
basefs/var


----------



## graudeejs (Jan 19, 2010)

mfaridi..... simply install FreeBSD the way you're used to. When you have more experience, then try this....


----------



## Aprogas (Jan 19, 2010)

Why did you go for MBR+label instead of GPT? Just curious.


----------



## vermaden (Jan 19, 2010)

@Aprogas

GPT partitions may be good if FreeBSD would be the only system on the box, but if you would like to multiboot, then you will not be able to do that with GPT partitions, since most OSes does not support GPTs:
http://en.wikipedia.org/wiki/GUID_Partition_Table#OS_support_of_GPT

Also, I do not see any disadvantage of (only) 4 MBR primary partitions while having most of the filesystems on ZFS on single partition ...


----------



## graudeejs (Jan 19, 2010)

I wouldn't use any partition scheme, I'd simply keep kernel on flash


----------



## vermaden (Jan 19, 2010)

@killasmurf86

What for?


----------



## graudeejs (Jan 19, 2010)

to be able to boot  everything on ZFS is the best experience.... and if something goes wrong, simply insert Fixit CD


----------



## caesius (Jan 20, 2010)

mfaridi said:
			
		

> in section 1.7 when I type
> 
> ```
> umount /NEWROOT/var
> ...



Just for the record, I'm getting the exact same error as this guy. Pretty sure I followed the guide command for command. I'll give it another go but the output of 
	
	



```
mount
```
shows that /NEWROOT/*** isn't mounted anywhere


----------



## mfaridi (Jan 20, 2010)

after I type 
	
	



```
mount
```
I understand var mount in 
	
	



```
/var
```
and usr mount in 
	
	



```
/usr
```
 so I run this command 

```
umount /var && unmount /usr && unmount /NEWROOT && reboot
```
after reboot system go to single user mode and I continue installation and right now I have FreeBSD with ZFS 
Thanks all guys , specially Vermaden , help me understand many thing about ZFS and FreeBSD,


----------



## graudeejs (Jan 20, 2010)

mfaridi, congratulations


----------



## mfaridi (Jan 20, 2010)

specially thanks killasmurf86 , you help me too


----------



## vermaden (Jan 20, 2010)

@mfaridi

At last, gratz 



			
				caesius said:
			
		

> (...) output of
> 
> 
> 
> ...



In some place in HOWTO, these commands takes care of it:


```
fixit# [color="#0000ff"]mkdir /NEWROOT[/color]
fixit# [color="#0000ff"]mount /dev/label/rootfs /NEWROOT[/color]
fixit# [color="#0000ff"]zfs set mountpoint=/NEWROOT/usr basefs/usr[/color]
fixit# [color="#0000ff"]zfs set mountpoint=/NEWROOT/var basefs/var[/color]
```

After them you have these mounts:

```
#point       #device
/NEWROOT     ad0s1a
/NEWROOT/var basefs/var
/NEWROOT/usr basefs/usr
```

Then you install data sets, and after several things added later you do these:


```
fixit# [color="#0000ff"]zfs set mountpoint=/usr basefs/usr[/color]
fixit# [color="#0000ff"]zfs set mountpoint=/var basefs/var[/color]
```

... and reboot.


----------



## mfaridi (Jan 20, 2010)

we use 512MB space for root and I think we can not make new kernel , if we want make new kernel , there is no space


----------



## graudeejs (Jan 20, 2010)

root itself [if configured properly] takes very little space.
I have been using 512MB on root for a long time, when I was using GPT, it's enough space to install new kernel 

current kernel takes less then 150MB


----------



## mfaridi (Jan 20, 2010)

killasmurf86 said:
			
		

> root itself [if configured properly] takes very little space.
> I have been using 512MB on root for a long time, when I was using GPT, it's enough space to install new kernel
> 
> current kernel takes less then 150MB



I have another system and use FreeBSD 7.2 and use it for long time and I compile kernel and config it for PF , but know I run 

```
df -h
```
I see this output

```
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/ad10s1a    484M    437M    8.7M    98%    /
devfs           1.0K    1.0K      0B   100%    /dev
/dev/ad10s1d    989M     14M    897M     1%    /tmp
/dev/ad10s1f    137G     95G     31G    75%    /usr
/dev/ad10s1e    1.9G    1.3G    458M    75%    /var
```
I  can not delete old kernel for sometimes I need it if something is happen , and I see sometimes error about root is full


----------



## DutchDaemon (Jan 20, 2010)

[cmd=]cd / && du -h -d 1[/cmd]

```
37M	./kernel
 37M	./kernel.old
```

There is really no need for kernel directories to be bigger. Don't you have a lot of kernel.old directories lying around, all with huge debugging symbol files in there too?


----------



## graudeejs (Jan 21, 2010)

DutchDaemon said:
			
		

> [cmd=]cd / && du -h -d 1[/cmd]
> 
> ```
> 37M	./kernel
> ...



Is that kernel for server?
I bet you have tuned make.conf not to build many kernel modules. Am I right? Build only stuff that you really need


----------



## vermaden (Jan 21, 2010)

killasmurf86 said:
			
		

> Is that kernel for server?
> I bet you have tuned make.conf not to build many kernel modules. Am I right? Build only stuff that you really need



Stock 8.0-RELEASE i386 GENERIC kernel here:

```
bsd# [color="Blue"]ls /boot/kernel | wc -l[/color]
     610
bsd# [color="Blue"]du -sh /boot/kernel[/color]
 41M    kernel
```

You just need to remove the debuging symbols to save about 80-90MB:
`# rm /boot/kernel/*.symbols`


----------



## oliverh (Jan 21, 2010)

>Build only stuff that you really need

That's the Linux credo, but most practice usable with Linux isn't compatible with *BSD. People tend to tune every bit in an OS just to gain some 1-2% of performance/resources, but in the end most of them gain nothing at all or maybe some incompatibilities which they don't see at the beginning.

Many servers I know of, are using stock releases. Maybe tuned to avoid some incompatibility with a certain type of hardware. But there are no CPUTYPES in make.conf, no nonsense of 'KERNCONF on diet' etc. pp. If you _have to_ tune something, then see it as exception not permanent condition. Well, the opposite is Linux - you _have to_ tune it, to gain at least something barely usable (using some ready-to-go distro, is indeed a massive tuning approach).

That said, nice to see such a good tutorial. Thx Vermaden


----------



## mfaridi (Jan 21, 2010)

vermaden said:
			
		

> Stock 8.0-RELEASE i386 GENERIC kernel here:
> 
> ```
> bsd# [color="Blue"]ls /boot/kernel | wc -l[/color]
> ...



I run this 
	
	



```
rm /boot/kernel/*.symbols
```
but when I run df -h I see this

```
/dev/ad10s1a    484M    268M    177M    60%    /
devfs           1.0K    1.0K      0B   100%    /dev
/dev/ad10s1d    989M     14M    897M     1%    /tmp
/dev/ad10s1f    137G     98G     28G    78%    /usr
/dev/ad10s1e    1.9G    1.3G    462M    75%    /var
```
root use 268M


----------



## DutchDaemon (Jan 21, 2010)

killasmurf86 said:
			
		

> Is that kernel for server?
> I bet you have tuned make.conf not to build many kernel modules. Am I right? Build only stuff that you really need



I'm building everything as far as modules goes. I have a stripped kernel. This was actually on my laptop. On one of my servers it's 35M - the kernel being 5.4M, the rest of the space taken by 612 modules. Like I said: it doesn't need to be much more than 35-40M at any time


----------



## vermaden (Jan 21, 2010)

oliverh said:
			
		

> That said, nice to see such a good tutorial. Thx Vermaden



Thanks mate 

One of the reasons to create own KERNCONF can be power saving (on laptops mostly). Move all hardware you would like to disable temporary to save power (with [cmd=]hw.pci.do_power_nodriver=3[/Cmd] in /boot/loader.conf). This way devices without attached driver would not consume power.



			
				mfaridi said:
			
		

> root use 268M




```
bsd# [color="Blue"]du -m -x -d 1 / | sort -n[/color]
0       /proc
1       /.snap
1       /dev
1       /libexec
1       /mnt
1       /root
1       /tmp
1       /usr
1       /var
2       /bin
2       /etc
5       /rescue
6       /sbin
7       /lib
44      /boot
64      /

bsd# [color="Blue"]du -sh /boot[/color]
 44M    /boot

bsd# [color="Blue"]df -h /[/color]
Filesystem           Size    Used   Avail Capacity  Mounted on
/dev/label/rootfs    496M     63M    393M    14%    /
```

The / filesystem does not only contain  kernel ...

Check [Cmd=]du -m -x -d 1 / | sort -n[/Cmd] command on your box.


----------



## mfaridi (Jan 21, 2010)

vermaden said:
			
		

> Thanks mate
> 
> One of the reasons to create own KERNCONF can be power saving (on laptops mostly). Move all hardware you would like to disable temporary to save power (with [cmd=]hw.pci.do_power_nodriver=3[/Cmd] in /boot/loader.conf). This way devices without attached driver would not consume power.
> 
> ...



I run this command

```
du -m -x -d 1 / | sort -n
```
and output

```
/ # du -m -x -d 1 / | sort -n
1	/.snap
1	/cdrom
1	/dev
1	/dist
1	/libexec
1	/media
1	/mnt
1	/proc
1	/tmp
1	/usr
1	/var
2	/bin
2	/etc
5	/rescue
5	/sbin
6	/root
7	/lib
245	/boot
269	/
```
and run this command 

```
du -sh /boot
```
and output

```
245M	/boot
```


----------



## DutchDaemon (Jan 21, 2010)

Run the same command from within /boot and see what's eating up this space.
`# du -m -x -d 1 /boot | sort -n`


----------



## graudeejs (Jan 21, 2010)

Probably /boot/kernel.old  or /boot/GENERIC


----------



## mfaridi (Jan 21, 2010)

DutchDaemon said:
			
		

> Run the same command from within /boot and see what's eating up this space.
> `# du -m -x -d 1 /boot | sort -n`



I run this command

```
du -m -x -d 1 /boot | sort -n
```
and output

```
/ # du -m -x -d 1 /boot | sort -n
1	/boot/defaults
1	/boot/firmware
1	/boot/modules
1	/boot/zfs
38	/boot/kernel
207	/boot/kernel.old
245	/boot
/
```
Is this safe I delete old kernel . I think for recovery I need it


----------



## vermaden (Jan 21, 2010)

mfaridi said:
			
		

> and run this command
> 
> ```
> du -sh /boot
> ...



... and you do not know what to do next?

Why I have this strange constant feeling that you do not know  anything about UNIX ...

Show output of that command: `# du -m -x -d 1 /boot | sort -n`


----------



## mfaridi (Jan 21, 2010)

vermaden said:
			
		

> ... and you do not know what to do next?
> 
> Why I have this strange constant feeling that you do not know  anything about UNIX ...
> 
> Show output of that command: `# du -m -x -d 1 /boot | sort -n`




```
/ # du -m -x -d 1 /boot | sort -n
1	/boot/defaults
1	/boot/firmware
1	/boot/modules
1	/boot/zfs
38	/boot/kernel
207	/boot/kernel.old
245	/boot
/
```


----------



## DutchDaemon (Jan 21, 2010)

If your current kernel is functioning properly, just delete /boot/kernel.old. The moment you build a new kernel, /boot/kernel will be saved to /boot/kernel.old, and the current /boot/kernel.old will be deleted anyway.


----------



## oliverh (Jan 22, 2010)

vermaden said:
			
		

> Thanks mate
> 
> One of the reasons to create own KERNCONF can be power saving (on laptops mostly). Move all hardware you would like to disable temporary to save power (with [cmd=]hw.pci.do_power_nodriver=3[/Cmd] in /boot/loader.conf). This way devices without attached driver would not consume power.
> 
> ...



Sure, but I'm refering to servers in my saying. Regarding power consumption, there is a nice tutorial in the FreeBSD wiki: http://wiki.freebsd.org/TuningPowerConsumption


----------



## vermaden (Jan 22, 2010)

oliverh said:
			
		

> Regarding power consumption, there is a nice tutorial in the FreeBSD wiki: http://wiki.freebsd.org/TuningPowerConsumption



I see that they moved it to FreeBSD wiki (from lists), but thanks:
http://lists.freebsd.org/pipermail/freebsd-current/2009-May/006436.html

Its also not very detailed if it comes to CPU power consumption:
http://daemonforums.org/showthread.php?t=2382


----------



## oliverh (Jan 23, 2010)

Yes, but the more hints the more solutions for certain contexts ;-)


----------



## vermaden (Mar 8, 2010)

I have added a section on how to create redundant setup with *3 disks* and improved/simplified overall process.

There is 10 000 charecter limit on one post, so I must create new thread:
http://forums.freebsd.org/showthread.php?t=12082


----------



## carpenike (May 25, 2010)

Vermaden - Thanks for the great guide. I'm a new BSD user, been using Gentoo/Funtoo/Linux for years but decided to give FreeBSD a shot on a new system that I'm putting together to be my file server.

Couple things I had to add...

geom_mbr.ko to loader.conf:


```
cat /boot/loader.conf
zfs_load="YES"
ahci_load="YES"
geom_mirror_load="YES"
geom_mbr_load="YES"
```

And my /boot is also above 240MB it appears...


```
[root@fs ~]# du -m -x -d 1 / |sort -n
1       /.snap
1       /dev
1       /libexec
1       /media
1       /mnt
1       /proc
1       /root
1       /scratch
1       /tmp
1       /usr
1       /var
2       /bin
2       /etc
5       /rescue
5       /sbin
8       /lib
242     /boot
262     /
[root@fs ~]# du -m -x -d 1 /boot |sort -n
1       /boot/defaults
1       /boot/firmware
1       /boot/modules
1       /boot/zfs
241     /boot/kernel
242     /boot
```

I haven't rebuilt world / kernel yet though... Should that shrink it? Just did this install a few days ago.

I'll probably re-work the build to use two CF cards for the basefs and then put all the other file systems on my 4 disk raidz that'll be used for storage... Then I can get rid of the two boot drives that I currently have mirrored.

Is there any reason to use a particularly fast flash drive for the root file system? If I'm understanding things correctly, rarely will anything be written to / unless you're updating the system and therefore reads are more important. If most of your reading is being done from the HDD backed zpool, then is there any advantage to spending $30 more on a 300x/400x CF over say a $15 4G Kingston (http://www.newegg.com/Product/Product.aspx?Item=N82E16820134575)? Going to throw them into these Syba SATA -> CF adapters (http://www.newegg.com/Product/Product.aspx?Item=N82E16812186061) and call it a day.

This is unrelated and I may end up opening another thread for it, so feel free to push me to open a new thread to keep this on topic. I can't seem to get AHCI to work on my rig (Gigabyte GA-K8U-735 Mobo / Sempron 1800+ proc / Supermicro AOC-SAT2-MV8 HBA) and I believe that's why the kernel will panic if I pull out one of the two system drives. I've actually had my ZFS pool corrupt itself as a result and upon reboot immediately panic the system when it attempts to mount the ZFS drive. Additionally, I can't seem to add a new eSATA disk once the system has booted to one of the open AOC-SAT2-MV8 ports via an internal SATA -> eSATA cable converter. Am I correct in assuming that AHCI is controlled at the controller level? So the built in Northbridge on the motherboard would need AHCI support for that to work? Likewise, the AOC-SAT2-MV8 would need to support AHCI?

Thanks again for your great guide!


----------



## vermaden (May 25, 2010)

carpenike said:
			
		

> Vermaden - Thanks for the great guide. I'm a new BSD user, been using Gentoo/Funtoo/Linux for years but decided to give FreeBSD a shot on a new system that I'm putting together to be my file server.



Thanks mate, I have came the same road as You, from Gentoo to FreeBSD not so long time ago 



			
				carpenike said:
			
		

> geom_mbr.ko to loader.conf:
> 
> 
> ```
> ...


... for logical/extended partitions?



			
				carpenike said:
			
		

> And my /boot is also above 240MB it appears...
> 
> 
> ```
> ...


The AHCI is experimental (not enabled by default) feature of FreeBSD 8.0-RELEASE, but it will be enabled by default in 8.1 (will be released in July), so as of 8.0, many aspects of AHCI does not work properly, better try 8-STABLE snapshot [1] with has all new AHCI bits added.

[1] ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/201005/


----------



## carpenike (May 25, 2010)

Hi Vermaden,

I used the same partition steps that you listed in your guide, only I added an extra partition to one of my disks as it's larger than the other one. Used the extra space in a scratch zpool.

Thanks for the symbol tip; removing that reduced boot to a more reasonable level:


```
[root@fs /usr/src]# du -m -x -d 1 /boot |sort -n
1       /boot/defaults
1       /boot/firmware
1       /boot/modules
1       /boot/zfs
47      /boot/kernel
48      /boot
```

In regards to the CF card; will the speed differences in 133x vs 300x/400x be noticeable / worth the extra $ for a boot mirror?

I'm currently using 8-Stable which will change to 8.1-Prerelease once my buildworld finishes:


```
[root@fs /usr/src]# uname -a
FreeBSD fs.holthome.local 8.0-STABLE-201004 FreeBSD 8.0-STABLE-201004 #0: Mon Apr  5 15:59:06 UTC 2010     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
```

Additionally, none of my drives show up as /dev/ada*, only /dev/ad*, which I believe implies that AHCI is not being used. Dmesg |grep -i ahci finds nothing either...

Thanks again!


----------



## vermaden (May 26, 2010)

carpenike said:
			
		

> In regards to the CF card; will the speed differences in 133x vs 300x/400x be noticeable / worth the extra $ for a boot mirror?



I would say get the _'jack of all trades'_, the card that is reasonably cheap and fast at the same time, I remember when I looked for such card, 133x/166x were rather rationally priced while anything faster was well over the reasonable price levels.

Also, You need about 512MB for / alone and about 4GB card for / and /usr (to have whole FreeBSD base system on CF RAID1 setup), so limiting yourself to 4GB or less will definitely lower the price.

But in the end, You will mostly benefit from CF speed only at boot, and 133x is more then enough for that, IMHO its just not worth the extra money.



			
				carpenike said:
			
		

> I'm currently using 8-Stable which will change to 8.1-Prerelease once my buildworld finishes:
> 
> 
> ```
> ...



You have ahci_load="YES" on /boot/loader.conf to enable AHCI module loading enabled at boot? It the answer is yes here, and You still do not have AHCI mode enabled (and that seems to be the case) then submit a bug [1] and start a discussion on FreeBSD mailing lists [2] and cooperate with developers to fix it, they will send you some patches to test if it may work, if it will these changes will be added to the FreeBSD source and You will propably see them later in 8.1-RELEASE. Remember to also add BUG link to the started discussion.

[1] http://freebsd.org/send-pr.html
[2] http://lists.freebsd.org


----------



## carpenike (May 26, 2010)

OK. I've got the kernel module loaded:


```
[root@fs /usr/src]# kldstat
Id Refs Address            Size     Name
 1   21 0xffffffff80100000 d55d60   kernel
 2    1 0xffffffff80e56000 190260   zfs.ko
 3    2 0xffffffff80fe7000 3860     opensolaris.ko
 4    1 0xffffffff80feb000 21100    geom_mirror.ko
 5    1 0xffffffff8100d000 f590     ahci.ko
 6    1 0xffffffff8101d000 3868     geom_mbr.ko
 7    1 0xffffffff81222000 a49      snp.ko
```

Should I see any indication of AHCI being loaded in dmesg even if the card is not supported by AHCI?

Thanks,
Ryan


----------



## vermaden (May 26, 2010)

@carpenike

I have as much as that:

```
% kldstat | grep ahci
 9    1 0xffffffff81083000 b0c0     ahci.ko

% dmesg | grep ahci  
ahci0: <AHCI controller> port 0xd880-0xd887,0xd800-0xd803,0xd480-0xd487,0xd400-0xd403,0xd080-0xd09f mem 0xfeb79800-0xfeb79fff irq 19 at device 31.2 on pci0
ahci0: [ITHREAD]
ahci0: AHCI v1.20 with 6 3Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: [ITHREAD]
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich1: [ITHREAD]
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich2: [ITHREAD]
ahcich3: <AHCI channel> at channel 3 on ahci0
ahcich3: [ITHREAD]
ahcich4: <AHCI channel> at channel 4 on ahci0
ahcich4: [ITHREAD]
ahcich5: <AHCI channel> at channel 5 on ahci0
ahcich5: [ITHREAD]
ada0 at ahcich0 bus 0 target 0 lun 0
ada1 at ahcich1 bus 0 target 0 lun 0
ada2 at ahcich2 bus 0 target 0 lun 0
cd0 at ahcich4 bus 0 target 0 lun 0
```


----------



## carpenike (May 26, 2010)

Vermaden,

Yeah I don't get any of that, looks like it's not picking up any compatible AHCI controllers, as I don't even get that initial line that you have which describes the controller itself prior to any channels / disks.


```
[root@fs ~]# dmesg |grep ahci
[root@fs ~]#
```


----------



## vermaden (May 26, 2010)

carpenike said:
			
		

> Vermaden,
> 
> Yeah I don't get any of that, looks like it's not picking up any compatible AHCI controllers, as I don't even get that initial line that you have which describes the controller itself prior to any channels / disks.
> 
> ...



You should definitely start http://lists.freebsd.org discussion about that controller, especially while there are Linux drivers available (hope the source is also available), also provide pciconf -lb and pciconf -lv output to them in the discussion.


----------



## carpenike (May 26, 2010)

Started a bug report. Was told to use the mvs driver instead of ahci as it's designed for the Supermicro card.

Here's the bug report thread: http://www.freebsd.org/cgi/query-pr.cgi?pr=147086


----------



## vermaden (May 26, 2010)

@carpenike

Good, I see that we can describe your case as 'solved' since that 8-port card is not AHCI capable and You have mvs(8) at the same time?


----------



## carpenike (May 27, 2010)

We shall see! Recompiling my kernel now and will see what happens.

Thanks again for all your help.


----------



## biniar (Feb 8, 2011)

killasmurf86 said:
			
		

> ```
> Invalid vdev specification
> [red]use '-f' to override the following error[/red]
> /dev/ad4s2 is part of potentially active pool 'basefs'
> ...



I encountered this error as well, so for future reference to others and myself 


```
# zpool create [b]-f[/b] basefs ad4s2
```

I also was wondering if the spacing matters for writing config files or what's the pattern?

One space, tab etc ?


----------

