Installing from source

I wrote down the explicit steps I used to get a DragonFly machine running and up-to-date; I’m including them here for the benefit of others. This was working as of mid-September.

** Updated December 2003; silly typos.

** Update February 2004: This guide was written using FreeBSD 4.8 as a guide; it may break. There is a guide page on dragonflybsd.org that talks about upgrading from FreeBSD 4.9.

What I did:

# Set up the system, and get online
1: installed from latest snapshot iso (many missing file errors)
2: rebooted
3: logged in as root
4: assigned root a password
5: in /etc/rc.conf did sshd_enable=”YES”, ifconfig_xl0=”DHCP”
(xl0 happened to be the card installed.)
6: rebooted
7: fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/All/cvsup-without-gui-16.1h.tgz
8: adduser (for myself)

# pull down source code
9: Create a cvsup file called /usr/local/etc/dragonfly-cvsup:

*default host=cvsup.dragonflybsd.org
*default base=/usr
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress

cvs-root
cvs-src
cvs-dfports

10: rm -rf /usr/src /usr/obj
(probably not necessary, but safe.)
11: cd /usr
12: cvsup -L 2 /usr/local/etc/dragonfly-cvsup
(check kernel list to make sure there’s no recent tinderbox errors)
13: cp /usr/share/examples/cvsup/FreeBSD-ports-supfile /usr/local/etc/
14: edit FreeBSD-ports-supfile for correct server
15: cvsup -L 2 /usr/local/etc/FreeBSD-ports-supfile
16: cd /usr/src

# And then the regular upgrade process:

make buildworld
make buildkernel
make installkernel
make installworld
mergemaster
reboot

Now, you can (weekly, at most) repeat from step 14 to stay current.

One Reply to “Installing from source”

  1. Building DragonFly on FreeBSD 4.8 isn’t as simple as it used to be.

    In order to build DragonFly on FreeBSD 4.8 you need to do things a little backwards from the way you would normally do them. I’ll show you how it needs to be done nowadays:

    First, cvsup as above then;

    rm -rf /usr/include && mkdir /usr/include
    cd /usr/src && make installincludes

    make buildworld
    make installworld
    make upgrade
    make buildkernel
    make installkernel
    reboot

    Explanation:

    In order to prevent old 4.8 files from messing with the DragonFly build, the ‘/usr/include’ directory must be cleared of all the old 4.8 ‘.h’ files.

    The version of ‘config’ that ships with 4.8 will not work with the modern DragonFly kernel source, and so you must ‘make buildworld’ and ‘make installworld’ beofore the DragonFly kernel will compile.

    Just remember to *NOT* reboot until the DragonFly kernel is installed, or else you’ll end up with an unbootable system.

    The ‘make upgrade’ after the ‘make installworld’ is needed to update the ‘/etc’ and other assorted files needed to boot the system. Skipping this step isn’t advisable due to the inclusion of the new RCng and GCC3.

Comments are closed.