How to bootup with initramfs-kernel.bin loaded into USB stick on x86 routers

I have a use case where I need OpenWRT on initramfs. I have created openwrt-x86-64-generic-initramfs-kernel.bin.

By googling "initramfs-kernel" stands for kernel appended with rootfs, but dont got idea how to load using USB stick.
Can someone please help me load this on x86 router. I didn't find any documentation on this.

but I guess grub, syslinux or uboot (if availaboe for x86) could be used too

Thank you @frollic this is different usecase to load OpenWrt on USB.

I need initramfs functionality, where rootfs will be loaded into RAM.

It boots the same as a regular kernel. The difference is that a kernel blob built as initramfs doesn't mount a physical rootfs while it is starting up. All of its root files are packed into the blob itself, so it mounts them as a RAM disk.

Up until the loading and starting of the kernel blob in RAM, the boot process is exactly the same as a regular install. First the UEFI BIOS will mount the UEFI partition, find the directory to boot, load grub2, then grub2 loads the kernel file.

So converting to initramfs is simply to replace the vmlinuz file that grub2 ultimately loads with the initramfs one.

1 Like

No it's not, from a boot perspective.

1 Like