# Problem with install kernel on Release 8.0



## spon (Mar 24, 2010)

Hello,
I've installed the Release 8.0 and I tried to compile and install my kernel MYKERNEL
editing GENERIC.
I followed the documentation "8.5 Building and Installing a Custom Kernel".
The system has compiled the new kernel correctly but when i enter "make installkernel KERNCONF=MYKERNEL" it gives me a following errors:


```
--------------------------------------------------------------
>>> Installing kernel
--------------------------------------------------------------
cd /usr/obj/usr/src/sys/MYKERNEL;  MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=i386  MACHINE=i386  CPUTYPE=  GROFF_BIN_PATH=/usr/obj/usr/src/tmp
/legacy/usr/bin  GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac 
PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr
/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  make KERNEL=kernel install
You must build a kernel first.
*** Error code 1

Stop in /usr/obj/usr/src/sys/MYKERNEL.
*** Error code 1

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

Stop in /usr/src.
```

Where's error?
Thanks


----------



## DutchDaemon (Mar 24, 2010)

Did you build the kernel first? It's quite an essential step.


----------



## spon (Mar 24, 2010)

Hello dutchdeamon,
i have builded the kernel before with:

*make buildkernel KERNCONF=MYKERNEL*

and it's work!

But when I enter:

*make installkernel KERNCONF=MYKERNEL*

it gives the errors above said.

Have I to do something else?
Thanks


----------



## DutchDaemon (Mar 24, 2010)

Is the ident line in that kernel config file also named MYKERNEL? That ident line determines the name of the directory in /usr/obj/usr/src/sys/.


----------



## spon (Mar 24, 2010)

Yes,
I have:

*ident  MYKERNEL*

and at "usr/obj/usr/src/sys" there is a directory named "MYKERNEL"
containing files ".o"


----------



## DutchDaemon (Mar 24, 2010)

No idea. You could try doing it in one go:

`# cd /usr/src && make kernel KERNCONF=MYKERNEL`.


----------



## spon (Mar 24, 2010)

i tried but i have the same errors!


----------



## DutchDaemon (Mar 24, 2010)

Are the object files in the MYKERNEL directory of the correct time (i.e. just a few minutes old)?


----------



## spon (Mar 24, 2010)

Yes,
there are at the correct time (today a few minutes old)

Can it depend the editing file (options, device,etc) from?


----------



## DutchDaemon (Mar 24, 2010)

If anything is wrong with options, devices or disallowed combinations thereof, the kernel _build_ will fail. A built kernel will always _install_. I've never seen this behaviour anywhere. I even tried to see what happens when you don't run buildworld first (i.e. building a kernel starting with no /usr/obj directory to begin with), and that went fine. So other than trying the whole procedure from start to finish (http://forums.freebsd.org/showthread.php?p=53974#post53974) I have no further input, I'm afraid.


----------



## SirDice (Mar 24, 2010)

My guess is that the buildkernel phase fails.


----------



## spon (Mar 24, 2010)

Maybe I understand the problem:

*filesystem /root is full*

How can i repartition "/root" to enlarge his capacity?


----------



## SirDice (Mar 24, 2010)

spon said:
			
		

> How can i repartition "/root" to enlarge his capacity?


Backup your data and repartition the slice.

How big is it? You really don't need a lot on /.

Post the output of [cmd=]df -h[/cmd].


----------



## spon (Mar 31, 2010)

Ok,
problem is fix.
I ripartitioned my hard disk and I compiled and installed my custom kernel:
it's work!


----------



## SirDice (Mar 31, 2010)

Hurray \o/


----------

