I'm trying to boot Ubuntu 20.04 directly from ISO file (that is stored in my HDD) using Grub-customizer but i want to preserve my changes in persistence storage. Is there any way create persistence storage?

  • No: The .iso file is read-only.
    – user535733
    May 7, 2020 at 11:31
  • 1
    Welcome to Ask Ubuntu: You can create a file or partition labeled "writable", (in previous versions it was labeled casper-rw). This file can be maximum 4GB and you can also have a 4GB persistent home-rw file. Files should be on the root partition. Alternatively you can create a ext4 persistent partition labeled "writable", (and "home-rw" partition if you wish). You need to add a space and the word "persistent" after "--" in /boot/grub/grub.cfg. May 7, 2020 at 13:44
  • And for more details, check Ubuntu Wiki at wiki.ubuntu.com/LiveUsbPendrivePersistent . @C.S.Cameron :)
    – user.dz
    May 7, 2020 at 13:46
  • 1
    @user.dz should note that casper-rw is not working when adding persistence booting 20.04 ISO files. It has been changed to "writable" askubuntu.com/questions/1236445/… May 7, 2020 at 13:58
  • @hack tech I should also note that there are problems booting 20.04 ISO files using GRUB 2.04, you can either use GRUB 2.02 or a workaround is to run rmmod tpm before loopback loop some.iso in grub.cfg May 7, 2020 at 14:19

1 Answer 1


Booting ISO Files on HDD

Basic GRUB loopback menuentry for Booting ISOs is:

menuentry "isoname ISO" {
    set root=(hdX,Y)
    set isofile="/[path]/[name].iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile --
    initrd (loop)/casper/initrd
  • Where hdX is the disk and Y is the partition number of the ISO location.

  • [path] is the path to the ISO file, [name] is the name of the ISO file

  • Multiple ISO files are allowed, with one or more menuentrys per ISO file. (each ISO can have multiple persistent files).

  • If we want a persistent OS add the word "Persistent" to the GRUB menuentry.

  • If using a persistent partition make it ext4 and label it casper-rw for 19.10 and previous ISO files.

  • For 20.04 ISO files label the persistent partition "writable".

  • Only one persistent partition is allowed per drive,

  • If using persistent files, each ISO can have it's own persistence file(s).

  • Each ISO can have a "writable" ("casper-rw') file up to 4GB and an optional "home-rw" file up to 4GB.

  • Persistent files must be located on a FAT32 partition.

  • If more than one persistence file is used, a persistence-path must be given. Just the unique name of the persistent files folder is required. One set of files per folder.

  • Ubuntu versions 18.04 and previous use GRUB 2.02 for booting versions 19.10 and later use GRUB 2.04 for booting in UEFI mode. GRUB 2.04 has problems booting ISO files.

  • Workaround for booting ISO files in GRUB 2.04 UEFI mode is to add "rmmod tpm" to the menuentry, if booting in UEFI mode. This may give an error message in BIOS mode, ignore it.

  • If the host system is pre-19.04 GRUB 2.02 should be in use and workaround is not needed.

  • Ubuntu 20.04 comes with a File System Check every boot, it can be disabled by adding "fsck.mode=skip" to the menuentry.

  • Scrolling during boot can be disabled by adding "quiet splash".

Final menuentry may look like:

menuentry "Ubuntu 20.04 ISO" {
    set root=(hd0,3)
    set isofile="/isos/ubuntu-20.04-desktop-amd64.iso"
    rmmod tpm
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile fsck.mode=skip persistent persistent-path=/persist-1/ quiet splash --
    initrd (loop)/casper/initrd

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.