Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was looking for an easy way to manually save settings when booting from an iso-file in the hard disk with grub2, and load them the next boot; but maybe it would be easier to do a persistent boot that automatically restores the saved settings. The only info I have found talks about usb, complex tools or just ideas and plans but I haven't seen any solution. I guess this could be solved with a dedicated partition for the persistence or with a file in the same partition where the ISO files resides. I would prefer the last one because the idea of repartitioning a hard disk on a macbook with refit and dual boot doesn't thrill me.


Note: Sadi's solution is not working for me (without the first line and the file=/cdrom/preseed/ubuntu.seed parameter). Unfortunately, and according to other posts, there are many combinations possible: the casper-rw has to be on the root directory?, does it have to be in a vfat partition? the paramenters are persistent rw?, is a paramenter persistent-path needed?... and so on.

I can hardly believe there is not a single example that explains all this in a clear way.

share|improve this question
"when booting from an iso-file in the hard disk with grub2" I was unaware that you could do this. Could you edit your question to include more details about this? Thanks, and welcome to Ask Ubuntu! – Flimm Jan 29 '13 at 19:54
@flimm menuentry "Ubuntu Live 9.10 32bit" { loopback loop /boot/iso/ubuntu-9.10-desktop-i386.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-9.10-desktop-i386.iso noeject noprompt -- initrd (loop)/casper/initrd.lz } – Rinzwind Jan 29 '13 at 20:04
@fimm: It runs much faster than the live cd and than virtualization (as far as the little I have tried virtualization). Today there is a lot of info about it and several details, depending on what linux distro you want to boot. So I will send you to google for "iso booting" >"hard disk/drive" etc. For a good start, try: – Robert Vila Jan 29 '13 at 21:14
  1. Your grub2 menu entry should be something like this:

    menuentry "Ubuntu iso" {
    search --set -f "/ubuntu.iso"
    loopback loop "/ubuntu.iso"
    linux (loop)/casper/vmlinuz root=UUID=71C2-0118 iso-scan/filename=/ubuntu.iso boot=casper file=/cdrom/preseed/ubuntu.seed noprompt quiet persistent splash --
    initrd (loop)/casper/initrd.lz
  2. To have the persistent option work, all you need is a persistent file named casper-rw (size depends on your needs) which can be produced (see: or downloaded from internet (see:

share|improve this answer
Than you Sadi, but that file, casper-rw, can be produced how? and placed where? It seems that the menu entry won't use its path, right? – Robert Vila Jan 29 '13 at 20:49
I've added further info links regarding casper-rw file. The menu entry will just expect it to be at the same location as the iso file. – Sadi Jan 29 '13 at 21:01
I don't have that /cdrom/preseed/ in my iso, I have /preseed/ with 3 seed files in in. Also, I don't use the search --set -f "/ubuntu.iso" line, is it necessary for this? – Robert Vila Jan 29 '13 at 21:04
If you can successfully boot from iso, it's fine, you only need to add the persistent option there. Please also note that iso filename "ubuntu.iso" and UUID value "71C22-0118" are just examples. These menu entries can be a little different in each case. – Sadi Jan 29 '13 at 21:09
Yes, I understand and am aware of the last two things you mentioned. I'll try to make an ext3 filesystem file named 'casper-rw' (I guess that is what is all about) and place it next to the iso file, in the same dir. Thank you. I won't be able to report because the cookies won't be here next time I boot and I am not subscribed. – Robert Vila Jan 29 '13 at 21:22

After trying different combinations around Sadi's solution, the only thing that has worked for me is to place the ext2 file called casper-rw in a FAT partition (I haven't been able to boot if the file is not in the FAT partition) and the only parameter that I need to add to the menu entry in grub2's menu that already booted the iso-image is "persistent" (no reference to the FAT partition). The menu etry is like this:


menuentry 'ISO Booting - Ubuntu-64bit.iso live' { set isofile="/home/user/Desktop/ISO/Ubuntu-64bit.iso" loopback loop (hd0,3)$isofile linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile bootkbd=es console-setup/layoutcode=es persistent noprompt noeject -- initrd (loop)/casper/initrd.lz } `

The problem is that the the whole FAT partition that contains the casper-rw, ext2 file, becomes unaccesible; it can't be mounted because it's busy.

Any workarounds?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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