Sunday 24 September 2017

Add Kali Linux + persistence (UEFI+MBR) to E2B

There is already a .mnu file for booting to a Kali ISO file in MBR mode with persistence.
E2B v1.B4+ also supports the special .isopersistdebian file extension so no .mnu file is required.
There is also a blog tutorial for a full OS install of Kali onto E2B here.

Recommended method: See also the Kali with persistence sample agFM .cfg file in the \e2b folder on the 2nd agFM partition (see here).

Here is how to get UEFI+MBR working with a persistent file using a .imgPTN file. Note that this method will replace E2B Partition 1 and 3.

Kali Linux (UEFI+MBR) with persistence

1. Use RMPrepUSB - Create a ext3 file with a volume name of 'persistence' and move the file to \_ISO\LINUX

FileName=Kali   (same name as .imgPTN file we will create in next step)
Volume=persistence   (must be lower case and exactly this name!)
Size= (whatever, e.g. 500)

2. Create a Kali.imgPTN file using FAT32 MPI Desktop shortcut and the Kali kali-linux-2017-W16-amd64.iso file (drag-and-drop). I also tested kali-linux-lxde-2017.2-amd64.iso too.

Use a recent version of the MPI Tool Kit so that it prompts you for the syslinux version number.

Enter 6 for Syslinux v6 when prompted (or 603 if suggested).

You should now have (for MBR only):

\_ISO\LINUX\kali   - on Partition 1
\_ISO\LINUX\kali.imgPTN - on Partition 1

The files must both be contiguous.

For MBR+UEFI E2B+agFM USB drives, create a new NTFS partition 3 and place the kali  file on partition 3. You must then use a file extension of .imgPTN23 instead of .imgPTN and the agFM partition 2 will still be present after switching. This means you can UEFI-boot to the agFM menu on Partition 2 and restore the E2B partition after you have finished using Kali.

\_ISO\LINUX\kali  - on Partition 3
\_ISO\LINUX\kali.imgPTN23 - on Partition 1

The files must both be contiguous.

3. Use Switch_E2B.exe to select kali.imgPTN&kali (ensure both images are detected).
Instead you can MBR boot to the E2B menu and select the kali.imgPTN file.

Windows may want to format the ext3 partition at this point, because it does not recognise it - but don't let it format it, just click Cancel!

Note: at this point, create a folder \isolinux and copy the existing \syslinux\splash.png file to the new \isolinux folder. This is so you get the Kali wallpaper for the grub boot menu. This was not required for the LXDE version.

4. Boot to Kali (first menu option) and create persistence.conf file...

The persistent 'volume' needs a persistence.conf file in it!
Boot to kali first boot menu option (do NOT use the Persistence menu entry!)
and then type following 5 lines in the Terminal shell to enable persistence - then reboot

mkdir /mnt/usb
ls /dev/sd*                                     (to see which is the USB device - normally sdb)
mount /dev/sdb3 /mnt/usb             (will always be sdx3 for 3rd partition)
echo "/ union" > /mnt/usb/persistence.conf or sudo bash -c "echo '/ union' >  /mnt/usb/persistence.conf"
umount /mnt/usb

note that on your system the USB drive may not be sdb.

5. Reboot and use 'Live System (Persistence)' menu option.

Parrot OS - error: symbol ‘grub_file_filters’ not found.

If you see this error on UEFI-booting from a .imgPTN file, it is because the grub2 version used does not understand the FAT32 filesystem that the linux files are now on.

To fix this, extract all the files from a Ubuntu x64 ISO's \EFI\BOOT folder and overwrite the files in the \EFI\BOOT folder of the FAT32 partition.

If you also want UEFI32 boot to work, repeat this using a Ubuntu or similar 32-bit ISO and copy the *.efi files over.

1 comment:

  1. yup it worked great...i had to like search for months for the grub file filter error..and finally thanks for adressing the like a charm.