# make installkernel errors



## Mani H. (Aug 8, 2017)

Hi,

I'm trying out FreeBSD 11.1-RELEASE amd64. Fresh install and without any update I'm trying to follow the instruction from http://www.wonkity.com/~wblock/docs/html/buildworld.html to build and install world with custom kernel.

I created my custom kernel by following http://www.wonkity.com/~wblock/docs/html/kernelconfig.html from GENERIC.

Reason for building and installing the world is to remove:

binutils which mainly I want to remove ld and use lld instead.
Removing GAMES, EXAMPLES, NLS, ...
Removing Debugging tools (this is going to be production/home ;-) server and I don't really need them).
/etc/src.conf

```
// Want to have [FILE]lld[/FILE] instead of [FILE]ld[/FILE]
WITH_LLD=yes
WITH_LLD_IS_LD=yes
WITH_LLD_BOOTSTRAP=yes
WITH_LLVM_LIBUNWIND=yes

WITHOUT_BINUTILS=yes
WITHOUT_BINUTILS_BOOTSTRAP=yes

// These are what I have concerns about. My custom kernel doesn't include these
// as well
WITHOUT_BHYVE=yes
WITHOUT_DTRACE_TESTS=yes
WITHOUT_HYPERV=yes
WITHOUT_KDUMP=yes
WITHOUT_KERNEL_SYMBOLS=yes

// Since it is going to be a server, I want it to remove these as they are not need. I have them in
// my desktop
WITHOUT_GAMES=yes
WITHOUT_EXAMPLES=yes
WITHOUT_SHAREDOCS=yes
WITHOUT_DOCCOMPRESS=yes
WITHOUT_DICT=yes
```
Following the instruction from wonkity, everything goes good without any error until I execute:
`make installworld KERNCONF=CUSTOM`

This ends with so many errors like:

```
kldxref: error while reading /boot/kernel/libmchain.ko: Bad address
kldxref: error while reading /boot/kernel/linprocfs.ko: Bad address
kldxref: error while reading /boot/kernel/linsysfs.ko: Bad address
kldxref: error while reading /boot/kernel/mfi_linux.ko: Bad address
kldxref: error while reading /boot/kernel/mmcsd.ko: Bad address
kldxref: error while reading /boot/kernel/mrsas_linux.ko: Bad address
kldxref: error while reading /boot/kernel/msdosfs_iconv.ko: Bad address
kldxref: error while reading /boot/kernel/mvs.ko: Bad address
kldxref: error while reading /boot/kernel/mxge_eth_z8e.ko: Bad address

... // Many more (Please let me know if you want me to post more)
```
I've never seen these error during install kernel and I was wondering someone can help me to fix these.

Thank you,


----------



## jef (Aug 9, 2017)

OK, first off, those instructions are from 2011-2013. Please read and follow https://www.freebsd.org/doc/handbook/makeworld.html

Secondly, you should be able to only install the portions of the release you want during the install process. Installing "world" _over _the existing system isn't going to remove anything, at least as far as I know.

These days the GENERIC kernel is pretty compact and efficient. Unless you need something that can't be _loaded _into the GENERIC kernel, dealing with a custom kernel isn't worth it for "home use" in my opinion.

I'm not sure that I'd use lld by _removing _ld until that is done in the core FreeBSD release, as delivered. Run-time or compile-time options, environment variables, and/or symlinks are much safer options for what is still experimental software. There are instructions on how to do this at https://wiki.freebsd.org/LLD


----------



## Mani H. (Aug 9, 2017)

jef Thanks for your reply. I looked at the link that you posted. The steps are the same as wonkity with more details, but you are correct it has most recent change / information. Regarding `lld`, in my understanding, that instruction is for before FreeBSD 11.1, since the source for FreeBSD 11.1 contains `lld` code. But agreed about experimental part.


----------

