MikeL's FreeBSD new install release 10 HowTo\
This is not a full on tutorial on installing FreeBSD release-10, it's
just notes I made as I went through it.
This is a quick note of my first attempts which all
went bad because of a single stupid mistake on my part.
The problem was that I had provided the wrong IP address for "default
router". This IP address was in use by a FreeBSD firewall box to my
internal network. Once the new OS was installed, I was able to do a
'traceroute' to ftp.freebsd.org, but doing things like a package
install or a ports install would fail. Paying careful attention to
the output I found buried in the listing "no route to host". Most any
install I tried would barf with a missing "pkg-1.2.4". When I googled
this I found someone else who had this problem, but there was no reply
indicating if/how they fixed it.
Ok, here's a real install:
- On a windows box - http://www.freebsd.org/, download
- http://www.sourceforge.net/, search for win32diskimager and download.
Install and run against .img file.
- Reboot server, plug in memory key while shut down. Hit F2 (on
Dell computers) to go into BIOS settings, set "boot usb" as first.
(Note that in my Dell 2950 this option is only present if there is a
memory stick in already in a USB slot.) Let it go on to boot.
- Gosub Dell Perc
hit ctrl-R at boot
Maybe I'll get back to this later...
- Warning! This is the new 'bsdinstall'. You must
use arrow keys to move between fields -- 'tab' key takes you out to
next menu (see below). The old 'sysinstall' used 'tab' key to
move around - if you do that, you'll exit this menu unfinished.
- Disk config - Use "guided/auto".
In disk screen you'll have a config shown. In my case, I have 8GB RAM,
at boot time there was a message flew by that said "ignoring 4GB above
4GB" (we'll fix this later, see below). My rule-of-thumb is that your
swap partition should be the same size as your memory.
Arrow to the freebsd-ufs partition (in my case mfid0p2), note the
size, and hit D to delete it.
Arrow up to the main entry (in my case mfid0), and hit C to create
new. Use tab and arrows to recreate it, with the appropriate smaller
size (in my case 4gb less).
Arrow down to swap partition (mfid0p3), delete, arrow to mifd0,
create, and it should automatically use the rest of the disk, giving
you the desired (in my case 8gb).
- You do want to install all src (needed to build custom kernel, more
later) and ports (useful tools).
- If given opportunity to add users, add yourself. Be sure to use
same userid as you've used on other systems, this will make your life
easier in the future.
- Give it network info - full hostname including domain. For the
"search" field, use the domain name.
- When asked if you want to do any last minute manual changes, say
- vi hints
Use arrow keys to move around, 'x' deletes a char, 'i' starts insert,
'esc' to leave insert, 'o' to open a new line below cursor, 'a' to
append (insert) chars after cursor, 'r' replaces one char, 'R' replace
Lastly, ':wq' to save and quit. ':!q' to quit and not save. Other
than this, you're on your own.
- I know it's a pain to do anything in 'vi', but this is really
important to do this THE FIRST TIME you boot; set sytem time on
/etc/rc.conf and add lines:
And while you're at it, this will get you away from having to stand at
the system console which may be in rack in a noisy server area as
quickly as possible...
and add your username to group zero
line; add a comma, then the username.
- Reboot. Watch boot screen for network up, or just wait for a min
Test network by trying to ssh in from another
If this doesn't work, you probably have bad network settings - perhaps
because you used tabs instead of arrows like I did the first time.
and correct ip config. Also
- Test network, via ssh. Be sure to use the new user/pass you added
above as freebsd's sshd will not allow a direct login for 'root'.
- Once in, try
If you cannot do 'su', back to console and use 'vi' to edit /etc/group
(see above). (This takes effect immediately, no need to reboot.)
- 'xterm': Command not found - dang it. Must install XOrg.
- But first, must install the package manager.
is not installed, do you wanna? yes
- Now XOrg:
pkg install xorg
Note! you may have to reboot after
xorg install to make xterm actually work. Not sure why, not gonna
spend the time to figure it out as I got things working on my system
pkg install xterm
- While we're at it, let's install 'xload' which also dosn't come by
default with XOrg:
pkg install xload
- Ugh, 'vi' is so pathetic, Gawd I hate 'vi'. (Yes, I know, it was pretty good when they wrote it back in the 1970's!)
We'll install emacs. (Do not install emacs23 - keyboard doesn't work
- I tried it.)
pkg install emacs22
- And finally...
Leave 'su' shell as 'xterm' will refuse to start in an 'su' shell)
Get new xorg stuff into path
Tell x-windows where to send output - be sure that "Tunnel X11
connections" is enabled in your 'ssh' app)
setenv DISPLAY localhost:10.0
Start xterm as background program. You can add '-bg' (background
color), '-fg' (foreground color), and '-name' to help make windows
from multiple systems more obvious on your screen)
In the new 'xterm' window, do your 'su'. In the future you will
always 'ssh' in as yourself, start an 'xterm', then do 'su'.
- Misc tasks...
- Ensure that email destined for root on this box gets forwarded to
your home account (assuming of course that this is as server, not your
If you have other test accounts on this box, you may want to do this
for them as well.
- Change username for root from that silly "Charlie" to your system
name by editing
This way if you get email from multiple servers, each will have the systemname in the username - very useful for quick subject-line appraisal.
- Make console logs available remotely via logfile (FreeBSD Forums: Tip: Log console messages):
uncomment line starting with "console.info" as directed in comments
chmod 640 /var/log/console.log
- Make it easy to move files in/out via a windows-based
memory key (see freebsd handbook):
/etc/fstab, add line (tabs between fields):
/dev/da0s1 /memkey msdosfs rw,noauto,-m=644,-M=755 0 0
Now to use it, insert key, wait a moment, then enter:
Fyi: if you ever need to do this immediately from a command line and
haven't gotten it into fstab yet:
mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /memkey
- While you're there, add the magic for easy cd/dvd-rom access:
/dev/cd0 /cdrom cd9660 ro,noauto 0 0
- You DO want to have your system time set automatically. If you
didn't already, do it now - this is important:
/etc/rc.conf and add lines
- Need ftpd:
ftpd_flags="-D -p /var/run/ftpd.pid"
- While you're in that file, enable a screen saver:
[Note! Changing over to PAE kernel (see below) breaks this, so skip for now. Maybe I'll get back to figuring this out later, but not gonna spend time on it now.]
- And while you're in there, enable 'named':
- Now install 'named' (it's no longer there by default):
pkg install bind99
- You'll need to merge named config in new dir (moved
New start command is:
I had to
chmod 770 slave working master
chgrp bind slave working master
(Note: after the fact I bet you could just
chown bind and
it'd take care of the rest. If you try this, let me know if it
Once BIND was running, I was getting errors like:
Required root permissions to open '/var/run/named/pid'
and same for
session.key. Fixed this by:
chown bind /var/run/named/*
chown bind /var/run/named
FYI: To check for bind errors, do:
tail -n 50 /var/log/messages
I had to create links in the
working directory to point to the data dirs:
ln -s ../master
ln -s ../slave
ln -s ../dynamic
- You must get rid of the
rndc.conf file - I renamed it
in case some day I find I need to mess with it:
mv rndc.conf rndc.conf.do-not-use
- You'll need to edit /etc/resolv.conf and add 127.0.0.1 as the first
- Set up to do
Update (Handbook 23.2). edit
/etc/crontab, add the line:
@daily root freebsd-update cron
- On my 8G RAM Dell server, at boot time I'm seeing a message about
"ignoring memory above 4G". Google. Gotta make a custom
and Installing a Custom Kernel (Handbook 9.5). Merde, this is the
reason I'm upgrading from release-9.0, in the first place, I'd hoped
this would be built-in by now...
[Note! Am leaving the following failed attempts here so that search
engines will find them, in that others may also have done this wrong,
and find this page by searching for these error messages. Continue
past the following attempts for the actual solution. Don't actually
do anything 'til you see "start here".]
For filename I suggest using your system's hostname in all caps.
cp SAMPLE filename
edit file, somwhere down a ways add line (using tabs):
Make a copy of file outside of source tree as this whole dir struct
may be rewritten by external tools
cp [filename] /root
make buildkernel KERNCONF=[filename]
Blew up in "malo" with BUS_SPACE_MAXADDR. Commented out PAE, tried
again, all went well. Will try to disable "malo" and see if I can get
around it that way. Now we're blowing (same error) in "mwl" which is
also commented as a Marvell product. We'll comment that out too and
try again. nope -- back to breaking in malo again, weird.
Trying again days later with all wireless and all sound removed.
Didn't work, same error.
Tried all sorts of stuff, including building as amd64 -- still blows
chunks on malo. Commented out tons of stuff that I didn't think I
needed, stuff blew up on malo.
I thought I'd found the answer, but
freebsd-current: PAE broken on -current. However, this did lead
me to the real answer -- there is a PAE config file already there, you
just need to know to look for it. It's
(I recommend making a symbolic link with your systemname to PAE to help
make it clear that you're using the default PAE file, then building
using your name.)
ln -s PAE [systemname]
make buildkernel KERNCONF=[systemname]
make installkernel KERNCONF=[systemname]
- Reboot to new kernel.
- In dmesg (boot messages) am seeing some warning about needing to
kern.maxswzone. Back to Google. Found that to
fix this simply add line to
kern.maxswzone=[multiple of 32]
dmesg gave me a number, so I used that, it didn't fix it - same error.
Oh well, seems benign, gonna ignore for now.
- Tried setting
/boot/loader.conf -- very, very bad idea. System
hangs immediately after giving the "ignoring" message. Had to go into
autoboot. System comes back up, remove that parm
from loader file.
20141222 - back to this again.
- Did some more googling - turns out 'amd64' is a gross misnomer due
to historical reasons. For any modern 64 bit cpu, regardless of mfr
(Intel vs. AMD), you should be using the amd64 kernel. As described
in FreeBSD handbook:
cp GENERIC /root/kernels/MYKERNEL.amd64
ln -s /root/kernels/MYKERNEL MYKERNEL
ident to your
kernel name, and make any other changes if you wish. For example this
server has no floppy drive, so I added
(You can look at
/var/log/messages to find errors that
occured at boot time and take out any unneeded drivers.)
make buildkernel KERNCONF=MYKERNEL TARGET=amd64
This starts erroring out at 'malo'. Edit file, comment out 'malo'.
Now breaks somewhere else, that doesn't seems to be some external
module I can simply omit. Merde. If this works for you, great, this
is the way you're supposed to do it. Oh well, scrap it.
- Decided to try PAE again.
cp PAE /root/kernels/MYKERNEL.pae
ln -s /root/kernels/MYKERNEL MYKERNEL
As above, edited 'ident' parm to my system name and fixed 'fdc'.
ln -s MYKERNEL MYKERNEL.pae
make buildkernel KERNCONF=MYKERNEL TARGET=i386
make installkernel KERNCONF=MYKERNEL TARGET=i386
dmesg | grep memory
- On to my specific stuff: new
Copyright © 1995-2017