View Full Version : Has anyone managed to get Kali USB/SSD boot working in 2021?

2021-03-28, 11:06
SD card boot works fine

I feel a bit like a script oldie today

I've tried this so far
Getting custom boot files from Github as others have suggested

copying the .dat and .elf files to /boot

identifying the parition id using blikid
pi@rpi4-4:/ $ blkid /dev/sda2
/dev/sda2: LABEL="rootfs" UUID="80571af6-21c9-48a0-9df5-cffb60cf79af" TYPE="ext4" PARTUUID="eaffffff-02"

Changing cmdlines.txt
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=PARTUUID=eaffffff-02 rootfstype=ext4 rootwait rootflags=noload net.ifnames=0

even tried changing the boot USB in /boot config.txt

Still hangs in various different places

I know first boot often takes a while.....ZZZZzzzzz

2021-08-23, 19:22
Yes, doable. I guess I'll have to find the time to write it up how.
Involves first installing Raspian, updating to the proper (beta?) firmware that supports USB booting.
Then imaging the usb drive, editing /boot/cmdline.txt and /etc/fstab
Possibly stealing some of the files from the raspiab /boot folder fixup* etc. (but not the kernel)

2021-08-29, 03:36
While a good write-up with glossies and all is completed.. here is a quick write-up to get the Kali login and desktop to load:

Attempted Image: https://images.kali.org/arm-images/kali-linux-2021.2-rpi4-nexmon-64.img.xz
PI hardware is a Pi4 4GB, a test Pi, so the firmware had been updated prior to trying Kali so firmware was already updates for USB boot

Quick steps:
Burn Kali image to USB. The USB will have two partitions

I booted from raspian OS on the Pi. (since my starting machine is Windows, the second partition isn't read-able)
-- USB with Raspian is /dev/sda
-- USB with Kali appears as /dev/sdb
and I swapped over to root (because I'm lazy sometimes and tired of 'sudo' before everything)

Fix cmdline.txt
After Mount USB with Kali within other OS
-- mkdir /mnt/tmp1; mount /dev/sdb1 /mnt/tmp1
-- mkdir /mnt/tmp2; mount /dev/sdb2 /mnt/tmp2
Identify both partitions using blkid (boot and root)
-- blkid /dev/sdb
/dev/sdb: PTUUID="149c4436" PTTYPE=dos"

Edit the /mnt/tmp1/cmdline.txt
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=PARTUUID=149c4436-02 rootfstype=ext4 rootwait rootflags=noload net.ifnames=0
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 rootwait rootflags=noload net.ifnames=0

Fix fstab
Edit the /mnt/tmp2/etc/fstab (or wherever you mounted it earlier)
Replace the defined partitions pointing at the MMC (don't change anything after the mount point)
PARTUUID=149c4436-01 /boot
PARTUUID=149c4436-02 /

or just
/dev/sda1 /boot
/dev/sda2 /

Unmount the Kali USB
Remove the other raspian OS USB
Boot to Kali USB.. and get the desktop login!!!

Thank you mrg9999 for the thread.. I didn't know to change the fstab until rcfa mentioned it as a fix -- my Kali was stuck trying to boot to an emergency console.. and since root is disabled in Kali, the change to emergency console would loop trying to start the emergency console.

This may not get underlying applications/components to work, but at least you can get to the desktop and command-line to do further fixes.