Major and Minor Version Upgrades offline

@wblock@ - Ahh, now I understand why I always need to do that on the binaries for the non internet connected boxes.

@SirDice - That is a cool option, thanks for the tip.

I'm off and running now. My goal was to upgrade a non-internet connected box from 8.2-8.3 and that is done. If anyone is following the thread, this is the overall steps I took to accomplish this based on the replies in this post:

--Online box:
  1. Ensure you have Subversion
    • Need to obtain the latest source to upgrade the non internet computers' OS too. Subversion is the latest recommended way.
    • Guidance here
    • I built subversion(1) package which added two more packages:
      neon(1) (with ssl)
      apr(1)
  2. Prepare /usr/src for new source. This was not needed for me, nothing was in /usr/src:
    # mv /usr/src /usr/src.old
  3. Use Subversion, mirrors located here
    Use subversion to get source and put in /usr/src, https would not work for me, so I used http
    # svn checkout [url]http://svn0.us-west.FreeBSD.org/base/releng/8.3[/url] /usr/src
  4. Create tar of new source to bring over to non internet connected box.
    # tar -cvf usr_src.tar /usr/src/
    Copy tarball usr_src.tar to CD / thumbdrive

--Offline Box:

  1. Upload tarball
    Upload usr_src.tar file to /usr/
    # cd /usr
    #mv /usr/src /usr/src.old /*not needed for me, nothing was in there */
    #tar -xvf usr_src.tar

  2. build new kernel using new source
    # make buildworld /* ~30 minutes */
    #make kernel /* ~15 minutes */
    #make installkernel /* <5 minutes */
    #make installworld /* 10 minutes - REQUIRES uucp user! I had to add him back in */
    #mergemaster -Uiv /* understand your system, so that you know if you need to merge, delete, or install the new /etc/ files */
    #shutdown -r now

  3. Verify new OS kernel installed
    # uname -a
  4. Clean up
    # cd /usr/src
    #make check-old /* it lists out /path/file of old libs and directories that need to be removed. Make backups, then delete */
    #make delete-old
    #make delete-old-libs

    I rebooted here to test functionality of startup scripts after deleting the old paths and libraries.
Appreciate the help all.

SK
 
Last edited by a moderator:
kernel is equivalent to buildkernel installkernel, so installkernel does not need to be done separately. It will not hurt anything, just takes longer than necessary.
 
Hrmmm....

Didn't want to bump this post, but today I was using my new found procedure of upgrading another offline system (thanks again all ;)), but this one had different result. Same OS upgrade as the other box: 8.2-RELEASE-p3 upgrading to 8.3-RELEASE-p6, on same hardware.

After the OS upgrade on the first machine, [cmd=]uname -a[/cmd] returned 8.3-RELEASE-p6. Which it should since I did rebuild the kernel from svn source. However, the second machine, that I did today, the command returned 8.2-RELEASE-p3. I did some reading on the issue here which is where I learned about the file /usr/src/sys/conf/newvers.sh. The file has the following entry:

Code:
REVISION="8.3"
BRANCH="RELEASE-p6"

This is correct, and what I expected [cmd=]uname -a[/cmd] to return, but instead it returns the previous version 8.2-RELEASE-p3. Simple reboot was a thought, but that did not work either.

So two questions. Where is [cmd=]uname -a[/cmd] getting its version if not from the file above? Second, how do I fix this (and any idea what I did to cause this so that I can avoid it in future)?

SK
 
Unfortunately not. I was not fully awake :\ and did a robotic like "I must follow procedure" zombie approach.

What I have done now is to remove the files from both /usr/obj and /usr/src/ and have restarted the procedure at [cmd=]#make buildworld[/cmd].

The reason I removed the files at /usr/obj is due to the error I received from starting the process last time I tried the procedure (this morning).

Let me know if this is way off base.

SK
 
Ahh, I think I figured it out!

Not knocking you, @wblock, but it was the below quoted reply that got me (my fault though for sure) :P

kernel is equivalent to buildkernel installkernel, so installkernel does not need to be done separately. It will not hurt anything, just takes longer than necessary.

I saw:

kernel was equivalent (meaning alias) to buildkernel installkernel...

You meant:

kernel was equivalent to executing both buildkernel and installkernel...


So I took the procedure I had run on the first machine under step 2 (see Post #27) and removed the # make kernel:
Code:
# make buildworld /* ~30 minutes */
#make installkernel /* <5 minutes */
#make installworld /* 10 minutes - REQUIRES uucp user! I had to add him back in */
#mergemaster -Uiv 
#shutdown -r now

I know I know, I'm learning though, so be kind. :e

Hopefully thats right. I'm starting back at the top of my procedure and using # make kernel it in this time so it should go smoothly. I'm not too comfortable with just executing # make kernel after the fact. I verified that the kernel was built under /usr/obj/usr/src/sys/GENERIC and it was, so confidence is a bit higher this time around.


SK
 
Last edited by a moderator:
I don't really get the misunderstanding; a confusion between the word "kernel" and these make targets, maybe. To be clear:
Code:
# cd /usr/src
# make kernel

is the same as

Code:
# cd /usr/src
# make buildkernel installkernel

See line 276 of /usr/src/Makefile.
 
Yeah, its hard to explain "confusion".
Basically, I thought these three statements below did the same thing independently. So I decided to "pick one". I didn't understand that the first was really a superset of the other two.

# make kernel
# make buildkernel
# make installkernel

Hope that helps. Either way, I think I'm good now, thanks again for your patience with me!

SK
 
Ah, I think I see. I should have said "kernel is equivalent to buildkernel and then installkernel", or shown the example above in #33. Sorry about that.
 
That's it!

Anyway, my fault, I should still have been able to figure it out.
Many thanks again, it's working now, I'm on my last server today, whoot! :e

SK
 
Back
Top