Calamares bootloader configuration issue

Bruah

New Member
Joined
Jan 26, 2023
Messages
14
Reaction score
2
Credits
128
Hi, I created a custom live system based on debian 12 bookworm. Now I am trying to install my custom system to vmware virtual machine using calamares installer. I installed calamares and calamares-settings-debian packages and didn't change any of the configuration files. The installer is installing without errors. I am also choosing "erase the disk" option, not partitioning manually. However. when I reboot, grub> is showing up. I tried changing the bootloader location to both "/dev/sda" and "/'' on partitioning page but no use. The virtual machine uses BIOS, not UEFI.

1687537487076.png

I am having this issue, however, official debian 12 live installer installing the system using the same configuration files and the system is booting up perfectly. What am I missing, what should I do for the system to boot up perfectly after installation, please help!
 
Last edited:


It appears that the kernel and its initramfs are in the root directory, so you could try something like:
Code:
grub> set root=(hd0,1)
grub> linux /vmlinuz root=/dev/sda1
grub> initrd /initrd.img
grub> boot

Note that /dev/sda1 might be something else, like /dev/vda1 or whatever on the system.

After creating a debian live system here, I found it booted once on KVM, and failed thereafter for reasons that I have been unable to determine. Hopefully you'll fare better.
 
It appears that the kernel and its initramfs are in the root directory, so you could try something like:
Code:
grub> set root=(hd0,1)
grub> linux /vmlinuz root=/dev/sda1
grub> initrd /initrd.img
grub> boot

Note that /dev/sda1 might be something else, like /dev/vda1 or whatever on the system.

After creating a debian live system here, I found it booted once on KVM, and failed thereafter for reasons that I have been unable to determine. Hopefully you'll fare better.
Hi, thanks for your reply,

Yes I think sda1 is named different because it keeps saying "file '/vmlinuz' not found". However, I would like the installer do the configuration correctly during installation and so the system boots up without needing to manually load the kernel.
 
Hi, thanks for your reply,

Yes I think sda1 is named different because it keeps saying "file '/vmlinuz' not found". However, I would like the installer do the configuration correctly during installation and so the system boots up without needing to manually load the kernel.
Seems like two problems: not knowing the device name, and, not finding the vmlinuz kernel file.

The problem of the device name depends on what your system calls it, which I can't say.

In relation to grub not finding vmlinuz, then I would try to find it in the /boot directory where it almost certainly will be. The vmlinux in the /root directory may be a link to the actual kernel in /boot, and grub may not follow the link, and therefore not see vmlinuz ... that's a speculation.

So, to find the actual name of the vmlinux kernel file, you would need to run ls:
Code:
grub> ls (hd0,1)/boot
You can use the TAB key after the term "boot" and grub should show all the files in /boot, one of which will be the kernel named vmlinuz-... with a version number. Then you can use the same commands as in post #2 above, with the adjustments for the linux and the initrd commands using the /boot locations with the full names of the vmlinux-... and the initramfs-.... So, for example, the commands would look like:
Code:
grub> linux /boot/vmlinuz-...  root=/dev/sda1
grub> initrd /boot/initrd.img-...
You can use the TAB key to get the versions, and copy them exactly. Imprecision fails.
 
so weird, there is nothing in boot/ folder except grub folder. usually vmlinuz in / directory should be linked to kernel in /boot folder. maybe it got deleted during the installation? I wonder

1687603213309.png

and turns out, vmlinuz does not exist:

1687604190445.png

Seems like two problems: not knowing the device name, and, not finding the vmlinuz kernel file.

The problem of the device name depends on what your system calls it, which I can't say.

In relation to grub not finding vmlinuz, then I would try to find it in the /boot directory where it almost certainly will be. The vmlinux in the /root directory may be a link to the actual kernel in /boot, and grub may not follow the link, and therefore not see vmlinuz ... that's a speculation.

