Before I get to the topic: I am new here, thanks for having me. I have been looking for help in the forum for some time, but always found my answers without creating a new topic. Thanks to everyone, who is doing an amazing job on this forum!!
That said, I am stuck with something, that is out of my understanding and ability (so far).
The situation: I was trying to follow this HowTo
https://forum.manjaro.org/t/howto-boot-manjaro-iso-directly-with-grub/15892/44
on how to boot manjaro ISO directly with GRUB. Why: I am in a very remote area, limeted access to working computers, internet and even electricity. So I really depend on my machine working properly. But s**t happens sometimes, and one might need a live system to repair things. With flash drives being rare and no other machine to flash a drive either, I thought: This guide is what I need!
The Problem: I have my system luks encrypted. That seems to make the whole thing alot more complicated. If I understand it correctly, my system has full disk encryption (even boot), because I have to enter my passphrase, before the GRUB menu shows up (do I understand that right?). I found another related topic about booting an ISO from an encrypted system, but I wasn’t able to resolve the problem so far with its help:
https://forum.manjaro.org/t/iso-image-on-luks-encrypted-partition/74426
I am not sure, if it makes a difference, if just /root or /root and /boot are encrypted.
What I tried so far: In the beginning I just followed the HowTo step by step, and everything worked, until I wanted to start the ISO from GRUB menu. A bunch of errors showed up. So I did some more research. I tried to follow the advice in the second linked topic to create a non encrypted partition just for this purpose. For that I had to resize my root partition (scary thing for me), and of course ruined my working system. . But I managed to resolve that, with the help of this forum. Now I can normally boot again, have a separate unencrypted partition, created a folder on it and copied the ISO to it. But so far I wasn’t able to get it running. I tried a few other things from the archwiki, ubuntuusers etc… In the end, I always end up with (different) error messages, when I select the entry in GRUB.
My guess: My GRUB configuration is still wrong, since I don’t really understand what I am doing and/or GRUB has somehow no access to the unencrypted partition, because it operates in an encrypted environment. When I list the partitions in the GRUB command line I see that it shows “no known filesystem detected” for all partitions except from boot(?).
At the moment my /boot/grub/custom.cfg looks like this (but I have tried a hundred different versions…):
menuentry "Manjaro grub_iso" {
set isofile="/miso/manjaro.iso"
set dri="free"
set lang="en_US"
set keytable="de"
set timezone="Europe/Berlin"
search --no-floppy -f --set=root $isofile
probe -u $root --set=abc
set pqr="/dev/disk/by-uuid/$abc"
loopback loop(hd0,gpt4) $isofile
linux (loop)/boot/vmlinuz-x86_64 img_dev=$pqr img_loop=$isofile driver=$dri tz=$timezone lang=$lang keytable=$keytable
initrd (loop)/boot/intel_ucode.img (loop)/boot/initramfs-x86_64.img
}
output of lsblk is this:
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda1 vfat FAT32 NO_LABEL 60B5-8A6A 295,2M 1% /boot/efi
└─sda
sda4 ext4 1.0 unencryptediso e82df732-e38d-4a3a-bfb8-c78d2d2dea2f
└─sda
luks-ffc0a8e3-431f-4e00-a614-fb14f0ba1b0f
ext4 1.0 36fb0418-e109-41e5-b442-74fba7f9f99d 10,2G 85% /
└─sda2
crypto 1 ffc0a8e3-431f-4e00-a614-fb14f0ba1b0f
└─sda
luks-3646510a-e376-4eb9-97a5-feec2aec0623
swap 1 swap 7a294832-8fb9-4e39-a5fb-64252dface16 [SWAP]
└─sda3
crypto 1 3646510a-e376-4eb9-97a5-feec2aec0623
└─sda
The manjaro ISO is located on sda4 in the folder /miso/manjaro.iso
GRUB is saying “no such device: /miso/manjaro.iso”, “unknown filesystem”, “no server is specified” and other things, depending which version of my not working configutation I am using
I can’t really figure out, how I tell GRUB, were to find the ISO, because I don’t really get if I have to edit the $isofile, $root, $pqr or even a different variable. Any help or pointers in the right direction are appreciated. Apart from solving the problem, it would be great to understand, what I am actually doing…
Thanks in advance!
Tim