Difficulty: ★☆☆☆☆
We are all familiar with burning live usb stick to boot our Manjaro isos. That is useful when you are installing manjaro on a new machine. However, if you already have linux installed with grub, there is a better way to boot Manjaro iso files. I usually do this when I test new iso files for a new release or when I need to use a rescue system because one of my experiments rendered my installation unbootable.
You can boot the .iso
file directly from your hard drive without burning an USB stick. Not only is this less hassle, it also gives you better performance because your HDD or SSD is much faster than your average USB stick. And your kids are usually less likely to eat your hard drive than your USB sticks. I learnt his from @gohlip, who posted a similar tutorial on the archived forum: Booting Manjaro iso using grub2 - Tutorials - Manjaro Linux Forum
How to do it
-
Save your
.iso
file to directory/miso
on a FAT or EXT2/3/4 volume. You can also use a different folder, but you need to adjust the configuration file path accordingly.- If you use btrfs subvolumes, you need to include your subvolume in path, like this
/@/miso
and need toinsmod btrfs
instead ofinsmod ext2
in the examples below. - If you use another FS,
insmod
your FS instead ofinsmod ext2
in the examples below.
- If you use btrfs subvolumes, you need to include your subvolume in path, like this
-
Create the file
/boot/grub/custom.cfg
or/etc/grub.d/40_custom
file with the following contents:menuentry "Manjaro grub_iso" { set isofile="/miso/manjaro-gnome-20.1-stable-x86_64.iso" set dri="free" set lang="en_US" set keytable="fi" set timezone="Europe/Helsinki" 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-x86_64.img }
-
Adjust the keytable, timezone and language parameters to match your needs. Make sure your isofile variable matches the name and location of your iso file.
-
If you have an AMD CPU, change
intel_ucode.img
toamd_ucode.img
. -
Profit. When you reboot, your grub has an extra entry that let’s you boot into the live system.
This menu entry loads the iso to ram. It increases the performance further, and let’s you mount and manipulate the partition that the iso is located on. However, it also requires more ram. If you don’t have enough ram for this, you can remove the parameter copytoram
from the configuration.