MBR-boot from a Debian\Kali ISO with persistence (E2B v1.B4 and later)

Note: For earlier versions of E2B (up to v1.B3) you must use a .mnu file (see the \_ISO\docs\Sample mnu Files\Linux folder for examples).

This example is for Kali but should work with most Debian-based LiveCD ISOs which use a volume label of 'persistence' for their persistent filesystem and a 'persistence.conf' file.

For UEFI and MBR booting with persistence, see here.

MBR-boot + persistence from ISO

1. Copy your Debian-based Linux LiveCD ISO to a menu folder such as \_ISO\LINUX.

2. Rename the file so that it looks nice as a menu entry (it can contain spaces and parentheses). Ensure the file name does not contain any dots (otherwise the -rw persistence file will be displayed as a menu item in the E2B menu but it is not actually bootable).

Change the file extension of the .iso file to .isopersistdebian  (or .isopersistdebian64 if it is for 64-bit systems only).

e.g. Kali 2019 v2 amd64.isopersistdebian

3. Click on \_ISO\_Make_Ext.bat to make an ext3 persistence file of the required size. 

  • The persistence file must have exactly the same name as the ISO but with -rw at the end and it must have no file extension (no dot in the name). 
  • The persistence file must saved to the root of the E2B drive or to the same folder as the .isopersistdebian file.
  • Use ext3 and a volume name of 'persistence'.

You should now have these two files on the E2B drive:

  • \_ISO\LINUX\Kali 2019 v2 amd64.isopersistdebian
  • \_ISO\LINUX\Kali 2019 v2 amd64-rw

4. Boot to the E2B menu system and select and run the .isopersistdebian file.

If the -rw persistence file cannot be found or if it does not have a volume name of 'persistence' you will be warned. In this case, fix the problem before continuing.

For the first boot, you should expect to see a warning message similar to 'WARNING: persistence.conf is not present in xxxxxx-rw'.

5. Continue and choose the 'Live USB Persistence' menu option...

6. Run a Terminal session (click on square black icon with $ sign) and make a persistence.conf file on the new 3rd partition of the USB drive.

In the example below, the USB drive is sda but on a real system it will be sdb or sdc, etc.

Note that some versions may require you to use:

sudo bash -c "echo '/ union' > /mnt/usb/persistence.conf"

7. Now shutdown and reboot linux again using the same 'Live USB Persistent' menu option.

There should be no warning message from E2B.

To test that persistence is working, type df in a terminal session, you should see the persistence volume listed as /run/live/persistence

If you make any changes now (except for kernel updates) they should be persistent.

 

LUKS encryption

You can use a LUKS encrypted volume if the menu option is present, but it requires some additional commands.
This example assumes sdb is the E2B drive...
 
  • cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb3
  • cryptsetup luksOpen /dev/sdb3 my_usb
  • mkfs.ext3 -L persistence /dev/mapper/my_usb
  • e2label /dev/mapper/my_usb persistence
  • mkdir -p /mnt/my_usb
  • mount /dev/mapper/my_usb /mnt/my_usb
  • echo "/ union" > /mnt/my_usb/persistence.conf
  • umount /dev/mapper/my_usb
  • cryptsetup luksClose /dev/mapper/my_usb
 

Use the 'Encrypted Persistence' boot option in the menu.

# OR for LUKS Encryption use:
 
#    cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb3
#    cryptsetup luksOpen /dev/sdb3 my_usb
#    mkfs.ext3 -L persistence /dev/mapper/my_usb
#    e2label /dev/mapper/my_usb persistence
#    mkdir -p /mnt/my_usb
#    mount /dev/mapper/my_usb /mnt/my_usb
#    echo "/ union" > /mnt/my_usb/persistence.conf
#    umount /dev/mapper/my_usb
#    cryptsetup luksClose /dev/mapper/my_usb