Follow on questions on building an ISO

This is a follow on to my previous post and is about different aspects, so I am starting in a new thread, rather than diverge the original.

I use rEFInd and do not have GRUB on my systems.
In a self created ISO I want to remove all things GRUB from the package lists.
This leads to the following questions.


  1. Will this cause an issue with the Calamares installer, does it expect to install GRUB by default?
  2. If yes can I edit the Calamares configuration files to remove GRUB installation? Would the workflow be: Make the image, edit the config files in the image, build the iso?
  3. Will it cause and issue with the live CD, does it need the GRUB packages itself in order to boot the live CD, or is that handled separately?

I would like to automatically add a refind_linux.conf file to the boot folder, but this needs to be edited to have the correct partition UUID.
Would this be best done purely with a Calamares post installation script?


I have zero experience of Calamares beyond end user installations. My intention would be to make the image, then scratch around in the Calamares config and script files of the image to try and understand what changes need to be made.

My opinion is that you can simply leave grub2 in situ, and have the best of both words, so to speak. Install Manjaro normally and then install rEFInd so that its available to then perfom a refind-install.

The result is that you will have two options to launch Manjaro from the rEFInd Menu:

  • One to launch via the efi stub directly.
  • One to chainload grub2 – the system continues to manage grub2 itself, should it ever be needed.

This is effectively the same as I do, the only difference being that I multi-boot several OS.

This may be outside the scope of user to user Support.

However, there is a GUI option I’ll mention in case it may be useful:

Despite the name, this package does not actually install rEFInd, however, it does allow one to choose the (installed) kernel that will be used for the non-grub option. Using this effectively configures refind_linux.conf in the process.

If you don’t find a solution to this, you might find something in the source that could be helpful in hacking something together, or simply use the package as intended.

  1. Yes, Calamares expects to install grub, and there is no default option otherwise. That said, this is Linux – maybe there is an acceptable workaround.
  2. The Live CD boots using grub2 with a choice of several kernel options. Installing grub2 to disk is typically the last action performed when installing Linux.

Years ago (with some distributions) one had a choice of whether or not to install grub, and this might have given a window; an opportunity; to install a separate bootloader. That opportunity does not exist with Manjaro.

To my knowledge, there is no provision for replacing grub2 with rEFInd, with respect building an ISO. However, I may be proven wrong. Perhaps others may have a suggestion or two.

Regards.

With rEFInd I don’t see a single need for grub. If I can stop the custom ISO from installing it I will, if not the first job after installing will be to uninstall everything GRUB, just as I did on my current Manjaro install.
I’m incredibly grateful Manjaro doesn’t complain or reinstall GRUB whenever it installs a new kernel, unlike a large number of other distros.

I’m not so concerned about installing rEFInd, it’s almost trivial to install manually. Though I might look to see if something can be done with Calamares post installation scripts, alongside adding the refind_lunux.conf to the boot folder.

Calamares has an option to set Bootloader Location to Do not install a bootloader

When system has been installed, use manjaro-chroot to log in to installed system and install rEFind.

For the refind_linux.conf part, a Calamares shellprocess step is the usual way to do it. In the image’s Calamares settings.conf you add a shellprocess instance to the exec sequence after the partition and mount steps (and before the final unmount), then point it at a small script. Inside that script you can get the root partition UUID with findmnt -no UUID / (or blkid) and write /boot/refind_linux.conf with it, and shellprocess can also run outside the chroot if you’d rather use the ${ROOT} mount point. As far as I recall, the Calamares shellprocess documentation covers the dontChroot option and the available variables, so check that for your version. I’d change one thing at a time and test each ISO in a VM, starting with the bootloader module set to not install one, before you remove any GRUB packages from the lists.

@Novastart, are you aware of the fact that A.I.-generated posts are frowned upon here at the forum?

Also, A.I.-generated posts which are not openly declared as being A.I.-generated are forbidden.

The standard installation no longer has the ‘Do not install a bootloader’ option, grub is now automatically installed.
After experimenting I can remove all grub installs from the desktop successfully.
In order to achieve this the following was done:

  • remove all grub packages from root and desktop packages
  • add grub, install-grub & update-grub to the live package list - I probably didn’t need all 3
  • modify the manjaro-tools scripts to handle no rootfs grub install.

The manjaro-tools script are in /usr/lib/manjaro-tools.
The edits were as follows:

  • util-iso.sh
    • in make_image_desktop() - comment out the command to edit grub config for the os-prober
  • util-iso-boot.sh
    • in prepare_grub() - change the ‘path’ variable to reference the livefs instead of rootfs
  • util-yaml.sh
    • in write_settings_conf() - comment out the 2 lines which add the grubcfg and bootloader modules to the main calamares config file.

The live cd boots without issue and installs without issue.

So far I have also done the following with regard to refind:

  • added refind_linux.conf to desktop_overlay/boot. This is complete except the UUID of the ‘root’ partition is a placeholder.
  • added the refind ‘installation folder’ to live-overlay/root. This has been stripped to only include x64 binaries and refind.conf created with desired config.
  • added a single line script to live-overlay/root. This will run efibootmgr to add the refind binary to the bios boot options, the default behaviour automatically sets it to the default choice.

Currently my relevant workflow for installation is:

  • create a small (256MB) Fat32 EFI partition - do not set a mount point - configure other partitions as required.
  • Ignore the boot partition warning and do the installation.
  • After install, still in the live desktop - as root user:
    • mount the EFI partition wherever then create an EFI folder
    • copy the refind folder from root folder of the livecd to the EFI folder in the EFI partition.
    • unmount the EFI partition.
    • run the script in root to add the boot option to bios.
    • get the UUID of the ‘root’ partition
    • mount the installation root partition
    • open boot/refind_linux.conf in the installation root
    • replace the UUID placeholders with the actual UUID and save.
    • unmount the installation root partition

After this you are good to reboot.
My next tasks are:

  • to look at creating python calamares modules to do the refind installation steps,
  • update the builsiso scripts and iso_profiles config to add options for grub or refind as the booitloader

26.1.2 ISO (2026-09-10) still has option to not install default GRUB bootloader

For automatic partitioning options:

calamares_no_grub

For manual partitioning:

calamares_no_grub2

I didn’t see that in all my experiments.
Maybe that is only shown if you choose to mount the EFI partition to /boot/efi in the partitioning setup?

calamares will normally automatically define /boot/efi as the mountpoint for the EFI partition already, unless of course you’re installing in BIOS compatibility mode, in which case there would not normally be an EFI partition anyway.

I never do automatic partitioning when installing a linux distro.
I never mount the EFI partition, there is no need to with refind.
So for me calamares never automatically defines /boot/efi as the mountpoint for the EFI partition.