LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 08-15-2011, 09:29 PM   #1
shachter
Member
 
Registered: Jul 2007
Posts: 101

Rep: Reputation: 2
How Do I Upgrade From FreeBSD 6.1 To The Latest Stable Version?


How do I upgrade from FreeBSD 6.1 to the latest stable
version (which I think is 8.something)? Wiping
everything out and re-installing, although tempting,
is not realistic, I have invested too much time in
customizing the system (e.g., getting /etc/hosts
and the routing table right, installing a sound
card and getting the right driver for it, not to
mention all the home directories). But I really
need to upgrade: despite everyone's assurances that
the ports tree is independent of the OS version,
there are an increasing number of cases where the
portmaster command is just failing for various nasty
reasons -- the most recent was a failure to build
glib-2.26.1 due to, I believe, an ancient zlib.h
lurking somewhere where portmaster fails to uproot
it -- and I cannot help trusting that upgrading to
the latest stable version is going to make my life
much easier. A Google search has failed to yield
any useful results, so I now turn to you. Please
assume that I am not an experienced FreeBSD
administrator, but I am able to follow simple
step-by-step instructions. Thank you in advance
for your reply.

Jay F. Shachter
jay at m5 dot chicago dot il dot us
FedyaDolohov on AIM
JayShachter on Sprint
+1 773 7613784

Last edited by shachter; 08-16-2011 at 10:20 AM.
 
Old 08-15-2011, 10:00 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Though the Ports system is not FreeBSD-version specific, it's not too surprising that you're seeing issues on old (unsupported) FreeBSD releases.

You have a couple possibilities for upgrading, but I'll suggest what I consider to be the simplest:
  1. Back up your current system in its entirety using dump(8). Or image it if you'd prefer. Do not skip this step. No exceptions.
  2. Read the FreeBSD 7.4-RELEASE Announcement. If you're not using a custom kernel, follow the directions precisely under "FreeBSD Update".

FreeBSD 7.4 is supported through February 2013. You can worry about getting to an 8 RELEASE another day. (Or you can read the 8.2 release notes, and follow those instructions.)

AFAIK, you can not upgrade directly from 6.x -> 8.x.

Last edited by anomie; 08-15-2011 at 10:02 PM.
 
1 members found this post helpful.
Old 08-16-2011, 01:27 AM   #3
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
@shachter

FreeBSD 6.1 You say ... then I will suggest upgrade to 7.0, then to 7.4 and then to 8.0 and then finally to 8.2-RELEASE, it may be possible to upgrade 6.1 to 8.2 directly, but the 'step by step' seem to be safer path. Here are the instructions for every 'step':

Quote:
# cat > /root/supfile << __EOF
*default host=cvsup8.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7_0
*default delete use-rel-suffix
*default compress
src-all
__EOF
Code:
# pkg_add -r cvsup-without-gui
# cvsup /root/supfile
# cd /usr/src
# make buildworld kernel KERNCONF=GENERIC KODIR=/boot/testing
# nextboot -k testing
# shutdown -r now
(if new kernel works)
Code:
# cd /boot
# mv kernel OLD
# mv testing kernel
# cd /usr/src
# mergemaster -p
# make installworld
# mergemaster -FiU
# shutdown -r now
At some time csup will be available along with freebsd-update which makes FreeBSD upgrades easier (but I do not remember at which versions they appear, somewhere around 7.0 I think).
 
Old 08-16-2011, 04:08 AM   #4
dilbert_uk
Member
 
Registered: Aug 2011
Location: Lima, Peru
Distribution: Debian 10.4, xubuntu 20.04, Ubuntu 20.04 LTS
Posts: 83

Rep: Reputation: 4
I am not entirely sure but I think there is a hint on the FreeBSD web page saying that it is safe only to upgrade to the next version. And even this is been said is not the preferable way. They encourage you to always do a new installtion.
Further to this, I believe that a sequential update always to the next version will bring a bunch of subtle problems with it.
 
Old 08-16-2011, 04:17 AM   #5
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
@dilbert_uk

I have installed FreeBSD 5.4, then upgraded it to 6.0, then to 6.1 and then to 7.0, everything worked very well.
 
Old 08-16-2011, 04:36 AM   #6
dilbert_uk
Member
 
