LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (http://www.linuxquestions.org/questions/%2Absd-17/)
-   -   FreeBSD: reverting to previous kernel (http://www.linuxquestions.org/questions/%2Absd-17/freebsd-reverting-to-previous-kernel-4175429007/)

Kropotkin 09-25-2012 04:05 PM

FreeBSD: reverting to previous kernel
 
Hi all,

I built a custom kernel on my FreeBSD 8.2-RELEASE server and it failed to boot. I'd like to revert to the previous kernel.

I see the following directories in /boot:

Code:

kernel
kernel.OK
kernel.old
kernel.old1

If I simply copy kernel.OK to kernel will this be sufficient?

For the sake of clarity: I have figured out how to reboot the old kernel; now I would like to make the reversion permanent.

Thanks.

jmccue 09-25-2012 04:55 PM

It should, assuming kernel.old is the previous one. Check this out for a bit more details:
http://www.freebsd.org/doc/en_US.ISO...g-trouble.html
not much help now :), but in the future I would save the kernel originally installed under a name you know means something to you.

Regards
John

Kropotkin 09-26-2012 01:32 AM

Thanks. I actually checked the Handbook before posting here, but missed that bit.

Perhaps you will know the answer to a relate question. The kernel config file I was using didn't boot, so I went back to GENERIC. The modules igb and bce returned compile errors, so I commented them out. However, I don't know what module failed here:
Code:

/usr/src/sys/modules/netgraph/atm/uni/../../../../contrib/ngatm/netnatm/sig/sig_party.c: In function 'uni_sig_party':
/usr/src/sys/modules/netgraph/atm/uni/../../../../contrib/ngatm/netnatm/sig/sig_party.c:916: internal compiler error: in symbol_marked_for_renaming, at tree-into-ssa.c:548
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
*** Error code 1

Stop in /usr/src/sys/modules/netgraph/atm/uni.
*** Error code 1

Stop in /usr/src/sys/modules/netgraph/atm.
*** Error code 1

Stop in /usr/src/sys/modules/netgraph.
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1

I can't find either "netnatm", "netgraph", "atm", or "ngatmin" in GENERIC. Any ideas?

vermaden 09-26-2012 01:40 AM

Quote:

Originally Posted by Kropotkin (Post 4789190)
Hi all,

I built a custom kernel on my FreeBSD 8.2-RELEASE server and it failed to boot. I'd like to revert to the previous kernel.

Everytime You want to try a new kernel just type nextboot -k NEWKERNEL. This way if it does not boot, You system will boot the old working kernel on the next boot.

Quote:

Originally Posted by Kropotkin (Post 4789190)
I see the following directories in /boot:

Code:

kernel
kernel.OK
kernel.old
kernel.old1

If I simply copy kernel.OK to kernel will this be sufficient?

For the sake of clarity: I have figured out how to reboot the old kernel; now I would like to make the reversion permanent.

This would do:
Code:

cd /boot
mv kernel faulty
mv kernel.OK kernel

Also when building new kernel do it like that:
Code:

# make buildworld kernel KODIR=/boot/NEWONE
This way You will not 'mess' the old one to /boot/kernel.old directory.

... about Your conpilation error, try with this one:
Code:

# make buildworld kernel KODIR=/boot/NEWONE
Sometimes make buildworld is mandatory for make kernel | make buildkernel steps.

jmccue 09-26-2012 05:07 PM

Quote:

Originally Posted by Kropotkin (Post 4789459)
I can't find either "netnatm", "netgraph", "atm", or "ngatmin" in GENERIC. Any ideas?

Sure you are on GENERIC (uname -a) ? Maybe check /boot/loader.conf and /etc/rc.conf, try to comment out similar entries and see if that helps.

John


All times are GMT -5. The time now is 10:24 PM.