Boot Kali Linux with persistence

To boot from the E2B menu system (Legacy-only) with persistence you can use the .isopersistdebian file extension – see instructions here (requires both USB partition 3 and 4 to be unused).

To boot Kali with persistence via Legacy and UEFI, you can use the Ventoy menu system. See the persistence plugin page for more details.

To boot to Kali with persistence (Legacy+UEFI) in the agFM menu system, you can make partition image files (see here) OR copy and edit the kali_x64_persistent.cfg sample file (see below).

Note that with Kali, persistence does not work with a blank persistence file. It must contain a ‘persistence.conf’ file before it will be recognised.

The Ventoy website provides a variety of pre-made persistence files of different sizes and type for you (Ventoy ‘backend releases‘). The ones suitable for Kali are the ext4 persistence.dat files.

The following allows you to use agFM to legacy and UEFI-boot and there are also instructions for adding an E2B Kali+persistence .mnu file which does not require partition 3.

Instructions for adding Kali+Persistence to agFM

  1. Download your Kali ISO use the Live Boot amd64 version of the ISO – I used kali-linux-2021.1-live-amd64.iso, 2021.2 also works. (Note: kali-linux-2020.4-live-amd64.iso does NOT boot correctly – do not use!)
  2. Copy the ISO file to \_ISO\LINUX folder on partition 1 (there should be NO SPACES in the filename)
  3. Download the Ventoy persistence file and extract one of the ‘persistence_ext4_XXX_persistence.dat files (whichever size you want).
  4. Copy one of the .dat files to the root of your E2B USB drive (partition 1) and rename it using the exact same name as the ISO file but with a -rw added – e.g. \kali-linux-2021.1-live-amd64-rw
  5. Copy the \e2b\Sample agFM menu files\LINUX\kali_x64_persistent.cfg file on the second partition to \_ISO\LINUX folder on the first E2B partition (see screenshot below).
  6. Rename the .cfg file to whatever name you like
  7. Use a text editor to edit the .cfg file. You may need to change the name of the .iso and -rw persistence files. The files do not need to be in any particular folder and you can change the paths if you wish.
  8. Run the \MAKE_THIS_DRIVE_CONTIGUOUS.cmd script to make all files contiguous.

Boot to agFM (press L to jump to the Linux folder and K to jump to the kali menu entries).

You can now select and run the .cfg file.
Note: Selecting the .iso file will run Kali without persistence (the persistence menu entries in the ISO won’t work).

You may see three or four menu entries:

The first menu will only appear if partition 3 on the E2B USB drive is unused. This menu entry should not have a problem on shutdown (it does not use the findiso= kernel parameter).

The second and third menu only require partition 4 to be empty (which it always is), but some versions of Kali seem to have a problem on shutdown and you may need to hold down the power button to switch off after clicking on ‘Shutdown’.

The third menu uses the Kali menu that is in the ISO. If you want persistence then you must select the persistence menu entry:

Note: Always shutdown ‘nicely’ using the Linux Shutdown button and shutdown the Desktop GUI (or equivalent). Never just switch off the power whilst Linux is running or you may corrupt the persistence file. A corrupt persistence file can cause the Linux kernel to fail to boot (if so, remove or remake the persistence file).

Check persistence is working

In a terminal, type:

mount | grep 'persist'
df | grep 'persist'

You should see that a partition is being used for the persistent overlay.

You can check the persistence.conf file inside your *-rw file by opening it in 7Zip – then select the conf file and press F3 to view the contents.

Boot Kali+persistence without using Partition 3

If Partition 3 is already used on the E2B USB drive, then you cannot use the .isopersistdebian or some .mnu files. In this case you can add the
kali-linux-2022.2-amd64_Persistent_PTN3_NOT_USED.mnu file to the same folder as your ISO and then edit the .mnu file contents so that it contains the correct filenames for your ISO and persistence file. Look in the \_ISO\docs\Sample mnu files\Linux folder for the .mnu file.

Note that using this method, the system may hang on shutdown/restart. You should wait for all USB LED activity to stop (about 30 seconds) and then switch off.

1 thought on “Boot Kali Linux with persistence”

  1. Pingback: Boot Parrot OS with persistence – Easy2Boot

Leave a Comment

Multi-buy discount 10%

eBooks (in PDF format)

Easy-to-read eBooks are available in PDF format (each eBook is over 100 pages) – rated 4.5/5 stars.
Learn the secrets of Legacy and UEFI USB booting and then make your perfect multiboot USB drive.
E2B eBook #1 includes instructions on how to remove the E2B 5-second start-up delay blue screen.

E2B is unique in that it uses partition images which allows you to directly boot from Secure Boot images (no need to disable Secure Boot or run MOK manager or modify your UEFI BIOS).

Most eBooks are over 100 pages long, contain original content (not AI generated!) and step-by-step exercises which are suitable for both the beginner or the more experienced user.
Customer reviews are located at bottom of each eBook product page and multi-buy discounts are available when you buy more than one eBook. Please also visit RMPrepUSB.com and the E2B Forum.
Subscribe to my blog for the latest news, tips, USB boot articles and free eBook updates.