/
Patching Debian 11 and 12 iso images to be Xen HVM compatible

Patching Debian 11 and 12 iso images to be Xen HVM compatible

The Debian 11 and Debian 12 iso images have an installer that can crash when started in a HVM configured Xen virtual machine.

Here is a small tutorial how to patch the iso image to be installable. You need a linux environment and need to have the xorriso and initramfs-tools packages installed.

 

  1. Mount the original iso.

    mkdir CD sudo mount -o ro -t iso9660 debian-11.0.0-amd64-netinst.iso CD

 

  1. Copy the initrd.gz file that needs to modification to your local folder.

    cp -p CD/install.amd/initrd.gz .

 

  1. Unmount the iso again.

    sudo umount CD

 

  1. Extract the initramfs directory.

    sudo unmkinitramfs initrd.gz initramfs

 

  1. Edit the start-udev script.

    sudo vi initramfs/lib/debian-installer/start-udev

Comment out following line:

udevadm trigger --action=add

Change it to following and save:

#udevadm trigger --action=add

 

  1. Re-pack the initrd.

    cd initramfs find . | sort | sudo cpio --reproducible --quiet -o -H newc > ../newinitrd cd .. gzip -v9f newinitrd

 

  1. Create the patched installation iso.

    cp -p debian-11.0.0-amd64-netinst.iso debian-11.0.0-amd64-xenhvm-netinst.iso xorriso -dev debian-11.0.0-amd64-xenhvm-netinst.iso -boot_image any keep -map newinitrd.gz /install.amd/initrd.gz

     

  2. Clean up (optional).

    sudo rm -r initramfs newinitrd.gz initrd.gz

 

This tutorial is based on a post from the debian-user list:
https://lists.debian.org/debian-user/2021/08/msg01339.html

 

 

Related content

If you need scheduled remote assistance, you can request our on-demand support services: https://www.beronet.com/support