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

Please help me out with how to customize a Debian 11 ISO



Dear experts in Debian,
 
Pardon me for bothering you, but I have to turn to you for advice.

Recently, I've been struggling to customize a Debian (Bullseye) installer ISO tarball.
My intention is to embed some features and a specific kernel(5.10.x) into the ISO
tarball. Then, after deploying the debian system on a controller(amd64), I could get
a workbench system booted with the specific kernel, and with the features I specified
being installed by default.

But after days painfull working, I still couldn't figure out how to let the debian
installer retrieve and unpack the deb file of the specific kernel.

I tried to hack into the file system of Debian ISO, and to collect a lot of information
from technical blogs on the internet on the procedure of how a Debian installer booted,
and to iminate mechanism in Debian ISO. But all failed.

What I did are below:

(1) to install feature in system as default
   I need the corresponding deb files, including the installing files and their
   dependencies, I collected them under /var/cache/apt/ directory on a machine who
   is connected to the internet, and on which the required features had been installed.
   Then transfer them under their corresponding directories under pool/main/, and
   modify the index files, including Packages and Release, as well as md5sum.txt.
   
   I set the "priority" field of all features to "standard".
   
   It seemed what I had done worked.
   
(2) to install a new kernel and make the system boot with it by default
   Coming up to this item, I have never felt I made a step forward, but only stuck.
   
   I know, maybe I'm wrong, to achieve what I want, I need two images, linux-image and
   initrd. To get linux-image, I built linux kernel with "make bindeb-pkg"; and to get
   initrd, I installed linux kernel with commands "make modules_install" and "make install".
   
   With linux-image-xxx.deb, I transferred it under the directory "pool/main/l/linux-signed-amd64",
   and set index files and md5sum.txt.
   
   With vmlinuz, I used it to override the file named "vmlinuz" under install.amd/.
   
   With initrd.img-5.10.x, I compressed it with "gzip", and used it to override the file named
   "initrd.gz" under install.amd/gtk/.

    At last, I recompressed the ISO source into an ISO file, and tried to install it onto a
    virtual machine.
   
    Of course, I failed again. There is an error, "Initramfs unpacking failed: no cpio magic".


I know actions taken to substitute for the default kernel are senseless, but I have no idea about
where I should go.

If you could give some advice to help me embed a new kernel into the debian destro ISO and make
the system boot with it by default, I will appreciate it from the bottom of my heart.

Thanks for your time.

Sincerely, 

Qi Hou



Reply to: