Software⏱️ 4 min read📅 2026-06-15

How to Fix: live-build error: cp: cannot stat 'chroot/boot/vmlinuz-*': No such file or directory

live-build error: cp cannot stat chroot/boot/vmlinuz-*: No such file or directory. Fix by adding vmlinuz to apt repos.

Quick Answer: Add the 'vmlinuz' package to your sources.list file, specifically under non-free-firmware, to resolve the issue.

The 'live-build error: cp: cannot stat 'chroot/boot/vmlinuz-*': No such file or directory' issue is encountered by users who are creating custom live Debian installations using live-build. This error occurs when live-build fails to find the vmlinuz file in the specified location during the boot process.

This error can be frustrating as it prevents the successful completion of the live build process, resulting in an incomplete or unbootable live image. However, by following the steps outlined below, users should be able to resolve this issue and successfully create their custom live Debian installations.

💡 Why You Are Getting This Error

  • The primary reason for this error is that the 'chroot' directory in the live-build configuration does not contain a valid vmlinuz file. This can occur if the 'linux-image' package is not properly configured or if the 'vmlinuz' file is missing from the 'chroot/boot' directory.
  • Another possible cause of this error is that the 'deb cdrom' entry in the sources.list file is commented out, which prevents live-build from accessing the Debian installation media and copying the necessary files to the 'chroot' directory.

🚀 How to Resolve This Issue

Resolving missing vmlinuz file

  1. Step 1: To resolve this issue, ensure that the 'linux-image' package is properly configured in your live-build configuration. This can be done by verifying that the 'linux-image' package is installed and up-to-date. You can do this by running the following command: `dpkg -s linux-image | grep Architecture`. If the output indicates that the package is not available for your architecture, you may need to install a different version of the package.
  2. Step 2: Next, ensure that the 'vmlinuz' file exists in the 'chroot/boot' directory. You can do this by running the following command: `sudo cp /boot/vmlinuz- chroot/boot/`. Replace `` with the actual version number of your kernel.
  3. Step 3: Finally, verify that the 'deb cdrom' entry in your sources.list file is uncommented and points to the correct Debian installation media. You can do this by running the following command: `sudo nano /etc/apt/sources.list` and look for the line starting with 'deb http://'. Make sure it is uncommented and correctly formatted.

Resolving missing deb cdrom entry

  1. Step 1: If you have uncommented the 'deb cdrom' entry in your sources.list file but still encounter this error, try commenting out the line and then running `sudo lb rebuild` to see if it resolves the issue. If it does, you can then uncomment the line and try building again.
  2. Step 2: Alternatively, you can try manually copying the necessary files from the Debian installation media to the 'chroot' directory. You can do this by running the following command: `sudo cp /media/debian-installer/chroot/boot/vmlinuz-* chroot/`. Replace `/media/debian-installer` with the actual mount point of your Debian installation media.

✨ Wrapping Up

By following these steps, users should be able to resolve the 'live-build error: cp: cannot stat 'chroot/boot/vmlinuz-*': No such file or directory' issue and successfully create their custom live Debian installations.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions