kali on raspi
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:
-
Download most recent Kali linux for RPI4 at https://www.offensive-security.com/kali … rm-images/
-
Flash the image to a usb drive (USB SSD is nice, but any usb drive compatible with the RPI4 will work)
-
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)
- Modify the cmdline.txt to be as follows:
根据根目录格式改变ext3或ext4
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
- 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:
根据根目录格式改变ext3或ext4
# <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
-
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.
-
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.
-
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
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.