Custom kernel build for 8.2-RC3

Info about find:

Code:
[root@gw-151-143 /usr/home/kris]# df -h
Filesystem            Size    Used   Avail Capacity  Mounted on
/dev/mirror/gm0s1a    284G     56G    205G    21%    /
devfs                 1.0K    1.0K      0B   100%    /dev

Code:
[root@gw-151-143 /usr/home/kris]# find / -name kernel
/boot/kernel
/boot/kernel/kernel
/boot/kernel.old/kernel
/boot/MYKERNEL/kernel
/usr/src/contrib/ntp/kernel
/usr/obj/usr/src/sys/MYKERNEL/kernel
/usr/ports/net/ntp/work/ntp-4.2.4p7/kernel

Code:
[root@gw-151-143 /usr/home/kris]# sysctl -a|grep kernel
kern.bootfile: /boot/kernel/kernel
kern.module_path: /boot/kernel;/boot/modules
[root@gw-151-143 /usr/home/kris]# uname -a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 #1: Mon Feb 14 20:20:52 EET 2011     root@gw-151-20.cnm.local:/usr/src/sys/amd64/compile/GENERIC  amd64
 
What is the timestamp of /boot/kernel/kernel? Does it correspond with the uname time? If you used what Phoenix advised in post #20, your updated kernel lives in /boot/MYKERNEL/, so it needs to be moved to /boot/kernel/ or it will only be used once, of course..
 
Ok. I am doing:

Code:
[root@gw-151-143 /usr/home/kris]# ls -la /boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  10440897 Feb 16 16:30 /boot/kernel/kernel

[root@gw-151-143 /usr/home/kris]# uname -a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 #1: Mon Feb 14 20:20:52 EET 2011     root@gw-151-
20.cnm.local:/usr/src/sys/amd64/compile/GENERIC  amd64

[root@gw-151-143 /usr/home/kris]# ls -la /boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  10440897 Feb 16 16:30 /boot/kernel/kernel

[root@gw-151-143 /usr/home/kris]# ls -la /boot/MYKERNEL/kernel
-r-xr-xr-x  1 root  wheel  10440897 Feb 16 19:45 /boot/MYKERNEL/kernel

[root@gw-151-143 /usr/home/kris]# uname -a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 #1: Mon Feb 14 20:20:52 EET 2011     root@gw-151-
20.cnm.local:/usr/src/sys/amd64/compile/GENERIC  amd64

[root@gw-151-143 /usr/home/kris]# rm -rf /boot/kernel

[root@gw-151-143 /usr/home/kris]#

[root@gw-151-143 /usr/home/kris]#

[root@gw-151-143 /usr/home/kris]#

[root@gw-151-143 /usr/home/kris]# mv /boot/MYKERNEL /boot/kernel

[root@gw-151-143 /usr/home/kris]# ls -la /boot/kernel
kernel/     kernel.old/

[root@gw-151-143 /usr/home/kris]# ls -la /boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  10440897 Feb 16 19:45 /boot/kernel/kernel

[root@gw-151-143 /usr/home/kris]# reboot

AND after reboot

Code:
[root@gw-151-143 /usr/home/kris]# uname -a
FreeBSD gw-151-143.cnm.local 8.2-RC3 FreeBSD 8.2-RC3 #1: Mon Feb 14 20:20:52 EET 2011     root@gw-151-
20.cnm.local:/usr/src/sys/amd64/compile/GENERIC  amd64
 
Kris said:
I am trying cvsup my /usr/src/. I am clearing /usr/obj before building kernel.

This is actually making me wonder: can one remove /usr/obj and then only build and install a kernel without first building the world?

I myself either do a full world/kernel build, or a rebuild/reinstall of the kernel based on an already existing and filled /usr/obj.

I don't think I've ever removed /usr/obj and built/installed a kernel without a world. ..

This may be why nothing ever gets updated, though I don't quite see why or why not. I guess you should try a full build (buildworld, buildkernel, installkernel, installwordl) run.

This is what I use for that:

Code:
(check out or update the source tree if you like)

# cd /usr/src
# make cleanworld && make cleandir
# rm -rf /usr/obj
# make -j 4 buildworld
# make -j 4 buildkernel KERNCONF=MYKERNEL
# make installkernel KERNCONF=MYKERNEL DESTDIR=/boot/kernel.NEW
# nextboot -k kernel.NEW/boot/kernel
# mergemaster -p

Reboot in single-user mode

# make installworld
# make delete-old
# mergemaster -U -i

Reboot.

You must run [B]make delete-old-libs[/B] from [B]/usr/src[/B] after the reboot.

You must also move the working kernel to its proper and final location when everything boots ok, i.e.
remove /boot/kernel and then move /boot/kernel.NEW/boot/kernel to /boot/
 
Thank you very much.
The Problem is SOLVED.

Problem was that at the time of building and installing the kernel on my system was DEGRADED gmirror. While at the same time, both the hard drives were connected to the computer.

I do not know why, but all this time, the system for some reason at the time of loading look data from the second removed from the gmirror HDD.

Never make and do not install the kernel on the degraded gmirror if both hard drives connected to the system.

All thanks for the help !!!
 
Back
Top