# System down after freebsd-update



## noobster (Nov 25, 2008)

I ran freebsd-update to fix the latest security vulnerability in the base system on my FreeBSD 7.0 amd64 server, which is hosted in a data center. After a reboot, the system never came back online. The support people told me that the updated kernel reboots itself just after the boot process starts.

Does anyone know what could have gone wrong? Is it likely to be a hardware related problem? Is it possible to somehow boot the old kernel?

Thanks for your help!


----------



## Kitche (Nov 25, 2008)

yes you can boot the old kernel by moving /boot/kernel.old back to /boot/kernel or by using the boot manager and putting in the correct options(handled in the handbook) and making the old kernel boot that way.


----------



## noobster (Nov 25, 2008)

Thanks for your prompt response. The problem is that freebsd-update doesn't seem to create /boot/kernel.old, so that makes it rather difficult to put it back. At least this is the case on my other systems where I applied freebsd-update.


----------



## anomie (Nov 25, 2008)

@noobster: Have one of the datacenter operators run: 
*# freebsd-update rollback*

Hopefully that will get the system to a bootable state again. From there you can try to diagnose what happened.


----------



## noobster (Nov 25, 2008)

I don't think the system boots to a command prompt, but I asked the operators to make sure. If this doesn't work, then it's not looking good. This is the first time FreeBSD is giving me problems like this (although a hardware issue is possible). But it's just unlucky that it's exactly the data center server of all the servers I maintain. Murphy's law I guess.


----------



## anomie (Nov 25, 2008)

AFAIK, freebsd-update doesn't make a backup of the kernel, so if you do not have an old kernel (created manually or during a previous kernel build/install) sitting around, I am not sure what to suggest. 

I am sure you already know what to do if there _does_ happen to be a backup kernel: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-trouble.html

This sounds hairy. Good luck & keep us posted.


----------



## noobster (Nov 25, 2008)

The rollback was indeed not possible. I think I learned my lesson of always keeping an old kernel as a backup. I'm somewhat surprised that freebsd-update doesn't back it up automatically, but it was of course my responsibility to check that beforehand.

Thanks for your replies!


----------



## marius (Nov 25, 2008)

Oh, that's bad news 

You're not the only one being surprised that freebsd-update doesn't take a backup of the kernel.


----------



## komeylian (Dec 2, 2008)

hi noobster

I think your machine not update correctly, please follow below procedure, 

first better to update your source by latest changes, your cvsupfile should be alike 



> *default host=cvsup.uk.FreeBSD.org
> *default base=/var/db
> *default prefix=/usr
> *default release=cvs
> ...





> # csup -g -L 2 /etc/cvsupfile



now you should compile source and kernel : 




> # cd /usr/src
> # make buildworld
> # make buildkernel KERNCONF="your custom kernel name otherwise GENERIC"
> # make installkernel KERNCONF="your custom kernel name otherwise GENERIC"
> ...





> # fsck -p
> # mount -a
> # cd /usr/src
> # mergemaster -p
> ...



be happy.


----------



## cajunman4life (Dec 2, 2008)

komeylian said:
			
		

> hi noobster
> 
> I think your machine not update correctly, please follow below procedure



Some people prefer to use the binary-only method that is available through freebsd-update. Telling someone to build from source instead is a good work-around, but doesn't address the problems he's reporting.


----------

