# quickpkg - kernel.

## Banshee

Hi,

So my question is, is it possible to create a binary package of the kernel so I can install on multiple gentoo systems?

I have compiled the kernel with genkernel all. Now I want to do a quickpkg to build a ( binary ) package to install on the other systems.

Could anyone tell me the exact way of doing this please?

Thanks in advance,

----------

## energyman76b

after compiling all the files are in the source dir in /usr/src

just tar the thing up, copy it over, untar in /usr/src, go into the source dir, make modules_install install, you are done.

except maybe there is some special crap with genkernel - but there are lots of reasons why I don't use that 'tool'.

----------

## Banshee

That is an option. But there should be a tbz2 binary package possibility isn't it?

PS: What is the reason why you do not use that tool?

----------

## John R. Graham

Because all of the compilation work products are not part of what Portage installed and thus are not going to be part of the binary package.  In other words, you can use quickpkg but it will not preserve your compiled kernel.  The Portage package is called gentoo-sources, after all, not gentoo-kernel.

- John

----------

## Banshee

Makes sense. So in other words it is not possible to create a binary package of the compiled (genkernel)/ installed kernel?

----------

## i92guboj

 *Banshee wrote:*   

> Makes sense. So in other words it is not possible to create a binary package of the compiled (genkernel)/ installed kernel?

 

Yes. using tar as said above. Tar up /usr/src/<whatever kernel>, /boot/{system,config,vmlinuz} for <whatever kernel> and /lib/modules/<whatever version>. You could leave out the stuff under /usr/src, which is really big. But note that you will need it to compile any external driver (ati, nvidia, ntfs3g, virtuabox...).

----------

## energyman76b

 *i92guboj wrote:*   

>  *Banshee wrote:*   Makes sense. So in other words it is not possible to create a binary package of the compiled (genkernel)/ installed kernel? 
> 
> Yes. using tar as said above. Tar up /usr/src/<whatever kernel>, /boot/{system,config,vmlinuz} for <whatever kernel> and /lib/modules/<whatever version>. You could leave out the stuff under /usr/src, which is really big. But note that you will need it to compile any external driver (ati, nvidia, ntfs3g, virtuabox...).

 

he doesn't need to tar up /lib/modules or /boot - the stuff there is in the kernel dir and can be restored with make modules_install install

----------

## zyko

 *Quote:*   

> So in other words it is not possible to create a binary package of the compiled (genkernel)/ installed kernel?

 

Portage can not manage that for you, but you can create a tarball manually.

Normally, your kernel consists of the compressed kernel image (in /boot) and the modules (in /lib/modules).

For example, a kernel compiled from gentoo-sources-2.6.30-r5 would give you this structure:

```
/boot/kernel-2.6.30-gentoo-r5

/lib/modules/2.6-30-gentoo-r5/
```

Just put those in a tarball (preserving the directory structure).

Genkernel may also use an initramfs, in which case you'd have to include that too.

----------

## Banshee

Thanks for the rich info posts here. I will give it a go tonight  :Smile: 

Thanks again.

----------

## i92guboj

 *energyman76b wrote:*   

> he doesn't need to tar up /lib/modules or /boot - the stuff there is in the kernel dir and can be restored with make modules_install install

 

That he can decide. Usually it's the other way around, a binary package for the kernel will contain /boot and /lib/modules, not /usr/src/whatever. However that will only work if he is planning to build the modules in only one machine as well.

 *zyko wrote:*   

> Portage can not manage that for you, but you can create a tarball manually.

 

That's what quickpkg does anyways.

----------

