[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building an image with a custom kernel



Thank you for your information. It is really helping as you can clearly see that I'm pretty much new to all this.

To clarify, I'm trying to build the image with my custom kernel, compiled from sources. I'm achieving that by compiling it with a custom version string with make-kpkg, which is the way Kali developers compile it from what I understand (despite, afaik, being deprecated?). Then I copy the resulting package into the custom package folder of the live build system and I specify the --linux-packages option of lb config with as custom version string.

About the initramfs-tools problem, it really comes to how the command is executed: if it is run into the chroot environment, then my way should work. Otherwise, I have no idea what to do. I hope a developer can help me, in the meanwhile I'm going to try to have a look at the source code of live-build.

Cheers,
Riccardo Paolo Bestetti

On 22 mar 2016, at 1:13 AM, Michael . <keltoiboy@gmail.com> wrote:

I use the backported kernel and to do that I merely use apt/preferences to point apt to the correct kernel.
In your case you would use preferences to point apt to the kernel in kali linux's repository.

You can cache 90% of the downloads so you only download new versions of packages.

Never having had to use a hook for initramfs I can't help much there but I hope the apt/preferences and cache hints help you.
Cheers

On 22 March 2016 at 08:02, Riccardo Paolo Bestetti <riccardo.kyogre@live.it> wrote:
I found the answer by myself. I've successfully built the kernel and packaged it in deb format, and understood how to include it in my live system. I have, however, come across another problem.

I need to load a module during the boot process of the live system, and to achieve that I need to write a initramfs-tools hook. However, I'm not sure where to place it to make it run.
From what I understand, the initial ramdisk is generated during the lb build phase using the live-boot set of hooks. How can I add my own hooks to the process? Do I simply add them to the /etc/initramfs-tools/hooks/ directory in the chroot of live-build?

I'd like to apologize to you for not just trying this out directly, but I don't have much horsepower to build the system nor bandwidth to download all the packages as of now, but I must absolutely be ready for when I will.

Thank you again.
--- Riccardo Paolo Bestetti


Il 21/03/2016 10:58, Riccardo Paolo Bestetti ha scritto:
Hi everyone.
I don't really understand the building system.
Where does it take the kernel from? Does it use the currently loaded kernel? Does it recompile it from source?
I'm trying to build a custom Kali image, which uses the Debian Live system, and I need to include various kernel patches for the hardware I'm going to run it on.
Your help will be greatly appreciated!

Thank you.
Riccardo Paolo Bestetti



Reply to: