How can I modify any of the Ubuntu images and make it boot from a USB device on a computer with UEFI?

I'm looking to modify either the 16.04 desktop image, 16.04 server image or an alternate version of 16.04.

I would like to be able to make changes to grub.cfg on the iso to add a ks file over network.

I have tried doing this in multiple different ways, but I seem to end up with an image that when DDed to a USB device (or by using Startup Disk Creator) won't boot automatically. I can manually choose an EFI file and start it by selecting the correct one on the USB - but I would like for it to work by itself.

I have tried unpacking the image, changing the one file and packing it again - but this results in an image that doesn't boot from USB. I have tried changing a single file in the image with 'ISO Master' - same result.

I'm unable to understand why changing a single file results in the image not being able to boot and any help would be appreciated.


You can use the very powerful tool live-build to create a custom ISO image of a debian based system such as Ubuntu. Modifying the GRUB should be pretty straightforward: Once you installed live build you have to redact your grub.cfg file and place it in the folder /includes.chroot/boot/grub/.

To go faster you can use first a ubuntu "seed" that will populate your live build working directory with everything you need to build a generic Ubuntu ISO. Than you can add your custom grub.cfg file where it has to be and build the image. The live-build manual is very good but it is quite "intense": Live Systems Manual

Your modification is failing because you need to "build" the whole ISO image with the modifications you made. Depending on your resources (and the amount of packages that you include in your live) it can be quite long to create the ISO

I found this manual Checking the Ubuntu documentation: LiveCDCustomization The method is different and the manual has links to other manual (like "building a Ubuntu server image") You should have a look at it.

I remember that I also tried with a GUI when i was playing around with ISO building, I cannot remember it names. I did not have that much success with it. But for a little modification it should work. I guess that you'll find it with some research: There are not hundreds of GUI like this one. Cheers

  • 1
    I appreciate your answer, but this is not what I'm looking for. I am looking to modify an existing ISO file and change as little as one file. I had a look help.ubuntu.com/community/LiveCDCustomization and it is very similar to what I have tried - this is what is not working for me - it also references Ubuntu 9.04 - I don't think it is up to date.
    – Tobias
    Feb 13 '17 at 10:43
  • I know of no easy way to make simple tweaks to an Ubuntu .iso file, since those files are created with the powerful but complex tool that kcdtv notes. If you intend to use the modified file on a USB flash drive, you could write the original .iso file to a USB drive and then modify the files on the USB drive. Using a dedicated USB-writing tool like UNetbootin or Rufus to do the initial write to the USB flash drive will probably be more reliable than using dd for this job.
    – Rod Smith
    Feb 13 '17 at 15:34
  • "but this is not what I'm looking for" I think that you did not really understood what live build is about and what you can do with it... Anyway have a look at this, i just found it: howtoforge.com/tutorial/…
    – kcdtv
    Feb 24 '17 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.