How to boot fedora with a squashfs image as root fs

asked 2015-10-10 03:13:09 -0500

Sudoer gravatar image

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
edit retag flag offensive close merge delete