PDA

View Full Version : Persistence not working on Kali Linux Live USB - Mac OS High Sierra



benno401
2018-05-02, 15:39
Hello,

I hope this finds you all well. I'm new to Kali Linux so please bare with me. I do have a bit of knowledge of terminal however.

I have created a Kali Linux Live USB using Mac Linux USB Loader. I used a clean 32Gb Sandisk USB stick and i'm operating a Mac with OSX High Sierra.

I have followed numerous tutorials which are pretty similar and the Live USB i created seems to work fine. I have not been able to try out all the applications or with it connected to a network yet but thats not why i'm posting as i want to get persistence working before going down those routes.

During set up I created an initial partition called Kali Linux and gave it 10Gb space (MSDOS(fat)). Using Mac Linux USB Loader i put kali-linux-2018.2-amd64.iso. After that i went into the Advanced USB setup options and edited the enterprise configuration file by putting persistence at the end of Kali.

On rebooting and holding the option key i'm greeted with the options to go back into my MacOS or use EFI. I click EFI and then given 2 options. One is to boot into Kali Linux and the other is the same but with more advanced options. Going into option 2 is where i can find an option (option 5) to boot using some sort of reference to persistence. In option 2, there are around 7 options in all. I have attached an image of these setting, hopefully you'll be able to see it.


Question 1: Why am i not getting the standard blue Kali Linux Boot Menu that everyone else seems to get (pictured) where I can boot into Live USB persistence?
https://i.stack.imgur.com/2SsgP.png

When i click either option 1 or 2 i'm presented with these errors;

Welcome to GRUB


error: file ‘/boot/grub/x86_64-efi/zfs.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/xsf.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/ufs2.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/ufs1_be.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/ufs1s.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/udf.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/squash4.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/sfs.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/romfs.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/reiserfs.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/procfs.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/odc.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/ntfs.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/nilfs2.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/newc.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/minix_be.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/minix3_be.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/minix3.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/minix2_be.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/minix.mod’ not found.
error: file ‘/boot/grub/x86_64-efi/jfs.mod’ not found.

Question 2: What are these errors (i am not familiar with GRUB yet so apologies on that?
After these have been displayed it seems to successfully load into Kali Linux.

I can then see 2 drive partitions on the Desktop, one of which is my persistence partition containing my persistence.conf file.

I have followed the tutorials for the terminal commands to set up persistence being;
mkdir -p /mnt/my_usb (and i've tried just usb)
mount /dev/sdb3/mnt my_usb
echo "/ union" > /mnt/my_usb/persistence.conf
umount /dev/sdb3

I then reboot. I have tried going through the various options in the boot menu to get back to the Kali Linux Desktop, each successfully. However my persistence partition icon is still on the desktop containing my persistence.conf file. I then create a folder on the desktop, reboot and its gone when i return and not saved like it should be.

Question 3: Having followed all tutorials exactly and having what seems a working USB Live drive (bar those errors in GRUB), where am I going wrong with the persistence?.....or is it something else?

I thank you in advance for helping me out and i apologise if i have missed anything out or not met any posting requirements. Have a good one :)

frodomo
2018-05-05, 01:48
Hi!

I didn't quite understand how you created the partition for the persistence.
I enabled the persistance on my live USB and basically what I did is create an unallocated partition behind the the partition that hold the kali system on my USB.
Then when I booted on the live USB I created the ext4 partition and the persistence conf file.

As for the grub errors, I might be saying wrong but probably the GRUB you have does not support EFI (personnally I cannot boot on the Kali USB if I'm on secure boot, I have to switch to legacy)

benno401
2018-05-05, 07:40
Hi Frodomo, thanks for replying. Its really bizarre.
Like i said, i seem to have a working Live USB and what seems to be a persistent partition containing a persistence.conf file. I’ve created the live persistence in several different ways previously.
I’ve created the persistence in disk utilily alongside the Kali partition. I’ve also created it with Gparted whilst in Kali. Two options that are on tutorials.
When i go through the mount/demount process for dev/sdb3(my persistence partition), it clears the persistence partition disk off the desktop as it should, however when i boot back in its back again.
Im just wondering if it does indeed have anything to do with those errors or the possible need to switch to legacy which ive never tried.
What seems to be a pretty simple operation is turning out to be a bit of a bind. Perhaps my Macbook just isn't a fan of the idea of pentesting!

benno401
2018-05-05, 07:53
I’ll give it a go on ext4 as well as mine is currently on ext3. I can’t see if it’ll make a difference but other than trying to fix it with a hammer, I’m out of ideas.
Also does a late 2013 Mac still have legacy mode? I thought it was just UEFI! Not sure how to boot into it that way.
Thanks again mate.

eversor
2018-05-05, 17:17
this is my method that works every time unless you make a typo or miss a step

DOWNLOAD LATEST KALI FROM KALI WEBSITE

PREP USB OR SD CARD:


open disk utilities
hit ERASE
select GUID + JOURNALED and name it KALI


when complete


select main drive (eg skandisk) hit partition


press the + button and make the new large partition GUID + JOURNALED and name it PERSISTENCE


press the + button and make the new small partition GUID + JOURNALED and do not name it this will auto give it the label - UNTITLED


select kali partition and make it FAT32, select persistence partition and make it FAT32
hit apply


open mac linux usb app > double click create usb > select downloaded file. hit start


wait


once returned complete, goto usb advanced > edit file > add persistence after kali


reboot into a seperate kali os


open gparted
select correct drive
select persistence partition
unmount partition
format to ext3
label persistence


boot into live persistence usb


open terminal
do
e2label /dev/sdb3 persistence
mkdir -p /mnt/my_usb
mount /dev/sdb3 /mnt/my_usb
echo “/ union” > /mnt/my_usb/persistence.conf
umount /dev/sdb3


update headers


sudo apt-get install linux-headers-$(uname -r)


sudo apt-get update && sudo apt-get upgrade


wait for hours!!!

benno401
2018-05-06, 13:22
Thanks @eversor, I’ll give it a go using the steps you suggest. Any difference could make the difference. I appreciate the input