ISO image on LUKS-encrypted partition

While doing this:

It isn’t working for me, though I think it might be because my image is on LUKS. Is there a good way to simply have an entirely different partition for this? I was thinking of storing the ISO’s on an unencrypted disk.

menuentry "Manjaro grub_iso"  {
    set isofile="/boot/images/manjaro-gnome-21.0.7-minimal-210614-linux510.iso"
    set dri="free"
    set lang="en_US"
    set keytable="us"
    set timezone="America/Detroit"
    search --no-floppy -f --set=root $isofile
    probe -u $root --set=abc
    set pqr="/dev/disk/by-uuid/$abc"
    loopback loop $isofile
    linux  (loop)/boot/vmlinuz-x86_64  img_dev=$pqr img_loop=$isofile driver=$dri tz=$timezone lang=$lang keytable=$keytable copytoram
    initrd  (loop)/boot/intel_ucode.img (loop)/boot/initramfs-5.10-x86_64.img
}

So if you haven’t already got one:

  • create an un-encrypted partition using KDE’s partition manager as your profile says you’re on Plasma,
  • create a directory for your .iso (E.G. images),
  • put your .iso there,
  • edit your entry to match the path (E.G. /images/manjaro-gnome-21.0.7-minimal-210614-linux510.iso)
  • Ensure you put your entry in /boot/grub/custom.cfg
1 Like

ok, but how does it know where that partition is? there’s no mount at this point, I think. I’ve tried putting it in the same partition too, but I’ve not had luck because it still seems to need to know how to decrypt /boot.

Oddly I’m using gnome at the moment, KDE seems to have become stagnant while I was away. I’ll get around to correcting that. I’ve used everything along the way.

You missed this bit:

:crossed_fingers:

1 Like

no I already have that partition, and I copied the iso to it. I get cannot find /boot/initramfs-5.10-x86_64.img when it tries to laod.

1 Like

You need to adapt that whole configuration file to reflect your configuration - obviously
… where the iso is to be found - and on which device

yeah, I figured some of that, I guess I’m not certain where some of these are coming from? I totally set pqr now though. Is $root supposed to be the root device? whats $keytable the original post does not explain what these variables should be.

menuentry "Manjaro grub_iso"  {
    set isofile="/images/manjaro-gnome-21.0.7-minimal-210614-linux510.iso"
    set dri="free"
    set lang="en_US"
    set keytable="us"
    set timezone="America/Detroit"
    search --no-floppy -f --set=root $isofile
    probe -u /dev/mapper/root --set=abc
    set pqr="/dev/disk/by-label/images"
    loopback loop $isofile
    linux (loop)/boot/vmlinuz-x86_64  img_dev=$pqr img_loop=$isofile driver=$dri tz=$timezone lang=$lang keytable=$keytable copytoram
    initrd  (loop)/boot/intel_ucode.img (loop)/boot/initramfs-5.10-x86_64.img
}
❯ mount /dev/disk/by-label/images /boot/images                                                  # ~
❯ ls /boot/images                                                                               # ~
manjaro-gnome-21.0.7-minimal-210614-linux510.iso

You need to learn to understand how variables work.

first, the variable “isofile” is defined - it is the location where you put your ISO which you want to boot

set isofile="/images/manjaro-gnome-21.0.7-minimal-210614-linux510.iso"

This is something you need to adapt depending on where you put it and what the files actual name is.
Later, that location is referred to by the name of that variable

search --no-floppy -f --set=root $isofile

It’s the same for pqr - which defines the partition that you put your ISO in

set pqr="/dev/disk/by-label/images"

… what do you think

set keytable="us"

is referring to?
(it’s the keyboard layout that will be set - adapt this to what you have, else some characters might not be where you expect them to be when you type)

1 Like

I give up, I did adapt it, it won’t work because there’s no way for this to know how to decrypt boot, and mount images so, whatever. I’ll just have to wait until my flash drives show up. if it was, there wouldn’t be a problem with initramfs