This is not a full on tutorial on installing FreeBSD release-10, it's just notes I made as I went through it.
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.
hit ctrl-R at boot
Maybe I'll get back to this later...
/etc/rc.conf
and add lines:ntpdate_enable="YES"
ntpdate_flags="-b time.nist.gov"
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...
Edit /etc/group
and add your username to group zero
line; add a comma, then the username.
vi /etc/rc.conf
/etc/resolv.conf
. Reboot.su
.pkg
pkg install xorg
rehash
pkg install xterm
rehash
pkg install xload
rehash
emacs
, you'll get emacs26.pkg install emacs22
rehash
exit
rehash
setenv DISPLAY localhost:10.0
xterm&
echo youremailaddrhere>/root/.forward
/etc/passwd
. [20200316] old news -
use vipw
./etc/syslog.conf
touch /var/log/console.log
chmod 640 /var/log/console.log
cd /
mkdir /memkey
/etc/fstab
, add line (tabs between fields):/dev/da0s1 /memkey msdosfs rw,noauto,-m=644,-M=755 0 0
mount /memkey
umount /memkey
mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /memkey
mkdir /cdrom
/etc/fstab
/dev/cd0 /cdrom cd9660 ro,noauto 0 0
/etc/rc.conf
and add linesntpdate_enable="YES"
ntpdate_flags="-b time.nist.gov"
[20200316] old news, omit this and let it default to the pool./etc/rc.conf
ftpd_enable="YES"
ftpd_flags="-D -p /var/run/ftpd.pid"
allscreens_flags="MODE_277"
saver="snake"
blanktime="60"
scrnmap="no"
named_enable="YES"
named_program="/usr/local/sbin/named"
pkg install bind99
[20200316 old news, now bind914]/etc/named
to /usr/local/etc/named/
)./usr/local/etc/rc.d/named start
[20200306 old news, now service named start
]cd /usr/local/etc/namedb
chmod 770 slave working master
chgrp bind slave working master
chown bind
and
it'd take care of the rest. If you try this, let me know if it
works.Required root permissions to open '/var/run/named/pid'
session.key
. Fixed this by:chown bind /var/run/named/*
chown bind /var/run/named
tail -n 50 /var/log/messages
working
directory to point to the data dirs:cd working
ln -s ../master
ln -s ../slave
ln -s ../dynamic
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
[20200320] old news, didn't have to do this this time.nameserver 127.0.0.1
/etc/crontab
, add the line:@daily root freebsd-update cron
[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".]
cd /usr/src/sys/i386/conf
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):
options PAE
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
no... gmane.org:
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
at /usr/src/sys/i386/conf/PAE
(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.)
cd /usr/src/sys/conf
ln -s PAE [systemname]
cd /usr/src
make buildkernel KERNCONF=[systemname]
make installkernel KERNCONF=[systemname]
kern.maxswzone
. Back to Google. Found that to
fix this simply add line to /boot/loader.conf
kern.maxswzone=[multiple of 32]
hw.physmem="8G"
in /boot/loader.conf
-- very, very bad idea. System
hangs immediately after giving the "ignoring" message. Had to go into
loader parms, unset hw.physmem
then autoboot
. System comes back up, remove that parm
from loader file.I strongly suggest you don't have more than one swap device on spinning rust - the VM system will stripe I/O across the available devices and that will give particularly poor results when it has to seek between the partitions.Also, you can't actually use 64GB swap with 4GB RAM. If you look back through your boot messages, I expect you'll find messages like:
warning: total configured swap (524288 pages) exceeds maximum recommended amount (498848 pages).
warning: increase kern.maxswzone or reduce amount of swap.
or maybe:
WARNING: reducing swap size to maximum of xxxxMB per unit
The absolute limit on swap space is
vm.swap_maxpages
pages but the realistic limit is about half that. By default the realistic limit is about 4xRAM (on 64-bit architectures), but this can be adjusted viakern.maxswzone
(which defines the #bytes of RAM to allocate to swzone structures - the actual space allocated isvm.swzone
).As a further piece of arcana,
vm.pageout_oom_seq
is a count that controls the number of passes before the pageout daemon gives up and starts killing processes when it can't free up enough RAM. "out of swap space" messages generally mean that this number is too low, rather than there being a shortage of swap - particularly if your swap device is rather slow.
mkdir /root/kernels
cd /usr/src/sys/amd64/conf
cp GENERIC /root/kernels/MYKERNEL.amd64
ln -s /root/kernels/MYKERNEL MYKERNEL
cd /root/kernels
MYKERNEL.pae
, change ident
to your
kernel name, and make any other changes if you wish. For example this
server has no floppy drive, so I added nodevice fdc
.
(You can look at /var/log/messages
to find errors that
occured at boot time and take out any unneeded drivers.)cd /usr/src
make buildkernel KERNCONF=MYKERNEL TARGET=amd64
cd /usr/src/sys/i386/conf
cp PAE /root/kernels/MYKERNEL.pae
ln -s /root/kernels/MYKERNEL MYKERNEL
cd /root/kernels
ln -s MYKERNEL MYKERNEL.pae
cd /usr/src
make buildkernel KERNCONF=MYKERNEL TARGET=i386
make installkernel KERNCONF=MYKERNEL TARGET=i386
dmesg | grep memory