So, to find the actual name of the vmlinux kernel file, you would need to run ls:
Code:
grub> ls (hd0,1)/boot
You can use the TAB key after the term "boot" and grub should show all the files in /boot, one of which will be the kernel named vmlinuz-... with a version number. Then you can use the same commands as in post #2 above, with the adjustments for the linux and the initrd commands using the /boot locations with the full names of the vmlinux-... and the initramfs-.... So, for example, the commands would look like:
Code:
grub> linux /boot/vmlinuz-...  root=/dev/sda1
grub> initrd /boot/initrd.img-...
You can use the TAB key to get the versions, and copy them exactly. Imprecision fails.
 
Last edited:
so weird, there is nothing in boot/ folder except grub folder. usually vmlinuz in / directory should be linked to kernel in /boot folder. maybe it got deleted during the installation? I wonder
and turns out, vmlinuz does not exist:
That is quite unexpected. It puts me at a bit of a loss as to how to proceed. If grub can't see the kernel, it can't boot. As I mentioned I had my own unresolvable issue with a debian live disk in a VM I created, so can't really say more.
 
Seems to me you need to set the root function

grub> ls (hd0)(hd0,msdos2)(hd0,msdos1)

This lists disks and partitions on the disks. One of these partitions holds your Linux system. Say it is (hd0,1). Then do:

grub> set root=(hd0,1)
grub> linux /boot/vmlinuz-6.1.0-7-amd64 root=/dev/sda1

NOTE: Replace (hd0,1), the version number and the partition (/dev/sda1) by what is valid for your system. In the case of vmlinuz after /boot/vmlinuz you can just type vmlinuz- and press the Tab key to fill in

grub> initrd /boot/initrd.img-6.1.0-7-amd64

The version string should be identical to the one for vmlinuz.

grub> boot

should now boot up your system.

You can do ls (hd0,1) to list its contents. If you see the familiar folders and vmlinuz
 
Seems to me you need to set the root function

grub> ls (hd0)(hd0,msdos2)(hd0,msdos1)

This lists disks and partitions on the disks. One of these partitions holds your Linux system. Say it is (hd0,1). Then do:

grub> set root=(hd0,1)
grub> linux /boot/vmlinuz-6.1.0-7-amd64 root=/dev/sda1

NOTE: Replace (hd0,1), the version number and the partition (/dev/sda1) by what is valid for your system. In the case of vmlinuz after /boot/vmlinuz you can just type vmlinuz- and press the Tab key to fill in

grub> initrd /boot/initrd.img-6.1.0-7-amd64

The version string should be identical to the one for vmlinuz.

grub> boot

should now boot up your system.

You can do ls (hd0,1) to list its contents. If you see the familiar folders and vmlinuz
Hi, thanks for your reply,

But as I mentioned earlier, there is no kernel and initrd in the filesystem, and there is nothing in other partitions too and I have one disk only. However, I tried this anyway and Tab isn't filling up the remaining part of the file name.
 
Hi, I created a custom live system based on debian 12 bookworm. Now I am trying to install my custom system to vmware virtual machine using calamares installer. I installed calamares and calamares-settings-debian packages and didn't change any of the configuration files.
Maybe, let us know how you created your 'live' - did it work running live(?) - if it uses a compressed file system your kernel may not be in the same compressed file - also was calamares actually included in the 'live' image(?).
 
Maybe, let us know how you created your 'live' - did it work running live(?) - if it uses a compressed file system your kernel may not be in the same compressed file - also was calamares actually included in the 'live' image(?).
Hi, my live system is working. I can burn it to usb and boot it without problem. I created my live system using this tutorial: https://www.willhaley.com/blog/custom-debian-live-environment/ . I did everything the same except I installed a few more packages and did some configurations. Calamares installer wasn't pre-installed in the live system.
The installer unpacks the filesystem.squashfs in the path. I haven't really checked the squashfs filesystem by unpacking it yet. I was assuming that it contains the kernel inside, but I should check it later.
 
Thanks for showing the link from which the instructions for the live disk were taken, from the Will Haley exposition.

It's worth noting that the live disk described by Haley was for creating a bootable live disk and lacked any information or instruction on installing the live distro to a hard drive or VM.

Adding the calamares installer package to the live build would also need all the dependencies of the calamares program which can be seen below in the Depends: section, so I guess one would need to check the presence of those in detail, though the version numbers might vary according to what else has been selected. Any absences would likely cause failure.

