OpenSolaris BFU: All the current goodies without the hassle
Posted on July 14, 2006
Have you downloaded and installed Solaris Express: Community Release? Have you considered downloading, compiling and installing the latest code? Have you run into problems or just been to lazy to do it? Does it just seem too complicated? Wanna run the latest code without having to build it yourself? If so, then BFU is for you.
Here’s the 30 second BFU Primer: When you compile OpenSolaris the result will be a series of CPIO archives. These archives are then installed on top of your current installation using the BFU utility. BFU origonally stood for “Bonwick/Faulkner Upgrade” but has since become more widely known as “Blindingly Fast Upgrade”.
When you go to the OpenSolaris Download Page you have 2 options. You can download the code, the ON build tools (which includes BFU and friends), the Studio compilers, and the closed binaries and build OpenSolaris yourself… or, for the lazy or impatient you can simply download the BFU Archives and ON build tools. By downloading the BFU Archives your really just grabbing a pre-compiled Solaris build and saving yourself the time and effort.
So how do you BFU? If you have a fairly recent installation of Solaris Express Community Release (if your further back than like build 32 I’d recommmend upgrading first, it might work, but I won’t guarrentee it) download the Archives and the build tools for your platform. Here’s a step by step run through of the general procedure:
- Download the “ON Specific Build Tools” (SUNWonbld…tar.bz2) and “ON BFU Archives” (on-bfu-…tar.bz2).
- Unpack both.
- In the onbld/ directory, install the SUNWonbld package. If you have a prior installation of it remove it first (pkgrm SUNWonbld).
root@mycluster1 b44$ cd onbld/ root@mycluster1 onbld$ pkgadd -d . The following packages are available: 1 SUNWonbld OS-Net Build Tools (i386) 11.11,REV=2006.07.11.04.27 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: 1 .... Installation of
was successful. root@mycluster1 onbld$ - Setup the following enviromental variables (bash syntax shown):
export FASTFS=/opt/onbld/bin/i386/fastfs export BFULD=/opt/onbld/bin/i386/bfuld export GZIPBIN=/usr/bin/gzip export PATH=/opt/onbld/bin:/opt/onbld/bin/i386:$PATH
- BFU your system using the archives you unpacked. You must use a fully qualified path:
root@mycluster1 b44$ bfu /export/b44/archives-20060710/i386/ Copying /opt/onbld/bin/bfu to /tmp/bfu.3211 Executing /tmp/bfu.3211 /export/b44/archives-20060710/i386/ Loading /export/b44/archives-20060710/i386/ on / Creating bfu execution environment ... Give it a couple minutes to extract everything... MAKE SURE YOU RESOLVE ALL CONFLICTS BEFORE REBOOTING. To install resolved changes required for reboot in the boot archive, invoke 'bootadm update-archive' /tmp/bfu.3211[2008]: test: argument expected Removing obsolete smf services ... Disabling unneeded inetd.conf entries ... Connecting platform and name service profiles ... Marking converted services as enabled ... cp: cannot access /net/greenline.eng/meta0/smf/post-5090532/sysidtool.xml bfu: could not copy /net/greenline.eng/meta0/smf/post-5090532/sysidtool.xml cp: cannot access /net/greenline.eng/meta0/smf/post-5090532/kdmconfig.xml bfu: could not copy /net/greenline.eng/meta0/smf/post-5090532/kdmconfig.xml Upgrade of mycluster1 took 1:26. Turning off delayed i/o and syncing filesystems ... Filesystem Mode / safe /usr safe Entering post-bfu protected environment (shell: ksh). Edit configuration files as necessary, then reboot. bfu#
- Run the ACR (Automatic Conflict Resolution) utility from the BFU KSH shell:
bfu# /opt/onbld/bin/acr Getting conflict resolution information from /export/b44/archives-20060710/i386//conflict_resolution.gz: 610 blocks Building command list for the class action scripts: Begin processing files PROCESSING etc/crypto/kcf.conf PROCESSING etc/driver_classes PROCESSING etc/path_to_inst PROCESSING etc/shadow PROCESSING etc/vold.conf PROCESSING etc/rmmount.conf PROCESSING etc/inet/hosts PROCESSING etc/inet/ipnodes PROCESSING etc/default/init PROCESSING etc/remote PROCESSING etc/nsswitch.conf PROCESSING etc/inet/services PROCESSING etc/security/auth_attr PROCESSING etc/security/exec_attr PROCESSING etc/security/prof_attr PROCESSING etc/user_attr PROCESSING etc/vfstab PROCESSING etc/auto_master PROCESSING boot/grub/menu.lst PROCESSING etc/openwin/server/etc/OWconfig PROCESSING etc/power.conf See /tmp/acr.ggayJl/allresults for more information.
- Almost everything should be done for you, ACR didn’t report any errors so things are probly done. Look at the files in /bfu.conflicts to decide whether you should use the file you have or the new one found there.
- When your confident you’ve resolve the conflicts as best you can, restart your system.
root@mycluster1 b44$ sync;sync;sync;shutdown -y -g0 -i6 Shutdown started. Fri Jul 14 16:43:09 PDT 2006 Changing to init state 6 - please wait ....
If all goes well, your system will boot up and be running the new code. If you want GRUB to list the real version your running you’ll want to update /boot/grub/menu.lst, but this is only cosmetic.
Please be aware that BFU’ing your system is a potentially dangerous thing. You should backup or use LiveUpgrade prior to BFU’ing your system if your paranoid but in most cases BFU’s suceed with little to no problem at all. Backing up your user data is, of course, always a good idea.
If your wondering “Whats the downside?” Really just the obvious, you can’t customize your build. The only somewhat common change made by some of us when doing our own builds is to modify the build flags to create a non-debug kernel. The default is to build a “debug” kernel and thus the downloadable archives include that kernel.
As an aside. If your a long time Linux user who builds their own kernel, you might be wondering how you can revert to your old build or install multiple kernels. You can’t… not easily anyway. OpenSolaris, unlike Linux, is the entire core of the OS, not just the kernel itself. When you BFU your installing not only the kernel and modules but utilities and libraries. Because of this scope you can’t just create an alternate GRUB bootline for a diffrent kernel. Technically if you did just build the kernel and nothing else, you could do this, but because Solaris doesn’t allow you to build everything into the kernel in the way that Linux does, you’ll never see it done unless your hacking on the kernel itself of course. The closest equivilent would be to use LiveUpgrade to duplicate your installation to another disk or partition and then BFU onto the alternate installation and create GRUB boot options for both, so that you can alternate between them.
When your reboot completes, log into your system and your login (set by /etc/motd) should look something like this:
benr@monolyth ~$ ssh 10.10.0.171 Password: Last login: Fri Jul 14 15:43:51 2006 from 10.10.1.110 Sun Microsystems Inc. SunOS 5.11 opensol-20060710 Jul. 11, 2006 SunOS Internal Development: stevel 2006-07-11 [tonic.20060710] bfu'ed from /export/b44/archives-20060710/i386/ on 2006-07-14 Sun Microsystems Inc. SunOS 5.11 snv_42 October 2007
Presto Chango! Enjoy.
Side Note: Recent code drops from Build 44 report as snv_42, as you can see above. Ignore it and judge based on the drop date and the build schedule. In my examples above, the code drop date (nightly) date is 7/10/06, and a quick look at the schedule shows that 7/10 is the day on which the Build 44 gate closes.