# A few questions before upgrade 7.2 to 8.0



## bryn1u (Mar 3, 2010)

Hello.

I have a few questions. I bought a dedicated server but without KVM and panel. I want to upgrade ma server from 7.2 to 8.0. I found this solusion


> FreeBSD Update
> 
> The freebsd-update(8) utility supports binary upgrades of i386 and amd64 systems running earlier FreeBSD releases. Systems running 7.[012]-RELEASE, 8.0-BETA[1234], or 8.0-RC[123] can upgrade as follows:
> 
> ...



I'm afraid that after reboot a server will be not able. This solusion is that good way to upgrade freebsd ? Only this steps (in quote) should i use to upgrade freebsd or something else ?


----------



## DutchDaemon (Mar 3, 2010)

Any remote major upgrade is risky, so don't expect a "Yeah, go right ahead!" answer here (from anyone sane, that is). Any OS upgrade usually involves some work in single-user mode (not mandatory, but certainly safer, esp. with a major version upgrade), which can't be done without local access or console access. So whether you use freebsd-update or the source-based upgrade process, there are inherent risks when done 'over the wire'.


----------



## bryn1u (Mar 3, 2010)

I used `# freebsd-update upgrade -r 8.0-RELEASE` . So How can i back to the beggining. What happen if i use reboot command ?


----------



## DutchDaemon (Mar 3, 2010)

That depends on where in the upgrade process you are. I think two reboots are necessary, one with the upgraded kernel, and one with the upgraded world.

See http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html


----------



## phoenix (Mar 3, 2010)

I don't know exactly how the freebsd-update process works, whether it does things in multiple steps like a buildworld process (install kernel, reboot, install world, reboot, for example).  If it can be broken down into steps (install new kernel via freebsd-update, reboot to test kernel, install world via freebsd-update, reboot), then it can be made "remote-install safe".

To make an upgrade process "remote-install safe", you need to be able to install the new/upgraded kernel into a separate directory (/boot/kernel.new for example), then use nextboot() to instruct the loader to use /boot/kernel.new on the next reboot.  That way, if the boot fails, a simple reset of the server will cause it to boot using the normal, known-to-work kernel (/boot/kernel).

If the boot succeeds, then you know the new kernel works, and you can install the world, and rename things under /boot to use the new kernel (`cp -Rp /boot/kernel /boot/kernel.old; mv /boot/kernel.new /boot/kernel`).

Doing the above is quite simple as part of a buildworld cycle, as you can specify the kernel install directory using KODIR:  [cmd=]make KERNCONF=MYKERNEL KODIR=/boot/kernel.new installkernel[/cmd].  Hopefully, freebsd-update can be split into separate parts.


----------



## chrcol (Mar 12, 2010)

yep nextboot is a sweet feature for remote upgrading.

however I have had one situation where I was upgrading a server from 6.3 to 7.0 where the 7.0 kernel booted but the reboot after the installworld failed, most likely I made a mistake during mergemaster as I did rush through it.


----------