Code:
Package: calamares
Source: calamares (3.2.61-1)
Version: 3.2.61-1+b1
Installed-Size: 10761
Maintainer: Jonathan Carter <[email protected]>
Architecture: amd64
Depends: os-prober, kpackagetool5, libboost-python1.74.0 (>= 1.74.0),
libboost-python1.74.0-py311, libc6 (>= 2.34), libcrypt1 (>= 1:4.1.0),
libgcc-s1 (>= 3.0), libkf5configcore5 (>= 4.97.0), libkf5coreaddons5 (>= 5.96.0),
libkf5package5 (>= 5.5.0+git), libkf5parts5 (>= 4.96.0), libkpmcore12 (>= 22.04.3),
libparted2 (>= 3.1), libpwquality1 (>= 1.1.0),
libpython3.11 (>= 3.11.0), libqt5core5a (>= 5.15.1),
libqt5dbus5 (>= 5.14.1), libqt5gui5 (>= 5.14.1) | libqt5gui5-gles (>= 5.14.1),
libqt5network5 (>= 5.0.2), libqt5qml5 (>= 5.10.0),
libqt5quick5 (>= 5.0.2) | libqt5quick5-gles (>= 5.0.2),
libqt5quickwidgets5 (>= 5.3.0), libqt5svg5 (>= 5.6.0~beta),
libqt5webkit5 (>= 5.212.0~alpha3),
libqt5widgets5 (>= 5.15.1), libqt5xml5 (>= 5.0.2),
libstdc++6 (>= 9), libyaml-cpp0.7 (>= 0.7.0)
Recommends: btrfs-progs, squashfs-tools
Description-en: distribution-independent installer framework
 Calamares is a distribution-independent installer framework.
 .
 It provides a graphical installer that can be used with nearly
 any distribution. This package is suitable for live media on
 Debian-based systems, and won't be of any particular use on
 an already installed system.
 .
 You will likely want to provide your own config files to match
 your distribution, reading the Calamares documentation will guide
 you through that process.
Description-md5: 4d5b78b9b4c9dcb910431a58e1938ff8
Homepage: https://github.com/calamares/calamares
Tag: uitoolkit::qt
Section: utils
Priority: optional
Filename: pool/main/c/calamares/calamares_3.2.61-1+b1_amd64.deb
Size: 4132032
MD5sum: 98f26a6202735395cbd8bf7c1121ac41
SHA256: 54a7ed1c7b890ec12a9c4a311fdd7d894dfcdb19b2208d39c52883a3d3017c88
 
This is why you can't get it to install, it has to be part of the 'live' image, plus I'm not sure if calamares works with 'live' systems, the one that I usually have in 'live' systems is 'refracta installer' - http://www.ibiblio.org/refracta/documents.html
The debian live install images do run calamares. From: https://www.debian.org/CD/live/
Installer: Starting from Debian 10 Buster, the live images contain the end-user-friendly Calamares Installer, a distribution-independent installer framework, as alternative to our well known Debian-Installer.
One would likely wish to include the package: calamares-settings-debian, as well ...
Code:
[flip@flop ~]$ apt-cache show calamares-settings-debian
<snip>
Description-en: Debian theme and settings for the Calamares Installer
 Calamares is a generic installer framework for Linux distributions.
 By default, it contains a set of boilerplate wording and images. This
 package provides the latest Debian artwork as well as scripts that
 supports EFI installations.
 .
 It also serves as an example for how derivatives can create their own
 calamares-settings packages.
<snip>
 
Adding the calamares installer package to the live build would also need all the dependencies of the calamares program which can be seen below in the Depends: section, so I guess one would need to check the presence of those in detail, though the version numbers might vary according to what else has been selected. Any absences would likely cause failure.
Thanks for your reply, I tried both pre-installing calamares in live iso and installing it later. They are having the same outcome. Also, when installing calamares package, it installs all its dependencies, so every dependendent package is available in the system.

