Once again: Kernel

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
Post Reply
delph23099
Posts: 6
Joined: Mon Jul 06, 2015 12:29 pm

Once again: Kernel

Post by delph23099 »

Hi there,

I seem to be the only one who tries to install a new kernel in GhostBSD; except from this I find it a very good BSD.

I tried PC-BSD, but the project got bloated with their own packaging system.

So please, could someone from the admins of this site help me to compile a new kernel?

Thank you in advance

Antonio
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Once again: Kernel

Post by ASX »

Assuming you are using one of the lastest beta, based on FreeBSD-10.1 and amd64 arch:

start downloading the source, if not already done (these are src for kernel and world):

Code: Select all

ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.1-RELEASE/src.txz
unpack the tarball, starting from '/', src should go in /usr/src

then update your system, using (be sure your /etc/freebsd-update.conf include kernel world and "src" too:

Code: Select all

freebsd-update fetch install
now goto the kernel / world src directory:

Code: Select all

cd /usr/src
Read the Makefile ,,, lot of info there, read the 'build' man page too

basically you can build the GENERIC kernel using

Code: Select all

make buildkernel
make installkernel
and you can build the world using

Code: Select all

make buildworld
make installworld
so far you will get the same kernel as already deployed with OSes base on FreeBSD-10.1, but inclusive of latest patches.

To make your own version, copy the config file:

Code: Select all

cp /usr/src/sys/amd64/conf/GENERIC /usr/src/sys/amd64/conf/MY_OWN_KERNEL
now customize your configuration as you see fit your needs, when done use the following commands:

Code: Select all

make buildkernel KERNCONF=MY_OWN_KERNEL
make installkernel KERNCONF=MY_OWN_KERNEL
FreeBSD handbook may provide additional details.

Feel free to join us on IRC at #ghostbsd ;)

Good luck!
delph23099
Posts: 6
Joined: Mon Jul 06, 2015 12:29 pm

Re: Once again: Kernel

Post by delph23099 »

Hello ASX

thanks to your help I managed to install my new slim kernel, many thanks.

Would you encourage me to rebuild world to, or should I do a portmaster -af for updating everything?

Greetings,

Antonio
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Once again: Kernel

Post by ASX »

do a buildworld without fear, it will be no much different than a kernel build.

Additionally, if you read the docs, you will find that it is always suggested to build both, they need to be always at the same version otherwise you will find that some utility doesn't work as expected.

Code: Select all

freebsd-version -k
return the version of the installed kernel

Code: Select all

freebsd-version -u
return the version of the installed world
Post Reply