So, okay. If you're done with Custom Kali desktop build - chapter one, let's move on. In this piece, we start to figure out where everything goes, what's in the different directories. So it should be fun, right ?
Strap yourself into the chair, break out the candy, pizza or whatever your fancy might be, and let's get going :)
If you managed to get the live-build-config directory set up, you should have a directory in there called variant-desktop. Look on variant-desktop/package-lists, and open the file kali.list.chroot.
It should be a list of your packages, if everything worked out. If not, adjust the build script, until it works.
Notice we have a directory called includes.chroot. That directory becomes our /, so if we wanted to place something in /opt/filename, we make the opt directory, so it's full path is /live-build-config/kali-config/variant-desktop/includes.chroot/opt/filename
There's another directory we have to look at. It's in live-build-config/kali-config/common
Study this very carefully, and pay attention to what's inside. This directory is the directories and files that get included as a standard on ALL variants.
So, if we wanted to include something in /opt/, no matter what version / variant we're building it would go i /live-build-config/kali-config/common. So, if you have an /opt/ folder in live-build-config/kali-config/common/includes.chroot/opt, that content is overriding your custom content, that was placed in /kali-config/variant-desktop/includes.chroot/opt.
That's something to pay attention to. If we have content in both places, we'll get a build error, and the build stops, and trust me, it can be veeeery frustrating to sort out a bug like that.
So, now i would recommend you have a look at the content in common. Some ask, how do we change the boot splash and stuff like that. Well. Have a look at common/bootloaders/grub-pc :)
In there you'll find the splash themes Kali is using as standard. Swap them out, and you have yourself some custom graphics.
And while you're at it. Change out common/includes.binary/isolinux/splash.png too.
Normally I just change content under /live-build-config/kali-config/variant-*/includes.chroot, since it's much easier to handle. It allow me to change software depending on what version i build. It's not that often I need to include something in all versions at once, and it's much harder to debug if you're including in /common. Just some friendly advice.
Now, there's a couple of things I would suggest. If you're using samba, include the service wsdd. It can be downloaded from https://github.com/christgau/wsdd. Read the instructions, and i will tell you how to use it, and where to place the files you'll need. And why ?. Because Windows 10 doesn't use NetBios any more. If you want your hostname to be seen on a Windows network, you'll need wsdd. BUT remember, Smbd still needs NetBios for looking up it's shares, so you need to run both WSDD, SMBD and NMBD daemons, or else lookup will fail. For more on that, go check out Samba and Windows 10. and do remeber to chmod +x the wsdd service, or else it won't run :)
So, were to put these files ?
wsdd.service, copy that into variant-desktop/includes.chroot/etc/systemd/system/wsdd.service
wsdd.py, copy that to variant-desktop/includes.chroot/usr/bin/wsdd.py, and copy netlink_monitor.py and routesocket_monitor.py into variant-desktop/includes.chroot//usr/bin
And if you have a custom samba config file from my piece on Windows 10 and Samba, throw that into variant-desktop/includes.chroot//opt/conf/samba_template.conf, to use as a template for later.
I know it's a lot of work, and no, there's not an easy way to do this. It does take a little bit of work, and some trial and error, but after a couple of times, it's not hat hard any more. And as you gain a better understanding on what goes on during a build, you can start to make your own buildscripts, to simplify the process. Download a copy of the Kali handbook, https://kali.training/downloads/Kali-Linux-Revealed-1st-edition.pdf.
And, while you're at it, read the Debian Live Build Manual, https://live-team.pages.debian.net/live-manual/html/live-manual/index.en.html
Remember, Kali is build on Debian, so everything you learn about Debian applies to Kali too. Another good book, is the Debian Administrators Handbook https://debian-handbook.info/get/now/
So, if you made it to here, you should have an idea on how to start building your own custom Kali version. Try it out, and keep it simple for a start, so you can keep track on where things end up in the final iso.
Have fun :)