• The site may be on/off today as we're going to be upgrading some key services on the server (php, nginx, kernel, etc...). If it breaks, we promise to fix it :)

How to boot loopback devices in GRUB?


New Member
Mar 13, 2023
Reaction score
For a long time now I've tried to do something like this:
Get a pendrive and format it to something like fat, only for grub. Make some files from /dev/zero there and format them to ext4 so I can put my systems there and then just boot them as loopback devices. I think I'm on a good way for now, but there's only one problem. My grub.cfg looks something like this:
insmod part_msdos
insmod fat
insmod ext2
search --no-floppy --set=root --fs-uuid {uuid}
loopback loop /linux.ext4
linux (loop)/boot/vmlinuz-linux
initrd (loop)/boot/initramfs-linux.img

But there's a small problem. You have to put a fs uuid after Linux kernel. But I don't know what uuid it'll be since this is a loop file. Does anyone know a solution?
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online

Latest posts