# freebsd-update from newbie



## Pipo (Feb 7, 2017)

It used to be complicated to upgrade FreeBSD. So because of that, I stayed away from it. But now it only takes 
	
	



```
freebsd-update
```
 ? I want to be sure before I take this big step. I have locked myself out in the past with other issues and I want to avoid that. And I assume a reboot?


----------



## SirDice (Feb 7, 2017)

https://www.freebsd.org/releases/11.0R/installation.html#upgrade-binary


----------



## ShelLuser (Feb 7, 2017)

Apart from what SirDice said above:



Pipo said:


> It used to be complicated to upgrade FreeBSD. So because of that, I stayed away from it.


No offense intended but everything which is somewhat unknown or obscure to you might seem complicated at first. But FreeBSD is also a very extensively documented environment. And well, you know the saying: practice makes perfect 

Reason I mention this is because your comment brought back some memories from when I first tried to upgrade FreeBSD using the source code (I was used to Linux back then). In comparison it seemed extremely complex. Instead of simply running `# make menuconfig` you actually had to manually edit a config file 

But now, a few years later, it became normal for me, second nature if you will. It takes effort, but it's hardly as complex anymore.

But yeah, freebsd-update is a thing. Also see its freebsd-update(8) manualpage and there's also a whole chapter about updating FreeBSD in the handbook.

It honestly isn't as complicated as it might seem.


----------



## SirDice (Feb 7, 2017)

ShelLuser said:


> It honestly isn't as complicated as it might seem.


Indeed, once you've done it a few times it's actually quite easy.


----------



## Pipo (Feb 8, 2017)

ShelLuser said:


> Apart from what SirDice said above:
> 
> 
> No offense intended but everything which is somewhat unknown or obscure to you might seem complicated at first. But FreeBSD is also a very extensively documented environment. And well, you know the saying: practice makes perfect
> ...



I agree, but updating freebsd is a different story and a big one. If update apache fails, I can redo it. If this update fails, I have the change of not having access to my server anymore. Sites are down, mail is down. Can take days before I can solve this. An expert can solve it pretty easy because he knows what to do. I can handle things, but it is limited. My server is thousands of miles away from me, so console access is out of the question. So this is a big step for me.


----------



## drhowarddrfine (Feb 8, 2017)

When I flip the light switch in my bedroom, the light comes on every single time. There have been times when it didn't. Either the light bulb was burned out or the switch broke or a fuse blew but, otherwise, it's extremely reliable and expected to work all the time.

`freebsd-update` has been more reliable than flipping the light switch in my bedroom.


----------



## balanga (Feb 8, 2017)

Pipo said:


> It used to be complicated to upgrade FreeBSD. So because of that, I stayed away from it. But now it only takes
> 
> 
> 
> ...



I tried it the other day and found that I could not upgrade a *CURRENT *version to a* RELEASE* version of FreeBSD, so check what you are trying to upgrade. I ended up having to Rebuild World via ssh and the process stalled before it finished.


----------



## gkontos (Feb 8, 2017)

Pipo said:


> I agree, but updating freebsd is a different story and a big one. If update apache fails, I can redo it. If this update fails, I have the change of not having access to my server anymore. Sites are down, mail is down. Can take days before I can solve this. An expert can solve it pretty easy because he knows what to do. I can handle things, but it is limited. My server is thousands of miles away from me, so console access is out of the question. So this is a big step for me.


I would strongly suggest the use of IPMI or ILO during upgrades regardless of the method. I have been upgrading systems for years and I never perform an upgrade anymore if I don't have some sort of access to the server.


----------



## gkontos (Feb 8, 2017)

balanga said:


> I tried it the other day and found that I could not upgrade a *CURRENT *version to a* RELEASE* version of FreeBSD, so check what you are trying to upgrade. I ended up having to Rebuild World via ssh and the process stalled before it finished.


You will find that sysutils/screen or sysutils/tmux can save you from broken ssh sessions.


----------



## Pipo (Feb 9, 2017)

drhowarddrfine said:


> When I flip the light switch in my bedroom, the light comes on every single time. There have been times when it didn't. Either the light bulb was burned out or the switch broke or a fuse blew but, otherwise, it's extremely reliable and expected to work all the time.
> 
> `freebsd-update` has been more reliable than flipping the light switch in my bedroom.



Well, that was very convincing. But first I try to get my IPMI connection, as qkontos is mentioning, to be sure. There seems to a problem and my provider is looking into it. Then I am going to make the jump and see where I land. Thanks.


----------



## Pipo (Feb 9, 2017)

balanga said:


> I tried it the other day and found that I could not upgrade a *CURRENT *version to a* RELEASE* version of FreeBSD, so check what you are trying to upgrade. I ended up having to Rebuild World via ssh and the process stalled before it finished.



Thanks for mentioning that. It is between RELEASE version, so I do not expect this to be a problem.


----------



## SirDice (Feb 9, 2017)

Let me reiterate as there seems to be some confusion, freebsd-update(8) can only update/upgrade _from_ one -RELEASE version to another, i.e. 11.0-RELEASE-p1 to 11.0-RELEASE-p4, or 10.3-RELEASE-p2 to 11.0-RELEASE-p4. Updating/upgrading any other version (i.e. 11-STABLE, 11-CURRENT, 12-CURRENT) requires building world using the source.


----------



## Pipo (Feb 10, 2017)

SirDice said:


> Let me reiterate as there seems to be some confusion, freebsd-update(8) can only update/upgrade _from_ one -RELEASE version to another, i.e. 11.0-RELEASE-p1 to 11.0-RELEASE-p4, or 10.3-RELEASE-p2 to 11.0-RELEASE-p4. Updating/upgrading any other version (i.e. 11-STABLE, 11-CURRENT, 12-CURRENT) requires building world using the source.



Thanks. I have version 10.0-RELEASE-p18 so this part looks good.


----------



## SirDice (Feb 10, 2017)

For FreeBSD 10.0 I'd recommend upgrading to the latest 10.3 first, then upgrade to 11.0. You can also stay on 10.3 if you want, it'll be supported until April 2018.


----------



## gkontos (Feb 10, 2017)

Just some info, if you use freebsd-update, make sure that you first update to the latest patchset of the RELEASE you running now. Then perform the upgrade to 10.3-RELEASE


----------



## Pipo (Feb 10, 2017)

I have done it. I decided to go to 10.3 first because of the recommendations here. But got problems because there was an error with sendmail.cf A merge problem. No idea how to solve this. So tried going straight to 11.0. There was a different kind of problem (freebsd being a coward or something) and I was not allowed to move on with the update. 
Went back to 10.3 and searched for the sendmail merge problem. Found it. Had to delete a few lines on top. From there it went on well. Did the update, updated ports, upgraded the installed software. Then to 11.0. Same issue (sendmail), solved that and updated and upgraded and the last reboot. 
All looks good. Thanks for the help!


----------

