Hi
Until the latest release of Debian Buster 10.5 ( I know this is due to vulnerability fixes made to efi grub ) I was able to build a USB stick with legacy and UEFI boot ( with secure boot disabled ) which held just my initrd, vmlinuz and filesystem.squashfs and used grub to load it toram.
Now when I try to create a USB ( NOT USING ISO dd ) The boot process keeps rebooting. Just before each reboot a message is flashed up saying somthing like "cannot find boot disk". Its so fast I cannot read it.
I have tried many blogs about how to do this and am currenty using this web sites instructions.
SORRY I REMOED THE LINK BECAUSE SUGGESTED I WAS SPAMMING.
What I want is a writtable data partition to copy my three files to and use grub to boot them.
For background, I used debootstrap minbase to build a minimal buster build and used mksquashfs to build the squashfs file. With the USB I can only boot using legacy but UEFI with/without secure boot enabled just goes to a machine restarting loop.
I would prefer to keep the existing runtime I have created rather than use live-build or other setups, if possible.
Lastly since the runtime is in memory and does not use any devices I am very confused as how to go about this so any help would be great.
*** UPDATE ***
While I wait for input from more knowledgeable members I did a little more work and have more information to hopefully help answer my question.
I used my phone to record in slow motion the bootup process.
So The PC/laptop passes the manufacturers splash screen and tries to read the USB device.
Then before the reboot it displays
system bootorder not found initializing defaults
Searching online problem this is ( NORMALY ) due to corrupt UEFI grub. The normal solution is to use the BIOS to add the grub64x.efi to confirmed key collection.
In my case because I am building from scratch obviously I am not setting things up correctly.
Once I do add my key, the grub is loaded ( in secure mode ). However I get the following message displayed before I enter the grub menu.
error file /boot/ not found
error no such device /.disk/info
error no such device /.disk/mini-info
error secure boot forbids loading module from ....
So I guess I need help or a pointer as to where I can learn to create these files on the USB. My main focus is trying to figure what/how /boot/grub/efi.img should be created. Also the grub64x.efi on the Buster live iso has a different size than the one greated my grub-install which I dont understand.
Anyway sorry for the long update.
PPS. Was asked for details of grub ( I dont think this is it as it works with Debian stretch without a problem )
menuentry "Live Boot To RAM Buster from USB" {
search --no-floppy --set=root --file /area2/vmlinuz
linux /area2/vmlinuz toram=filesystem.squashfs quiet splash boot=live live-media-path=/area2/
initrd /area2/initrd.img
}
also the mksquash command whic is basic
mksquashfs chroot filesystem.squashfs
The initrd and vmlinuz files are copied from the chroot area.
Thanks in advance for any breadcrums you may have.
*** SOLVED ***
Thanks to everyone with the help you gave. After some more time working through the problem I was able to get my Live USB working with Buster 10.5
Just finished a write up of how I created a Live Debian Buster 10.5 Secure Boot USB
SORRY I REMOED THE LINK BECAUSE SUGGESTED I WAS SPAMMING.