Garuda-tools calamares [Custom image fails to run grub-mkconfig]

Running "chroot" ("/tmp/calamares-root-zfywuv3q", "grub-mkconfig", "-o", "/boot/grub/grub.cfg")
Exit code: returned exit status code 1

How can i solve that?
This happen during calamares installation.

Could it be that you booted with BIOS in legacy mode (CSM) but tried to install the GRUB in EFI?
If so, you should change the BIOS to EFI mode as well.

Still have bios in efi mode, i get this error in the virtual machine when trying to install my iso file after building it with tools.

I think in a virtual machine you should install the GRUB in the MBR of that virtual disk

I have grub as pkg for rootfs of the iso profile, what can i do?

I don't know, sorry, I can't help here.
Installation in VMs is not officially supported but maybe someone will help.

You should look in the log files created as part of the installation process.

If you run calamares from a terminal it might also provide more informative output.

1 Like

That' s my calamares log file

And what does it tell you?

1 Like

Grub-mkconfig also if applyied after chroot doesn t work.

What happens if you chroot into the installation manually and run grub-mkconfig?

error: failed to get canonichal path of "overlay"

That probably means your chroot isn't built correctly.

1 Like

I get this error in the log file:

    ..  Running "chroot" ("/tmp/calamares-root-lj77r4x1", "grub-mkconfig", "-o", "/boot/grub/grub.cfg") 
    ..  Target cmd: ("grub-mkconfig", "-o", "/boot/grub/grub.cfg") Exit code: 1 output:
 Generating grub configuration file ...
Found theme: /usr/share/grub/themes/croco/theme.txt
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img amd-ucode.img initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
WARNING: [PYTHON JOB]: "Command 'grub-mkconfig -o /boot/grub/grub.cfg' returned non-zero exit status 1." 

There isn't anything useful there. All you know is that :

"Command 'grub-mkconfig -o /boot/grub/grub.cfg' returned non-zero exit status 1."

My recommendation continues to be that you properly chroot into the installation and run grub-mkconfig manually to see why it is failing.

Alternatively, you could modify the Calamares code to better capture the output. Of course, that would require some knowledge of C++/Python.

I' ve tried doing the command in the terminal and it worked correctly. Idk what is the problem :slight_smile:

Did you check the return code afterwards to ensure that it isn't returning a non-zero return even if it seems to be working?

If that isn't the issue, make sure that everything is being mounted correctly during the installation.

Ultimately, building your own spin requires some working knowledge of linux and an ability to troubleshoot things like this. I am glad to help point out things to check and try but you need to be able to dig into the issue yourself as well.

3 Likes

Probably found the problem. After building iso in the rootfs ther' s not /boot/grub folder which should have to contain grubenv file.

Is this the possible problem?

Btw thanks for the help

I would expect that to be created by grub-install.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.