Make World

Applicable to: FreeBSD 4.6
Updated: July 8, 2002

This Sheet describes the procedure for updating FreeBSD from source. Before performing this procedure, you should review the FreeBSD Handbook article Using make world.

  1. Run cvsup to update the sources:

    # /usr/local/bin/cvsup -g -L 2 /usr/src/stable-supfile

    If you've created the /usr/local/bin/cvsrun script described in the Updating Sources with CVSup cheat sheet, you can also run:

    # /usr/local/bin/cvsrun

    If you need help setting up /usr/src/stable-supfile, see the Updating Sources with CVSup cheat sheet.

  2. Read /usr/src/UPDATING carefully so that you understand any special procedures that are required. If you do not follow such special procedures, you run the risk of rendering your system unusable. Make sure you have a backup of all the important files on your system!

  3. Edit or create /etc/make.conf and enter the following options to override the defaults (located in /etc/defaults/make.conf):

    CFLAGS= -O -pipe
    COPTFLAGS= -O -pipe
    NOPROFILE= true
    USA_RESIDENT= YES

  4. Backup /etc:

    # cp -Rp /etc /etc.old

  5. Run mergemaster in pre-buildworld mode to update files essential to the success of buildworld and installworld:

    # /usr/sbin/mergemaster -p -v -w 132 (eliminate '-w 132' if 132x43 video mode is not activated)

  6. Remove old /usr/obj:

    # cd /usr/obj
    # chflags -R noschg *
    # rm -rf *

  7. Compile the sources:

    # cd /usr/src
    # make buildworld

  8. Compile and install the new kernel:

    # cd /usr/src (if you've changed directories after the last step)
    # make kernel KERNCONF=YOURKERNEL

    If you don't already have a custom kernel configuration, use GENERIC in place of YOURKERNEL above. If you wish to create a custom kernel, see the Building a Custom Kernel cheat sheet.

  9. Drop to single user mode:

    # shutdown now

    Or reboot into single user mode:

    # shutdown -r now
    ···
    Ok boot -s
    ···
    # fsck -p
    # mount -u /
    # mount -a -t ufs
    # swapon -a
    # adjkerntz -i

  10. Install the new system binaries:

    # cd /usr/src
    # make installworld

  11. Update system configuration files:

    # /usr/sbin/mergemaster -v -w 132 (eliminate '-w 132' if 132x43 video mode is not activated)

  12. Update /dev

    In most cases, mergemaster will realize when it is necessary to update the devices, and will offer to complete it automatically. If you've declined mergemaster's offer, perform these steps to update /dev manually:

    # cd /dev
    # /bin/sh MAKEDEV all

  13. Update /stand:

    This step is included for completeness. It can be safely omitted.

    # cd /usr/src/release/sysinstall
    # make clean
    # make all install

  14. Reboot to multi-user mode:

    # reboot




http://www.mostgraveconcern.com/freebsd/
Questions or Comments? Contact Us...