AIO Boot NewGen has an entry for Ubuntu and Debian called Linux Persistent Partition Mode, which this article is about.

AIO Boot NewGen offers an option called Persistent Mode for Ubuntu and Debian, but it is a partition image file, not a real partition. Using a partition image file gives poor performance, moreover, Ubuntu currently does not support Persistent files placed on NTFS formatted partitions. Using Persistent Mode in Real Partition mode overcomes these limitations.

One disadvantage that I noticed when using Real Partition is that this Partition can be used by many different distributions. For example, if you have an EXT2/3/4 partition labeled casper-rw, both Ubuntu and Linux Mint will use this partition.

Grub2 Settings

Grub2 -> Settings -> Linux Persistent Partition Mode. Here you will see two entries Ubuntu and Debian (Disabled). To “Enabled” one of these entries, the script checks to see if you have created a partition that matches the requirements. This is to ensure that booting these distributions is free of associated problems.

Ubuntu Debian Persistent Partition Mode

The above only applies to distributions that have selected “Don't Use” in the Persistent Mode option at Drag and Drop the ISO file into the tool. The tool adds a reserve variable to the kernel parameter, which defaults to nothing, when the above entries are enabled the script will set the value for this variable to persistent (Ubuntu) and persistence (Debian).

How to create a Persistent partition?

A created Persistent partition must be considered valid for the distribution you want to use. Here are the steps I use GParted to create new partitions on USB.

How to create a Persistent partition

If you do the partitioning on the USB, you should boot into Ubuntu or Debian directly from the ISO file through the File Manager. The ISO file must be located on a different partition than the one on which you will perform the resizing. Or resize the partition on Windows first. Mounted partitions cannot be resized with GParted.

Ubuntu (read more at LiveCD/Persistence):

  1. Resize the existing partition to get the unallocated size that you want to use to create the new partition.
  2. Move the FAT32 partition forward. As far as I know, some systems don’t support booting in UEFI mode if the FAT32 partition is placed after the EXT4 partition.
  3. Finally, create a new partition in Ext3 or Ext4 format, set the Label as casper-rw.

Debian (read more at LiveUsbPersistence):

  1. Resize the existing partition to get the unallocated size that you want to use to create the new partition.
  2. Move the FAT32 partition forward. As far as I know, some systems don’t support booting in UEFI mode if the FAT32 partition is placed after the EXT4 partition.
  3. Create a new partition in Ext3 or Ext4 format, set Label as persistence.
  4. At the root of this new partition, create a new file named “persistence.conf” with the content “/ union“.
    # mount /dev/sdxY /mnt
    # cd /mnt
    # echo "/ union" > persistence.conf
    # sync
    # umount /dev/sdxY

Once the appropriate partition has been created, the entry in Grub2 above can be Enabled.

If you love Ubuntu, maybe you should try installing Ubuntu on USB with WubiUEFI, this method is better to use the full functionality of Ubuntu.

Join the Conversation

4 Comments

Your email address will not be published. Required fields are marked *

  1. Through experimentation The problem was setting the root.
    Here is what I came up with.
    ### Start \AIO\Linux\linuxmint-21.1-cinnamon-64bit
    set extract_path=”/AIO/Linux/linuxmint-21.1-cinnamon-64bit”
    export extract_path

    menuentry “Start Linux Mint 21.1 Cinnamon 64-bit debug” –class linuxmint {
    set gfxpayload=keep
    set root=(hd0,msdos2)
    linux ${extract_path}/casper/vmlinuz file=/cdrom${extract_path}/preseed/linuxmint.seed boot=casper live-media-path=${extract_path}/casper/ floppy.allowed_drive_mask=0 ignore_uuid $UbuntuPers quiet splash —
    initrd ${extract_path}/casper/initrd.lz
    }
    menuentry “Start Linux Mint 21.1 Cinnamon 64-bit (With Persistence File)” –class linuxmint {
    set gfxpayload=keep
    set root=(hd0,msdos2)
    linux ${extract_path}/casper/vmlinuz file=${extract_path}/preseed/linuxmint.seed boot=casper live-media-path=${extract_path}/casper/ persistent persistent-path=${extract_path}/ cdrom-detect/try-usb=true noprompt floppy.allowed_drive_mask=0 ignore_uuid quiet splash —
    initrd ${extract_path}/casper/initrd.lz
    }
    menuentry “Start Linux Mint 21.1 Cinnamon 64-bit (Persistence nocpi)” –class linuxmint {
    set gfxpayload=keep
    set root=(hd0,msdos2)
    linux ${extract_path}/casper/vmlinuz file=/cdrom${extract_path}/preseed/linuxmint.seed boot=casper live-media-path=${extract_path}/casper/ persistent persistent-path=${extract_path}/ floppy.allowed_drive_mask=0 ignore_uuid $UbuntuPers apci=off nopci quiet splash —
    initrd ${extract_path}/casper/initrd.lz
    }

    1. First make sure you have the writable file in the extract_path.
      You can then set root using the search command.

      search -s -f ${extract_path}/casper/vmlinuz
      OR
      search -s -f ${extract_path}/writable

      But why do you have to do this manually? In the Add ISO tab, why don’t you select the FAT32 drive in the Add To section before dragging and dropping the ISO file so that the tool does this automatically for you?

      1. It didn’t occur to me, that this was possible. I was blind to it. Thanks for correcting me. Maybe I was too use to the older version. lol

  2. Hi, I need your help again. Using your older version, I can get a persistence file to work on fat32 with linux mint. But the new version forces me to use NTFS, which I actually prefer, but to get the Mint to work it needs to be on the Fat32 partition. I’m pointing to the 2nd partition, in the config file with (hd0,msdos2) on all links. As the linux is halfway loaded, it fails to find some file system part. and goes to console.

    The reason I’m using file over partition, is for the reason you mentioned, that other ubuntu based repair tools, conflict and fail to load what was made by mint. So file based keeps it private.

    Could you give me the necessary working config, for the menu to point to the fat32 UFEI partition(2nd) to successfully boot mint, with the persistence working.

    Thanks for all your help.