First of all, set keeptemp and keepwork FEATURES in /etc/make.conf; so that Bacula compilation leave behind temporary directories intact with their whole contents.
Then
emerge bacula
At this point mount /boot, Bacula will search there a kernel in vmlinuz format, so let’s discover which is the exact kernel version:
uname -r
2.6.12-gentoo-r9
create now the corresponding symlink, using the information above:
ln -s /boot/kernel-genkernel-x86_64-2.6.12-gentoo-r9
/boot/vmlinuz-2.6.12-gentoo-r9
Now that /boot contains the needed link we are still lacking three files considered as standard. They are present in other Linux distibutions, so Bacula expect them to exist and exit if fail to found them (this step is required once, even if we build several CDs with different kernel and Bacula versions):
touch /etc/hosts.deny
touch /etc/hosts.allow
touch /etc/sysconfig
Change dir to the folder: /var/tmp/portage/bacula-1.36.3-r1/work/bacula-1.36.3/rescue/linux/cdrom
The scripts to assemble the ISO are all there, we just have to call make
make all
Make script will work a bit, and then, if everything is ok, a file called bootcd.iso will be created in /var/tmp/portage/bacula-1.36.3-r1/work/bacula-1.36.3/rescue/linux/cdrom
Now burn it to a CD, or copy it elsewhere.
Remember to put back original FEATURES in /etc/make.conf;
umount boot
and
rm /var/tmp/portage/bacula-1.36.3-r1 -fr
That’s all.