Registered: Aug 2011
Location: Lima, Peru
Distribution: Debian 10.4, xubuntu 20.04, Ubuntu 20.04 LTS
Posts: 83

Rep: Reputation: 4
That depends also on how much programs you install. If they need a bunch of libraries then the more of them you have they more likely is it to run into trouble. I got sometimes problems even when I updated certain programs keeping the same version of FreeBSD.
 
Old 08-16-2011, 04:49 AM   #7
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
Packages are not 'tied' to FreeBSD release, You can always refetch them from the FTP to be 'up to date' with current version or even build them with portmaster or by hand with make install clean.

Also old libraries from the base system are NOT deleted unless You type make delete-old and make delete-old-libs after the upgrade.
 
1 members found this post helpful.
Old 08-16-2011, 05:15 AM   #8
dilbert_uk
Member
 
Registered: Aug 2011
Location: Lima, Peru
Distribution: Debian 10.4, xubuntu 20.04, Ubuntu 20.04 LTS
Posts: 83

Rep: Reputation: 4
My FreeBSD version was often outdated and I couldn't find any packages as they might not depend on the kernel but at least on the servers that keep those packages they are somehow related to the FreeBSD version.

I only remember to got a different library version for different programs and I often needed to compile from source because packages and ports weren't available.
 
Old 08-16-2011, 06:29 AM   #9
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
@dilbert_uk

You probably used *-RELEASE packages which will get out of date pretty soon, comparing to build every odd week *-STABLE packages.
 
Old 08-16-2011, 07:12 AM   #10
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
Quote:
Originally Posted by shachter View Post
How do I upgrade from FreeBSD to the latest stable
version (which I think is 8.something)? Wiping
everything out and re-installing, although tempting,
is not realistic, I have invested too much time in
customizing the system (e.g., getting /etc/hosts
and the routing table right, installing a sound
card and getting the right driver for it, not to
mention all the home directories). But I really
need to upgrade: despite everyone's assurances that
the ports tree is independent of the OS version,
there are an increasing number of cases where the
portmaster command is just failing for various nasty
reasons -- the most recent was a failure to build
glib-2.26.1 due to, I believe, an ancient zlib.h
lurking somewhere where portmaster fails to uproot
it -- and I cannot help trusting that upgrading to
the latest stable version is going to make my life
much easier. A Google search has failed to yield
any useful results, so I now turn to you. Please
assume that I am not an experienced FreeBSD
administrator, but I am able to follow simple
step-by-step instructions. Thank you in advance
for your reply.

Jay F. Shachter
jay at m5 dot chicago dot il dot us
FedyaDolohov on AIM
JayShachter on Sprint
+1 773 7613784
Let me ask one realistic question:
-- With all these fears you have what are you going to do when your upgrade fails at one of these steps?

So I don't know much about WHERE this system of yours is installed and how it's being used, but one possible way could be to buy a new HDD, do a fresh installation of the last stable release 8.2 to this new HDD and then copy your configuration and user data from your old HDD. This can be done while the old HDD with your old system is running.

