Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to boot fedora with a squashfs image as root fs

I made a squashfs image from my system root, I want to put it on a USB drive among some Live ISOs, and make boot menu using GRUB2.

What kernel boot parameters should I use to specify that Squashfs image as root file-system?

I used this as grub configuration, but Dracut fails to find and mount root:

insmod gzio
insmod xzio
insmod part_msdos
insmod squash4
insmod iso9660
insmod ext2
insmod btrfs
insmod regexp
insmod multiboot2
set pager=1
set timeout_style=menu
set timeout=10
set gfxpayload=keep
menuentry '2. Fedora Workstation' {
        set imgfile=/boot/images/fedora.squashfs
        loopback loop /$imgfile
        linux (loop)/boot/vmlinuz-4.1.8-200.fc22.x86_64 ro rd.fstab=0 root=$imgfile elevator=deadline enforcing=0 #rhgb quiet LANG=en_US.utf8
        initrd (loop)/boot/initramfs-4.1.8-200.fc22.x86_64.img