Setp 3 was updated to make sure that you are using the most current "Stable" EEPROM for the RPI4. If you do not use the updated EEPROM, them you cannot boot from USB. There is no "Critical" release with the USB booting option enabled, and the RPI4 is certainly not shipping with it enabled yet.
=========== UPDATE 05Jul2020==============
Just so everyone can get this working without an issue, once you do the initial setup on the boot partition of the USB drive, there is another step so that you do not have to manually decompress the image after each updated. This was particularly annoying with background updates, and your system would not boot after restart for no apparent reason.
So Here are the steps:
1) Download the Ubuntu image for raspberry pi 4 form the Ubuntu official website.
2) Flash the image to a USB drive (USB 3.0 SSD or UBS flash drive).
3) Download the updated firmware files from the raspberry pi github site (https://github.com/raspberrypi/firmware ... aster/boot). Copy all *.dat and *.elf files to the Ubuntu boot partition. (Overwrite the files that were previously there).
NOTE: You must have MSD Booting EEPROM flashed onto your RPI4, or else this will not work!!! See: https://www.raspberrypi.org/documentati ... torageboot
4) Decompress vmlinuz on the boot partition
Code: Select all
zcat vmlinuz > vmlinux
Code: Select all
[pi4]
max_framebuffers=2
dtoverlay=vc4-fkms-v3d
boot_delay
kernel=vmlinux
initramfs initrd.img followkernelCode: Select all
#!/bin/bash -e
#Set Variables
BTPATH=/boot/firmware
CKPATH=$BTPATH/vmlinuz
DKPATH=$BTPATH/vmlinux
#Check if compression needs to be done.
if [ -e $BTPATH/check.md5 ]; then
if md5sum --status --ignore-missing -c $BTPATH/check.md5; then
echo -e "\e[32mFiles have not changed, Decompression not needed\e[0m"
exit 0
else echo -e "\e[31mHash failed, kernel will be compressed\e[0m"
fi
fi
#Backup the old decompressed kernel
mv $DKPATH $DKPATH.bak
if [ ! $? == 0 ]; then
echo -e "\e[31mDECOMPRESSED KERNEL BACKUP FAILED!\e[0m"
exit 1
else echo -e "\e[32mDecompressed kernel backup was successful\e[0m"
fi
#Decompress the new kernel
echo "Decompressing kernel: "$CKPATH".............."
zcat $CKPATH > $DKPATH
if [ ! $? == 0 ]; then
echo -e "\e[31mKERNEL FAILED TO DECOMPRESS!\e[0m"
exit 1
else
echo -e "\e[32mKernel Decompressed Succesfully\e[0m"
fi
#Hash the new kernel for checking
md5sum $CKPATH $DKPATH > $BTPATH/check.md5
if [ ! $? == 0 ]; then
echo -e "\e[31mMD5 GENERATION FAILED!\e[0m"
else echo -e "\e[32mMD5 generated Succesfully\e[0m"
fi
#Exit
exit 0
Code: Select all
sudo chmod +x auto_decompress_kernel
Code: Select all
DPkg::Post-Invoke {"/bin/bash /boot/firmware/auto_decompress_kernel"; };
Code: Select all
sudo chmod +x 999_decompress_rpi_kernel
10) Enjoy Ubuntu on the RPI4 without hassle
-- Link to the post that has this information viewtopic.php?f=131&t=278791&p=1691270#p1691270
=========================================
So, this is my first post, but this is something that was driving me crazy, so now that I have it working, I thought I would let others also know.
In order to get Ubuntu Server 20.04 to boot on the RPI4 using USB only, follow these steps:
1) Download the Ubuntu image for raspberry pi 4 form the Ubuntu official website.
2) Flash the image to a USB drive (USB 3.0 SSD or UBS flash drive).
3) Until they update their image, or you want to compile u-boot, you will need to decompress the vmlinuz kernel
- Easiest way I have found is to execute the following command "dd if=vmlinuz bs=1 | zcat > vmlinux" in the "system-boot" partition of the USB
4) Update the config.txt as follows for the [pi4] section:
[pi4]
max_framebuffers=2
#dtoverlay=vc4-fkms-v3d
boot_delay
kernel=vmlinux
initramfs initrd.img followkernel
That's it. You can now have Ubuntu running on the RPI4 booting directly from USB. You can probably remove the boot_delay. I was testing off a very slow USB flash drive, and that helped get it working, so I just never removed it. Pretty quick once it is running of an SSD.