jsciamms
Posts: 44
Joined: Wed Jul 01, 2020 2:11 am

RPI4 Kali 2020 USB Boot

Wed Jul 08, 2020 1:23 am

====== UPDATE 08Jul2020 ==========

I missed a very important step. You need to copy the *.dat and *.elf files from the most recent raspberry pi firmware on github https://github.com/raspberrypi/firmware ... aster/boot.

I have added the appropriate step.

================================

I have successfully gotten Kali to boot on the pi4 4GB using USB only. To get it working, what you need to do is:

1) Download most recent Kali linux for RPI4 at https://www.offensive-security.com/kali ... rm-images/

2) Flash the image to a usb drive (USB SSD is nice, but any usb drive compatible with the RPI4 will work)

3) Copy the *.elf and *.dat files from the raspberry pi github page to use the most recent firmware.

https://github.com/raspberrypi/firmware ... aster/boot

(Also note that you must have already updated the eeprom on the raspberry pi 4 to at least the most current stable release. The beta is not necessary, but the critical release will not work. If you do not know how to do this see https://www.raspberrypi.org/documentati ... teeprom.md)

4) Modify the cmdline.txt to be as follows:

Code: Select all

dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext3 rootwait rootflags=noload net.ifnames=0
5) You must mount the root file system on a computer. If someone can find a better way of doing this, or a better process overall, please post it. You need to edit the fstab file to change the mounting points of the root directory and boot partition.

Once the file system has been mounted on your computer (ie the larger partition of the usb drive that you just imaged), open the etc/fstab file, and edit it to look like this:

Code: Select all

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults          0       0
/dev/sda1  /boot           vfat    defaults          0       2
/dev/sda2  /               ext3    defaults,noatime  0       1
6) Format an SD card, and leave it with an empty ext3 partition. Insert this SD card into the raspberry pi for the initial boot. If you do not do this you will get an error stating that MMC0 timed out.

7) Boot up, and let it run its course. Once you get to the login, the default user is kali and the password is also kali.

8) Update the system, and shutdown. Now you can remove the SD card, and you are good to go with Kali booting off just USB.

For whatever reason, and I am sure someone smarter than me will know, or can figure it out, but Kali on the RPI4 is looking for an SD card on the initial boot. I vaguely remember that USB booting on the RPI3b+ also required you to have an SD card present.

Please enjoy :D

If someone finds something that breaks this, please let me know. So far, I am several hours running and 2 updates, as well as several application installs, and there are no issues. It doesn't run as fast as I was hoping it would, but hey, its booting off USB 3, so I'll take it.
Last edited by jsciamms on Wed Jul 08, 2020 2:09 pm, edited 1 time in total.

kealanspud
Posts: 1
Joined: Mon Jul 06, 2020 12:30 pm

Re: RPI4 Kali 2020 USB Boot

Wed Jul 08, 2020 11:22 am

Hey,

I was wondering if you could help me on my project on GitHub: https://github.com/kealanspud/linux-mint-arm64
What is happening is that the boot sequence does not work with the modified init script. Please help and also :P good post.

jsciamms
Posts: 44
Joined: Wed Jul 01, 2020 2:11 am

Re: RPI4 Kali 2020 USB Boot

Wed Jul 08, 2020 1:38 pm

I’ll check it out after work today.

jsciamms
Posts: 44
Joined: Wed Jul 01, 2020 2:11 am

Re: RPI4 Kali 2020 USB Boot

Thu Jul 09, 2020 3:09 am

kealanspud wrote:
Wed Jul 08, 2020 11:22 am
Hey,

I was wondering if you could help me on my project on GitHub: https://github.com/kealanspud/linux-mint-arm64
What is happening is that the boot sequence does not work with the modified init script. Please help and also :P good post.
I'm not much of a Linux Mint user, but how did you create this setup? Have you had a working boot prior to now? Do you have an image of the previously working system?

Sn0wCr45h
Posts: 8
Joined: Sat May 16, 2020 7:37 pm

Re: RPI4 Kali 2020 USB Boot

Fri Aug 21, 2020 2:26 am

Thanks for this guide!

Was looking for something to help get Kali running on an SSD.

I've run into a few problems and was wondering if you had experience anything similar.

If I flash the Kali image onto an SSD, make the config changes you listed and boot with an empty SD formatted to EXT3 I get so far through the Kali loading process and then end up hanging on a flashing cursor. No apparent error message.

If I get a working Kali image from an install on an SD card and image it onto the SSD, then make the config changes you list I can get it to boot but I get some disk checking errors during the boot process and then a complaint about SDHCI register dump, then waiting for hardware command interrupt, hit escape and it carries on booting... It does get into the OS though and feels super smooth once it's there, but there's defiantly some errors and I think it purely because it wasn't installed directly onto the SSD.

Running this on a Pi 4 8GB & the SATA to USB chipset is known to be supported.

Return to “Other”