You will likely want to provide your own config files to match
your distribution, reading the Calamares documentation will guide
you through that process.
calamares-settings-debian package provides necessary configuration files. Debian's own configuration files should be suitable for my system as well since they are the same distro version and have the same structure. However, I also took a look at the bootloader configurations, but there is nothing to edit.

There is a line in the bootloader configuration file of calamares:
Code:
grubCfg: "/boot/grub/grub.cfg"
However, there is no grub configuration file in the system. Maybe this is the case, but debian's official installer doesn't have /boot/grub either, both in its live system and its squashfs filesystem, I wonder
 
Last edited:
Thanks for your reply, I tried both pre-installing calamares in live iso and installing it later. They are having the same outcome. Also, when installing calamares package, it installs all its dependencies, so every dependendent package is available in the system.


calamares-settings-debian package provides necessary configuration files. Debian's own configuration files should be suitable for my system as well since they are the same distro version and have the same structure. However, I also took a look at the bootloader configurations, but there is nothing to edit.

There is a line in the bootloader configuration file of calamares:
Code:
grubCfg: "/boot/grub/grub.cfg"
However, there is no grub configuration file in the system. Maybe this is the case, but debian's official installer doesn't have /boot/grub either, both in its live system and its squashfs filesystem, I wonder
The debian live isos don't use grub as their bootloader, so there's no grub.cfg. They use syslinux as the bootloader, but when they install to hard disk, the calamares installer can install grub as the bootloader of the installed system.

Here is the structure of a stock debian live disk, debian-live-11.5.0-amd64-lxde+nonfree.iso, mounted on a loop device to see the files:

Code:
[tom@fen /mnt]$ ll
total 24K
drwxr-xr-x 1 root root 2.0K Sep 10  2022 boot
drwxr-xr-x 1 root root 2.0K Sep 10  2022 d-i
drwxr-xr-x 1 root root 2.0K Sep 10  2022 dists
drwxr-xr-x 1 root root 2.0K Sep 10  2022 EFI
drwxr-xr-x 1 root root  10K Sep 10  2022 firmware
drwxr-xr-x 1 root root 2.0K Sep 10  2022 isolinux
drwxr-xr-x 1 root root 2.0K Sep 10  2022 live
drwxr-xr-x 1 root root 2.0K Sep 10  2022 pool
[ben@fen /mnt]$ cd isolinux/
[tom@fen /mnt/isolinux]$ ll
total 690K
-r--r--r-- 1 root root 2.0K Sep 10  2022 boot.cat
-rw-r--r-- 1 root root 163K Sep 10  2022 hdt.c32
-rw-r--r-- 1 root root  38K Sep 10  2022 isolinux.bin
-rw-r--r-- 1 root root  157 Sep  7  2022 isolinux.cfg
-rw-r--r-- 1 root root 117K Sep 10  2022 ldlinux.c32
-rw-r--r-- 1 root root 166K Sep 10  2022 libcom32.c32
-rw-r--r-- 1 root root  66K Sep 10  2022 libgpl.c32
-rw-r--r-- 1 root root  24K Sep 10  2022 libmenu.c32
-rw-r--r-- 1 root root  23K Sep 10  2022 libutil.c32
-rw-r--r-- 1 root root  27K Sep 10  2022 memdisk
-rw-r--r-- 1 root root  16K Sep 10  2022 menu.cfg
-rw-r--r-- 1 root root  21K Sep  7  2022 splash.png
-rw-r--r-- 1 root root  733 Sep 10  2022 stdmenu.cfg
-rw-r--r-- 1 root root  27K Sep 10  2022 vesamenu.c32

If you look into the menu.cfg it will be apparent where syslinux looks for the kernel and the initrd to boot the live system.

If I understand you, you want to get calamares to install your boutique live image on a VM.

The stock debian live images can do that, but as I mentioned earlier in post #11, about the instructions you used, "the live disk described by Haley was for creating a bootable live disk and lacked any information or instruction on installing the live distro to a hard drive or VM."

I haven't created or used the live isos for installing, rather just used them to run the live system for various immediate purposes at the time. I guess the answer lies in a deeper dive into an actual debian live iso that is installable and how it calls calamares, about which I can't say anything useful at this point.
 

Members online


Latest posts

Top