One of the advantages of this method is that you keep your old installation untouched and can still run it at any given time until you tune up your new one so that you can run instead of the old one.
Another advantage would be a newer HDD compared with the older one (and 6.1-RELEASE dates back to the year 2006, that's 5 years ago).
 
Old 08-16-2011, 11:52 AM   #11
shachter
Member
 
Registered: Jul 2007
Posts: 101

Original Poster
Rep: Reputation: 2
A fresh installation of FreeBSD 8.something on a completely new
computer, followed by a gradual configuration of the new computer
to make it assume the functionality of the old one, would be both
the safest and ultimately the most successful course of action,
albeit also the most time-consuming. But the resources are just
not there. Note that I would have to get a completely new
computer, not just a new disk, because if the FreeBSD 8 system is
going to be configured to assume the functionality of the 6.1 system,
the only practical way of doing it is for both computers to be
running at the same time. Plus there would have to be a new Ethernet
cable, and a new Ethernet hub, because I don't have any more available
ports on my existing hub, plus a new power strip will be needed to
provide another electrical outlet ... for a lot of reasons, it would
be much more time, trouble, and expense, than one would think. Otherwise,
the point made by user "kostya" would be compelling.

The FreeBSD 7.4-RELEASE Announcement website to which user "anomie"
directed me, http://www.freebsd.org/releases/7.4R/announce.html,
tells me to use the "freebsd-update" command, and there is no
"freebsd-update" command on my system. Behold:

[root@norman /usr/ports]# man freebsd-update
No manual entry for freebsd-update
[root@norman /usr/ports]# man -k freebsd-update
freebsd-update: nothing appropriate
[root@norman /usr/ports]# locate freebsd-update
[root@norman /usr/ports]# whereis freebsd-update
freebsd-update:
[root@norman /usr/ports]# pkg_which freebsd-update
freebsd-update: not found
[root@norman /usr/ports]# freebsd-update
bash: freebsd-update: command not found
[root@norman /usr/ports]# find / -name freebsd-update 2>&- -ls
[root@norman /usr/ports]# find / -name \*freebsd-update\* 2>&- -ls
[root@norman /usr/ports]#

The above evidence is excessive, but it makes the point. The above was
done, incidentally, after doing a "grep -r freebsd-update ." in the
/usr/ports directory, which found the string underneath security/vuxml,
and after doing "portmaster security/vuxml". I don't know what vuxml
is, but installing it did not bring me closer to freebsd-update.

So, I am going to attempt the step-by-step instructions given me by
user "vermaden", except that the only step I see is the step that upgrades
my system to 7.0. Presumably once I upgrade to 7.0 I will have a
freebsd-update command, at which point the instructions in the
http://www.freebsd.org/releases/7.4R/announce.html website can be
followed. Wish me luck, and if I am about to embark on a path of folly,
now is the time to stop me.
 
Old 08-16-2011, 11:57 AM   #12
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
@shachter: I believe freebsd-update(8) was incorporated into the base system as of 7.0-RELEASE. It's probably in Ports on your pre-7.0 system.

Hopefully you've heeded the advice about a complete system backup before beginning any upgrade attempt. (If you have not, I will respectfully call that the "path of folly" you referred to.)

Last edited by anomie; 08-16-2011 at 11:58 AM.
 
Old 08-16-2011, 12:01 PM   #13
shachter
Member
 
Registered: Jul 2007
Posts: 101

Original Poster
Rep: Reputation: 2
Well, that didn't last very long. It failed at the
very first command:

[root@norman ~]# pkg_add -r cvsup-without-gui
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/po...thout-gui.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/cvsup-without-gui.tbz' by URL
[root@norman ~]#

Does anyone want to advise me what to do now?
 
Old 08-17-2011, 12:52 AM   #14
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
@shachter

Teh use the Ports Luke

Code:
# cd /usr/ports/net/cvsup-without-gui
# make install clean
 
Old 08-17-2011, 06:07 AM   #15
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
Quote:
Originally Posted by shachter View Post
A fresh installation of FreeBSD 8.something on a completely new
computer...
1. Not a new COMPUTER, mind you, only a new HARD DRIVE that's all. Insert a new hard drive into your old computer, do the 8.2 fresh installation and copy the needed configuration from your old one. It will be the same hardware, only a new hard drive, which doesn't change your hardware configuration at all.

2. Could it happen, that in 8.2 there is some new functionality which needs some different configuration? Well in that case I don't know how you hope to avoid this through upgrades. Which means what? Which means that copying your old configuration will be either easy or not so easy, but with new installation it must be quicker.

3. Then again, with fresh install you won't have to each time upgrade your release and ports (which IS time consuming in any case), but will just install once the newest stuff thus consuming MUCH less time by all accounts.

4. Come what may with your fresh installation, you always have your fully functional old system on your old hard drive.

OK, these were my points in favour of the fresh install as I suggested. Perhaps, there are other one that are heavily against such approach...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the latest stable version of the kernel? nos1833 Debian 26 05-23-2007 10:12 AM
Which version of FreeBSD is most stable? General *BSD 3 03-07-2007 02:37 PM
Problems to compile the latest stable version of kernel (2.6.15.4) stomach Linux - General 3 02-24-2006 07:57 PM
How to upgrade FreeBSD 5.1 to latest stable? IntelSlacker *BSD 1 05-16-2005 06:56 PM
Latest version of FreeBSD glock19 Linux - General 8 02-02-2002 07:05 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 12:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration