FreeBSD 8 Src Upgrade

Backup the system before you do this. I've successfully upgraded my Gnome desktop from 7.2 to 8RC3. I'm also assuming that you are using portsnap and portmaster to manage apps. Here is how I did it:

Edit supfile and make sure tag set to RELENG 8 (this will get RC3):
Code:
*default release=cvs tag=RELENG_8_0
Note if you do not have supfile, enter:
Code:
# cp /usr/share/examples/cvsup/standard-supfile /root/supfile
# vi /root/supfile
And make sure it looks as follows
Code:
*default host=cvsup1.us.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8_0
*default delete use-rel-suffix

Get the freebsd 8 source:
Code:
 csup /root/supfile
Read last minute info:
Code:
vi /usr/src/UPDATING
You can disable unwanted options i.e. source build options via /etc/src.conf. Here is my sample /etc/src.conf (read man page src.conf(5) for more info):
Code:
WITHOUT_ATM=yes
WITHOUT_BLUETOOTH=yes
WITHOUT_CALENDAR=yes
WITHOUT_GAMES=yes
WITHOUT_I4B=yes
WITHOUT_IPFILTER=yes
WITHOUT_IPX=yes
WITHOUT_LPR=yes
WITHOUT_NETCAT=yes
WITHOUT_NIS=yes
WITHOUT_RCMDS=yes
WITHOUT_SENDMAIL=yes
WITHOUT_WPA_SUPPLICANT_EAPOL=yes
WITHOUT_ZFS=yes
WITHOUT_BLUETOOTH=yes
Type the following command to build base system:
Code:
cd /usr/src
make cleanworld && make cleandir
make buildworld
Build and install the kernel:
Code:
make buildkernel
make installkernel
Reboot the box:
Code:
reboot
Boot into a single user mode and mount it:
Code:
mount -a -t ufs
df
Install sys configuration files that are required by the new base system
Code:
mergemaster -p
Warning: Be careful with /etc/passwd, /etc/group and other modified file in based. Verify each file before installing the new version or merging something.
Instal the base system:
Code:
cd /usr/src
make installworld
Merge your configuration files
Code:
mergemaster -i
make delete-old
reboot
Warning: Be careful with /etc/passwd, /etc/group and other modified file in based. Verify each file before installing the new version or merging something.
Verify it:
Code:
uname -a
O/P
Code:
FreeBSD ninjutsu.my.lan  8.0-RC3 FreeBSD 8.0-RC3 #2: Sun Nov 15 22:34:26 IST 2009     root@ninjutsu.my.lan:/usr/obj/usr/src/sys/GENERIC  amd64

Recompile all apps:
Code:
portsnap fetch update
pkg_version -l '<'
portmaster -Da
make delete-old-libs

References:
  1. man pages portmaster, portsnap, make, csup, src.conf(5) etc, /usr/src/Makefile
  2. http://www.freebsd.org/doc/en/books/handbook/makeworld.html

Let me know if you've any question. Enjoy! Peace & Love!!
 
No offense, but are posts like these really necessary? I see nothing unique in your howto compared to simply reading the handbook...
 
You miss some important steps, like 'make delete-old' and 'make delete-old-libs' (the second one should only be done after rebuilding all installed ports). Starting with 'make cleanworld' and 'make cleandir' is advisable as well.

See /usr/src/Makefile.
 
@DutchDaemon, thanks for the heads up and information.

@aragon, not everything is covered in handbook. The main point of forum is discussion. See DutchDaemon's comment. It was helpful and informative.
 
One would want to upgrade more carefully if one has
a custom kernel; compare v7 GENERIC to v8 GENERIC,
see the Release_Notes_for_v8;
Despite that, some features I could not get to work
properly without loading additional ko's in loader.conf,
(in this case, geom_bsd.ko, geom_mbr.ko, geom_label.ko, to
"allow" dev entries to appear). Could have been something
I overlooked, a temporary glitch at that particular day
of _8 stable, ...
I think I made a simple post of the process in this or another
forum (and not a full howto).
 
SIFE said:
how can i force to rebuild packages even thye are updates ?

From the man page ( I never did this ):
Using portmaster to do a complete reinstallation of all your ports:
Code:
portmaster --list-origins > ~/installed-port-list
Update your ports tree
Code:
 portmaster --clean-distfiles-all
