Ich habe im Englischen Teil geschrieben, wie ich das mache:
I have a backup OS, which is just a customized Manjaro ISO and I don’t use a flash drive for this.
Make some space on sdc and create a 10GB vfat partition and flag it with boot,esp and name the partition and file system “RECOVERY” ( important ).
Mount it and install grub on it:
sudo mount --mkdir --label RECOVERY /mnt/recovery
sudo grub-install --target=x86_64-efi --recheck --removable --efi-directory=/mnt/recovery --boot-directory=/mnt/recovery/boot --verbose --force
Create an efi entry in your UEFI/BIOS:
sudo efibootmgr --create --disk /dev/sdX --part <number> --label "Recovery" --loader '\EFI\BOOT\BOOTX64.EFI'
Copy a Manjaro ISO to that partition:
sudo cp -f /path/to/manjaro.iso /mnt/recovery/manjaro.iso
This script has to be in /mnt/recovery/boot/grub/grub.cfg (create it):
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if loadfont $prefix/fonts/unicode.pf2 ; then
# Set Video
set gfxmode=auto
load_video
insmod gfxterm
# Set Langauge for grub
set locale_dir="$prefix/locale"
set lang="de"
insmod gettext
fi
# Set keyboard language for grub
#insmod keylayouts
#keymap $prefix/lang.gkb
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod part_msdos
insmod fat
set label="RECOVERY"
search --no-floppy --label --set=root $label
insmod png
set timeout_style="menu"
set timeout="10"
menuentry "Manjaro ISO" {
# Setup grub
load_video
set gfxpayload=keep
insmod part_gpt
insmod part_msdos
insmod fat
## Set Parameters for the ISO
# Set the free or nonfree drivers
set dri="free"
# Set the language of the Desktop (localectl list-locales)
set lang="de_DE"
# Set keyboard language (localectl list-keymaps)
set keyboard="de"
# Set the timezone (timedatectl list-timezones)
set timezone="Europe/Berlin"
# Copy to RAM (needs at least 8GB RAM)
#set c2r="copy2ram"
# Set Params searching the ISO
# Label of the partition where it searches for the iso file
set label="RECOVERY"
# Search for the partition label and switch to the root directory of it
search --no-floppy --label --set=root $label
# Set the device where the ISO is located
set device="/dev/disk/by-label/$label"
# Set the Path to the ISO
set file="/manjaro.iso"
loopback loop $file
linux (loop)/boot/vmlinuz-x86_64 img_dev=$dev img_loop=$file driver=$dri tz=$timezone lang=$lang keytable=$keyboard $cr2
initrd (loop)/boot/intel_ucode.img (loop)/boot/initramfs-x86_64.img
}
And now you are done. You can now reboot, type F12 and choose “Recovery” from the Bootmenu. This little installation is fully dedicated and even work when your main installation is non-functional. You can also do a full installation form here.
You need to adjust the parameter in menu to your language. Parameters are mostly explained. If you have an amd CPU, then replace intel_ucode.img with amd_ucode.img.
Anyway, this works for me in production and if something goes wrong, I can always boot a live session and fix stuff.
Das funktioniert für mich. Was ich bei deinem Menüeintrag vermisse, ist das Setzen der Wurzel, wie bei mir:
search --no-floppy --label --set=root $label
Was in dem Fall nach dem Label “RECOVERY” sucht und für diese Partition das Root setzt, was im Menüeintrag drin ist. Die erwähnte Anleitung ist auch schon alt und wahrscheinlich nicht fehlerfrei. Würde dir eine separate EFI-Partition für solche Späße aus Erfahrung empfehlen und auch für die ISOs verwenden (wenn nicht größer als 4GB).