Booting Manjaro iso using grub2

[quote=“gohlip, post:7, topic:3132”]
Ha ha. I’ve forgotten most. like lilo , grub-legacy (I was er… good (humility aside) in it and loved it when it came out, just that grub 2 is much much better). Personally don’t like gummiboot, bootctl (systemd boot), efistub or rEFInd.[/quote]
Nothing of all that, just syslinux !

With specific aliases to cp right initramfs & vmlinuz before/after next failing boot when updated kernels come, no manual intervention, too !
& if i change kernel, modify syslinux.cfg is easy as pie !

Imho, grub is only unified/needed to share your DD with Redmondia/Cupertinia (EFI f*****g stuff) !

For all following, change “insmod part_msdos, insmod ext2”… where appropriate.


menuentry "Gparted  iso" {
    insmod part_msdos
    insmod ext2
    set isofile="/miso/gparted.iso"
    search --no-floppy -f --set=root $isofile
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live findiso=$isofile union=overlay username=user config components quiet noswap noeject  toram=filesystem.squashfs ip=  nosplash 
    initrd (loop)/live/initrd.img


menuentry "Casper iso" {
    insmod part_msdos
    insmod ext2
    set isofile="/miso/xenial-desktop-amd64.iso"
    search --no-floppy -f --set=root $isofile
    loopback loop $isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noeject noprompt quiet splash
    initrd (loop)/casper/initrd.lz

Ubuntu derivatives
Use same above but for some, need to change initrd line from above to

   initrd (loop)/casper/initrd.gz 

Some developers use the simpler .gz instead of.lz to create the initrd.

Also some (older versions) use plain “vmlinuz” instead of “vmlinuz.efi”
Note vmlinuz.efi will apply for bios-legacy also for the live boots; just the naming change.

We can verify all these if we check inside of isofile with “mount -o loop” command.

Casper live boots allow persistent keep of changes with a partition properly labelled and a boot parameter added. Not with kernel changes though.

Finally tried this method and like it quite a lot.
LXQt 16.11 ISO boots this way, KDE 16.10 ISO however gives an endless loop of error messages:

INFO: No miso system found on /dev/sda1
INFO: No miso system found on /dev/sdb1
>>>ERROR: Could not mount /dev/sdc1

Not the exact wording, but with no miso
My Grub code:

menuentry "Manjaro KDE ISO 16.10.1"  {
    set isofile="/manjaro-kde-16.10.1-stable-x86_64.iso"
    set mlabel="MJRO1610"
    set archi="x86_64"
    set dri="free"
    search --no-floppy -f --set=root $isofile
    probe -u $root --set=8420b865-fc33-4c2f-985c-57776a094d0f
    loopback loop $isofile
    linux  (loop)/manjaro/boot/$archi/manjaro  img_dev=UUID=8420b865-fc33-4c2f-985c-57776a094d0f  img_loop=$isofile misobasedir=manjaro misolabel=$mlabel i915.modeset=1 logo.nologo overlay=$dri $dri=yes
    initrd  (loop)/manjaro/boot/intel_ucode.img (loop)/manjaro/boot/$archi/manjaro.img

The almost same code works for LXQt. Both ISOs are in the top directory of a CF card.
If you think it will take too much for troubleshooting I will move my question to a separate topic.
However, necrobumping here might revive the idea of booting an ISO directly.

Update: After updating grub (2.02.beta3-2 -> 2.02.beta3-3) the KDE ISO boots fine. Thanks for the guide!

Glad you find it useful.

2 things.
o I find that it is best to have the isofile in a directory not in a raw partition

When I first started out booting isofiles (Manjaro was not around then), I faced some issues that the isofile is not detected (unless I put it in the partition where the boot grub is - which I find restrictive). Then I found it worked very well when I put in any partition provided it is placed in a directory.
I would think many here would put the isofile in a usb drive and that would also work well, provided you put in a directory in a partition in the usb drive).

o You used

probe -u $root --set=8420b865-fc33-4c2f-985c-57776a094d0f
linux (loop)/manjaro/boot/xxxxxxxxxxxxxxx img_dev=UUID=8420b865-fc33-4c2f-985c-57776a094d0f xxxxxxxxxxxxxx

. (this dot is necessary to have a break here - stupid bbcode thngy)

probe -u $root --set=abc
linux /xx/xxx/xx xxxxx img_dev=UUID=$abc xxxxxxxxxxxxxx

would be more…er ‘exact’, ‘simple’ and ‘direct’, I would think.
We just need to modify the first 4 "set xxxx=“yyyy” lines to work in all situations.
_And leave the rest of the lines unchanged.

Ps: I think (almost sure) the “no miso system” error is not due to grub versions (works for all versions) but most likely you did not put in in a directory, (and it works later for you because it finally found it when you install a new grub version because this grub is now changed to the the same partition as the isofile).

Nevertheless, glad you liked it. Also isofile booting from grub2 will work for all debian, ubuntu and derivatives and more.

Or I can get rid of the line

if I pass the value to img_dev=UUID=8420b865-f....
As for placing the ISO on a partition, the whole behaviour is somewhat indeterministic. It worked for the LXQt ISO which is in the same place. What might be the reason is that I ran “Verify local date” with Transmission for the KDE ISO, maybe it repaired a broken Byte somewhere and Grub upgrade was only a coincidence. The CF card is also not my Grub drive where Grub sits in the MBR. Next time I will put the ISO file in a directory.

Yes, you can but you will need to manually input the UUID (which can be error-prone).
“probe -u $root --set=abc” gets the UUID for you and the variable created is "$abc"
You can check with "echo $abc"
So all this already done for you without any manual input.

Note this line “search --no-floppy -f --set=root $isofile” will set root (grub root not / root) to the partition where the isofile is
and so “probe -u” will get that partition UUID

Better explanation here .

1 Like

Now got it :bulb:, thanks!

Does the isofile have to be on the same partition as the system whose grub you are adding it to? Can you put the iso on a different, partition? If yes, how does the path change? Do you have to include the device name, like set isofile="/sda2/Manjaro/manjaro.iso"?

No. Doesn’t have to be.

The path is set as shown in

or in

No. that same search command will look for the partition that it resides in. It will do the work for us.


ps: since I’m here, I’ll add to the first post on 2 things.
o uefi grub will boot and install in uefi and bios-legacy grub will boot and install in bios-legacy.
o the ‘new method’ installer derived from manjaro-architect will not work in this menuentry.

Thanks for your quick reply!
I created custom.cfg, copied it into /boot/grub but for some reason it wont work. I also tried different locations for the iso, but not even the menuentry shows up in grub. What am I doing wrong?

menuentry "Manjaro Xfce 16.10.3 iso"  {
    set isofile="/manjaro-xfce-16.10.3-stable-x86_64.iso"
    set mlabel="MJRO1610"
    set archi="x86_64"
    set dri="free"
    search --no-floppy -f --set=root $isofile
    probe -u $root --set=abc
    loopback loop $isofile
    linux  (loop)/manjaro/boot/$archi/manjaro  img_dev=UUID=$abc  img_loop=$isofile misobasedir=manjaro misolabel=$mlabel nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=$dri $dri=yes
    initrd  (loop)/manjaro/boot/intel_ucode.img (loop)/manjaro/boot/$archi/manjaro.img

I don’t want to keep you, though, I just had some time and thought to play around with it.

I’m trying now with KDE 17.0 because LXQT 17.0 won’t work.
Don’t know for sure if KDE 17.0 is like LXQT 17.0 in that LXQT now uses the new manjaro-architect (or what some people call the ‘netinstall’ installer - we better come up with a name everybody can agree on :grin: ).

I have to boot up the KDE 17.0 using dd or dvd to find out for sure (like I did for LXQT)
Anyway, I don’t think (not sure again, sorry) if the XFCE 16.10 is like the 'netinstall’
The menuentry looks alright but right now (I come back to you later - maybe a day later after I find out more about the 17.0) I can comment only on the custom.cfg.

It works for me and I’ve tested on Manjaro grub as well (because I use my own).

You can try to put anything, really anything, in /boot/grub/custom.cfg (just save the file after putting anything inside) and it appear at the bottom of grub menu when you boot up.

Oh… ‘update-grub’ (which isn’t necessary) or os-prober will not show these entries at all.

By the way, check in your /boot/grub/grub.cfg that the follwing is there.
This script will pull in anything you put into /boot/grub/custom.cfg.

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
### END /etc/grub.d/41_custom ###

I’ll leave here for now. i’ll come back later after I find more about the 17.0 iso versions.
The parameters are different, which is okay to fix, but it doesn;t seem to pull in the squash overlays to boot up.
(canonical path of overlays)


I was using Xfce, but loaded from KDE’s grub. I reinstalled grub from Xfce, and now it’s all working.
Thanks for your detailed guides and explanations.

1 Like

I am new here. And I am trying to install Manjaro along with windows7. Could you show me the instructions to boot Manjaro iso using grub4dos? Thanks a lot!

I’m not sure I follow. Could you explicate?

Do you mean that the installer does not work if you run it from iso booted this way, or that these instructions to boot iso files do not work when used with grub installed by manjaro-architect?

Is it because it somehow boots from the manjaro_grub bootloader subdirectory?

No. Only bootloader that can boot isofiles is grub 2. Nothing else (so far), not grub-legacy, systemd boot nor refind.
But of course if you multiboot these other bootloaders to grub 2, it should be able to boot then.

Yes. the installer does not work when booted from the method outlined.

And no, it is nothing to do with the grub installed by manjaro-architect. I do not use this ‘manjaro-architect installed’ when booting isofiles.

I don’t know but I don’t think so. The mount point (for isofile) to boot is “/run/miso/bootmnt” I thought that’s where the problem is. Notice I used the directory as /miso too and somehow the version 170 used the same name as aforesaid mount point. So I changed my directory name from ‘miso’ to ‘mmiso’ but still it won’t boot.

As for parameter changes, which can be easily amended, these changes are

linux (loop)/manjaro/boot/$archi/manjaro
initrd (loop)/manjaro/boot/$archi/manjaro.img


linux (loop)/manjaro/boot/$archi/vmlinuz
initrd (loop)/manjaro/boot/$archi/initramfs.img

And from

set dri="nonfree"
overlay=$dri $dri=yes


set nonfri="no"


And I tried to change to the various methods different distros use (and there are many) to ‘pick up’ the device/isofile

img_dev=$parti img_loop=$isofile

To each of these

boot=live findiso=$isofile union=overlay
iso_loop_dev=$devdisk iso_loop_path=$isofile

but not ‘casper’ :slight_smile:

I still think it is somewhere where manjaro iso sets up the mount point and that is /run/miso/bootmnt
Hope and glad if you can help me ‘debug’ these and a more sobering thought is that sometimes, of the way some distros set up the iso’s, there is no way to boot up isofiles using grub 2. (some go about doing this by first extracting some files out (from iso) into hard disk first - and I don’t really want to do this)


Isolinux can do it too, but it doesn’t work with uefi and has other restrictions/conditions. Grub seems to be the best tool for the job.

What exactly doesn’t work? Does the bootloader installation fail, or does the whole script crash? Could this be due to the way the script detects if the system is uefi?

Thanks for the correction. AFAIK, isolinux (previously syslinux being used) is used for booting linux cd’s and dvd’s. Not sure if this is still the case.

The install media don’t boot up. Fails to boot at all.
Since I’ve tried many iterations to boot, the error messages are (something like)
device not found
waiting for device to mount
disk by-label "MJRO170’ not found

The menuentry for version 17.0 should be (but doesn’t work) is as follows.

menuentry "Manjaro newiso" --class dvd {
    set isofile="/mmiso/manjaro-kde-17.0-stable-x86_64.iso"
    set mlabel="MJRO170"
    set mpart="UUID=c62d1458-9f26-4305-b0d3-921fad72a547"
    set archi="x86_64"
    set nonfri="no"
    search --no-floppy -f --set=root $isofile
    loopback loop $isofile
    linux  (loop)/manjaro/boot/$archi/vmlinuz  img_dev=$mpart img_loop=$isofile  misobasedir=manjaro misolabel=$mlabel nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo nonfree=$nonfri
    initrd  (loop)/manjaro/boot/$archi/initramfs.img

At this point, I’m more inclined to think the issue is similar to this

Due to the missing /img_dev directory the

if mount -r -t “${FSTYPE}” ${img_dev} /img_dev > /dev/null 2>&1; then

command (from /hooks/chakrais_loop_mnt:23) could not mount the device where the iso is.

//PS. Adding the directory and recreating the image it works fine.

Request some help here.
Perhaps @artoo @excalibur1234 can also look into this?
(if I miss out others, sorry)
Thanks! Cheers.

Forum kindly sponsored by Bytemark