portmaster --check-port-dbdir
portmaster -Faf
pkg_delete '*'
rm -rf /usr/local/lib/compat/pkg
Manually check /usr/local and /var/db/pkg to make sure that they are really empty:
portmaster `cat ~/installed-port-list`

See man page for details.
 
Where's supfile

Where's the supfile found? It's been a long time since I set the system up and I don't remember where it is or what it was called?
 
c(v)sup is not configured to use any cvsupfile by default. You'll have to either create one or use one of the examples.
 
I'm confused. I thought I had to have one to set up the system in the first place, no? Doesn't it remain on the system somewhere?
 
csup plays no role in the initial setup of the machine. The initial setup is either done from CD/DVD or over the net (FTP/HTTP). Those are binary ("canned") sets, not source code.
 
Ok. Yes I install over the net. I remember making a supfile a while back when I set up a different system. I thought it was always used for net install to specify the mirror repository but I guess I was just confusing it with when I used to use cvsup for port install. I've been using portsnap for the last year or two and used to use cvsup. I thought it was used for net install too but I was mistaken.

So I guess I need to make a new one for this upgrade then it will remain on the system if I ever want to use csup again right?
 
Yes, it'll remain on the system. For the source supfile you have to specify the branch tag that you want, in your case it's RELENG_8. For ports supfile the tag is always current.
 
But leave the ports part out of the csup process, since you're already running portsnap. Don't want two separate processes competing over the ports tree.
 
sixtydoses said:
Yes, it'll remain on the system. For the source supfile you have to specify the branch tag that you want, in your case it's RELENG_8. For ports supfile the tag is always current.

So you're saying there are two supfiles, one for ports and one for source?
 
I followed the above steps and followed along in the handbook at the same time but when I got to the step;

Code:
make installkernel

It failed for / filesystem full. / is at 109%. My /dev/ad8s3a is 500MB. Is this normal? Is there something I can delete to make room?

df -h
Code:
Filesystem       Size      Used    Avail   Capacity Mounted on
/dev/ad8s3a     496M       495M     -39M       109%      /
devfs           1.0k       1.0k      0B        100%      /dev
/dev/ad8s3e     496M       1.0M     455M         0%      /tmp
/dev/ad8s3f      89G        29G      53G        35%      /usr
/dev/ad8s3d     2.9G       776M     1.9G        29%      /var
/dev/ad8s5      500G       224G     276G        45%      /Data

fstab
Code:
Device                Mountpoint      FStype  Options Dump Pass#
/dev/ad8s3b           none            swap    sw      0    0
/dev/ad8s3a           /               ufs     rw      1    1
/dev/ad8s3e           /tmp            ufs     rw      2    2
/dev/ad8s3f           /usr            ufs     rw      2    2
/dev/ad8s3d           /var            ufs     rw      2    2
/dev/ad8s5            /Data           ntfs    rw      2    2
/dev/acd0             /cdrom          cd9660  ro,noauto 0    0
 
SeaHag said:
So you're saying there are two supfiles, one for ports and one for source?

Yes. But as DutchDaemon had mentioned earlier, leave the csup for ports since you're already using portsnap.

Wrt your / space being full, I remember having the same issue couple of years back, but that was completely my bad as I wrongly symlinked one of my data directory to a directory in / (I forgot I was root and I used the ~ instead of /home/user/). Might wanna check the content of your /.
 
phoenix said:
Read the man page: du()
Note the -d option. :)
[cmd=]du -d 1[/cmd]

du -hd1 outputs;

Code:
2.0K   ./.snap
2.5K   ./dev
1.0M   ./tmp
 29G   ./usr
776M   ./var
1.7M   ./etc
2.0K   ./cdrom
1.1M   ./bin
392M   ./boot
7.4M   ./lib
274K   ./libexec
2.0K   ./proc
4.0K   ./mnt
2.0K   ./proc
4.3M   ./rescue
 84M   ./root
4.4M   ./sbin
2.0K   ./Data
 30G   .

How can I tell from this why / is full?
 
Try [cmd=]du -x -d 1 /[/cmd], or for more detail [cmd=]du -x -d 2 /[/cmd], etc. By using -x you stay inside the / filesystem.
 
Back
Top