r-darwish / alma

Create Arch Linux based bootable USB drives
GNU General Public License v3.0
389 stars 31 forks source link

I want to use grub to boot the img image created by ALMA. #67

Closed daiaji closed 3 years ago

daiaji commented 3 years ago

Use similar grub commands.

menuentry "Manjaro img" {
    insmod exfat
    set isofile="/Linux/manjaro.img"
    set dri="free"
    search --no-floppy -f --set=root $isofile
    probe -u $root --set=uuid
    set dev="/dev/disk/by-uuid/$uuid"
    loopback loop $isofile
    linux  (loop)/boot/vmlinuz-5.9-x86_64 img_dev=$dev img_loop=$isofile driver=$dri tz=utc keytable=us
    initrd  (loop)/boot/amd_ucode.img (loop)/boot/intel_ucode.img (loop)/boot/initramfs-5.9-x86_64.img
}

However, the current img generated by ALMA seems to lack adaptation to this. In fact, I want to boot linux on a dynamically expanding virtual disk like qcow2, but grub2 seems to lack support for this, and I can only use img as a last resort.

r-darwish commented 3 years ago

First of all, Manjaro isn't supported in ALMA. If it works then have fun, if it doesn't then I won't fix it.

Second, I don't understand what you are asking. ALMA is intented to directly work on a USB device, so it will fill up the entire space. It supports image creation, but only raw fixed-sized images.

daiaji commented 3 years ago

@r-darwish I just want to use gurb2 to boot the img image generated by ALMA instead of letting ALMA use the entire USB device. Usually I put disk images in a folder, and let grub2 find and boot these disk images. In this way, my USB device can usually be used on Windows.

r-darwish commented 3 years ago

Can't you just create an image with the --image flag?

daiaji commented 3 years ago

I can create an img file with the --image tag. But the img file created by ALMA is not very helpful to me. Because I cannot use grub to boot the img file created by ALMA. I installed a customized grub on my USB drive, and I hope to use it to boot the img file created by ALMA.

r-darwish commented 3 years ago

I'm going to close this one as it currently isn't a scenario I wish to support