New to FreeBSD - Some questions
fred.morcos at gmail.com
Thu Jun 21 11:24:48 UTC 2012
On Wed, Jun 20, 2012 at 9:58 PM, Wojciech Puchar
<wojtek at wojtek.tensor.gdynia.pl> wrote:
>> I'm quite new to FreeBSD too (RHEL/Fedora background), and am most
>> impressed with it so far.
> rather huge difference.
>> Secondly (and probably stating the obvious), the handbook
>> is the place I always look first.
> and third - manuals. They are in sync with system and actually VERY useful.
> while i was still (long time ago) using linux most common manual was like
> "this manual is outdated. Use texinfo documentation". and texinfo docs was
> often outdated too.
> Today it is most probably "look at wikipedia" ;)
> Of course i means FreeBSD base system, ports are not part of FreeBSD and
> quality varies.
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
I will go with a single thread. I will also try to keep it as short as
possible. Please note that it is not my intention to start a flame-war
against anyone or any project. I am stating my experiences, the goals
I would like to achieve and some questions I have. Suggestions and
directions (to put me on track) are greatly welcome and
appreciated. Questions will be marked with a q) at the beginning of
Introduction and background
I have been using GNU/Linux for quite a while and I am most
comfortable with Archlinux. The reason I like it is it's simplicity
from the ground up without wasting too much time on unimportant
details (unless you want to). Another strong point is that it provides
binary packages by default, user-building of packages if you want to,
and the same level of customization you can achieve with - say -
Gentoo Linux. FreeBSD seems to provide that.
I learned over the years that (re-)compilation of packages is not
something I want to do regularly, but something I would like to do
only when I need and want to (ie, to strip out or add a certain
compile-time feature from/to a package). I also learned that the
performance gains of tuning compiler flags for a certain CPU are not
that drastic for a desktop/laptop/workstation machine workflow and
that this category of computing is mostly bound by IO speed
(especially with HDDs).
q) Is it possible to run a FreeBSD system without much building? In
other words, can I survive by depending on packages and only resorting
to ports when really needed?
What set me off, and got me tired of dealing with Linux-based systems
is a set of patterns that have been repeating over for some years
1. Too often, core system components break (especially with every
Linux kernel release).
1. Yesterday I spent 30 minutes until my webcam worked, dealing with
v4l, gstreamer and cheese.
2. The USB3 port in my laptop used to work as USB2 (never as USB3),
not anymore, it's now completely useless and doesn't react to
2. Sudden drastic changes that are deviating from simplicity.
1. The sudden flood of daemons that are designed to do everything
for me, without giving me much say in the matter. My computer is
supposed to help me, not decide for me or replace me.
2. Those daemons are hard to get rid of and are tightly integrated
into higher-level components in the stack (ie, into the desktop
3. Those daemons are increasingly hard and obscure to configure
(ie, huge XML files, complex hierarchies, etc).
3. Due to having to run and interact with each other all the time,
those daemons are sucking the life out of my laptop battery
(according to powertop).
4. Probably other frustrations that I have forgotten about.
5. I think many of the developers of those components are trying to
reach a Mac-like experience? I am not against that in any way, but
it needs to be working well.
Those are dbus, hal, udev, udisks, upower, pulseaudio, systemd,
consolekit and policykit.
I am aware that those solutions are there to solve complex problems
(thus their inherent complexity) and that many bright people with a
lot of experience have thought about them and worked on those
projects. My frustration is that those solutions are:
1. At the cost of making simple tasks more complex.
2. Replacing or conflicting with the previously existing solution.
3. Sometimes very unstable and unusable.
q) Where does the FreeBSD project stand on this matter? From what I
noticed is that the base system seems to adhere to the tranditional
flat text files for configuration and simple tools that do a good job,
leaving it up to the user to combine those small tools to create
larger, more complex ones (a UNIX inheritance).
q) Is a FreeBSD stable base system with "current" high-level
components possible? Will it avoid the issues I experienced on
I have two laptops (Asus N73JQ, Asus U36S) which I use as work
machines. Power efficiency is very important, efficient disk access
too. Suspend to ram and hiberation would be nice to have but are not
q) I would assume UFS with J+SU is "fast enough" for a laptop?
q) Does ZFS make sense on a laptop? Any advantages of using it over
USF with J+SU? I am not interested in any striping or mirroring on
the laptops, but the compression features is very attractive for the
HDDs in the first laptop.
q) The second laptop has an SSD, would UFS with/without J and
with/without SU or ZFS make more sense for it?
q) Can I live with a desktop environment (Gnome or KDE) and desktop
applications (Firefox, Libreoffice, etc) by relying only on packages?
q) Does ntfs-3g from ports work reliably with external HDDs or USB
flash drives with read and write support? I would like to hear
personal experiences with that.
q) Does the NVIDIA binary driver work reliably? I would like to hear
personal experiences with that.
I am also planning to setup a micro-server for home use (either a
ready-built one or by simply building a PC and using it as a server),
questions about that will come later. The main use of it would be
hosting my multimedia, streaming music and making backups of the
laptops on it (cron + rsync). Also, maybe some web/ftp and git
I installed the base system into Virtualbox and everything works quite
well. Everything is so... clean, and tidy, and consistent, and
simple. Very well thought out. I am also very impressed with the
amount of properly written man pages and with the handbook. I would
like to thank and congratulate all of the people who work on the
FreeBSD base system, a true masterpiece.
Setting up and installation
q) Does the bsdinstall align partitions to device blocks by default
for optimal speed? If not, I have found that I can use gpart with -a
and -b which will require me to calculate the start and end offsets of
each partition manually. Is there a tool that can automatically do
that for me?
q) Is it possible to get native resolution on the console? I played
with vesa and vidcontrol but could never get what I wanted. Native
resolution would require KMS?
q) Adding tmpmfs="YES" to /etc/rc.conf is analogous to a tmpfs /tmp on
Linux-based systems, correct? Any other directories that might make
sense to have as an mfs (ie, in /var)?
q) Is there a place where all sysctl variables are documented? It
occurred to me when I was trying to find the memory usage on my system
but `sysctl -a | grep mem' shows a whole bunch of stuff.
q) How can I set proxy settings system-wide? Same for PACKAGESITE (for
the pkg_* tools), how can I set a mirror system-wide? /etc/profile?
q) I noticed all file/data-sizes are in bytes (ls, dd, etc), is there
a way to change that system-wide to be in human-readable format?
To assess my understanding, the system is split into kernel, base,
documentation, games, lib32 (on 64-bit systems) and ports. There is
another split between base and ports where base includes everything
previously mentioned minus ports. Now, there are 3 "branches" of the
base system: RELEASE, STABLE and CURRENT. RELEASE means 9.0 and stays
that way until 10.0 is released. STABLE means 9.0, 9.1, 9.2,
etc. CURRENT means "trunk" in SVN terms. Is all that correct? Also,
when somewhere is mentioned `make world', this means to rebuild all
installed ports which doesn't include base, I assume?
q) The files in /etc/rc.d are all executable, from my understanding,
those files will get executed and it is their duty to check the
variable `<rc-script-name>_enable' for whether they should start or
not. Wouldn't it be more efficient to chmod -x or +x them to
q) What is analogous to /etc/rc.local from Linux-based systems?
q) Is there something analogous to the Linux magic sysrq key?
Ports and packages
I must say, the ports collection being built on makefiles was a
welcome enlightenment, it just, naturally, made sense. The *-recursive
make targets are a blessing, especially for configs.
q) Is there a tool that can test a set of mirrors for connection time
and speed (for packages and ports)? Analogous to Archlinux's
q) Is it possible for the pkg_* tools (especially pkg_add -r) to
q) I noticed in the ports collection that there were some outdated
packages (skype-2.2, gimp-2.6), should I report that and where? (A
q) Is it possible to have the ports system compile into an mfs (to
avoid disk access)?
q) Is it possible to have the user asked to change their password the
first time they log in (using an OTP) in a simple way? I looked at
OPIE but it seems to be much more complex than what I need.
GEOM and filesystems
>From what I could understand, the GEOM layer only supports read-only
compression. Which makes (to me) ZFS an attractive filesystem for slow
HDDs (on the first laptop).
Also, I would like to have a system where user home directories are
encrypted based-on and using the user's password. From what I could
find, gbde and geli don't really provide that without any
q) What should I be looking at to achieve the above?
q) When creating a ZFS pool, what happens if I do a `zpool create
mypool /dev/ada1 /dev/ada2'? Does it use the disks as a single
continous one? Does it mirror or stripe by default? Or does it simply
try to balance between performance and reliability? I could not find
anything about the default behavior in the zpool manpage.
q) Is it possible to have ZFS use 2 disks as a single continuous one,
while still keeping both of them operable individually? (ie, if I plug
in the second disk on another machine, I would get a valid ZFS pool +
filesystem on it).
q) I am currently considering 3 disks for a home micro-server, with
ZFS striping with the third disk being a parity disk. In case I decide
to buy a fourth disk in the future and add it to the pool, is ZFS
capable of re-structuring the data on-the-fly to have 2 sets of
striping (without parity, so 2 disks each) and on top of that a
mirror? Analogous to the following:
| Stripe2 mirrors Stripe1 |
| Stripe1 | Stripe2 |
| Disk1 | Disk2 | Disk3 | Disk4 |
q) Does it make sense to user a zpool directly without any ZFS
filesystems on it on a single-user system where there's no special
interest in ZFS's filesystem features (ie, compression)?
This section is a little bit off-topic and not really a
FreeBSD-related question. Sorry for that.
As previously mentioned, I am evaluating the possibility of a home
micro-server setup to host my files and other services. Here is a
rough list of tasks I would like to achieve with it:
1. Serving files over network (samba, nfs).
2. Media streaming (mpd + icecast or DAAP).
3. Rsync backup server for the 2 laptops.
4. SSH, sFTP access.
Some tentative features:
1. Mail, WWW.
2. Diaspora, ownCloud.
The sole reason I would like to use FreeBSD on this system is ZFS.
q) I would like to hear anyone's recommendation of a cheap, low-power
ready-made hardware for such a purpose which is supported by
FreeBSD. I poked around a little bit and the HP micro-servers seem to
be interesting, but unfortunately too powerful (and thus power-hungry)
for my purpose.
q) If there isn't much outcome from looking into ready-made
micro-servers, is anyone having a success story running their services
on a custom built desktop PC at home with FreeBSD and ZFS?
More information about the freebsd-questions