Can someone explain in detail here how to set the Dom0 disk space to 40 GiB?

I have all three version slots installed for both, and my /boot usage is below 600 MiB. But it depends on the size of the initramfs generated during kernel updates. They can be larger if more kernel modules happen to be loaded at that time, or I guess if more firmware blobs need to be bundled, or if dracut was configured for no-hostonly mode.

Anyway yes it would be better if the installer defaulted to 2 GiB for /boot.

Question: Which `grub` exit command is the correct one, since I’ve already gotten a few error messages!

It’s now showing 70% for me.

I don’t understand your question. Can you give some context about what are you trying to do?

I’ve now deleted/removed quite a few things from the Dom0 boot drive. Now I’m supposed to finish the process with a GRUB command.

That way, the laptop can be restarted afterward.

I suspect that if I don’t do that, the boot drive will be at 100% again.

Or that the laptop won’t start up properly anymore, since I’ve removed some old files from the boot drive.

You need to run this command to regenerate the GRUB config:

grub2-mkconfig -o /boot/grub2/grub.cfg

You can boot just fine without doing it, but the GRUB menu will contain non-existing entries.

Answer:

grub2-mkconfig: You must run this as root

Question: How do you do that?

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Is that correct, or is there a mistake in there?

qubesos@dom@:\~$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.1.6-1.qubes.fc41.x86_64
Found initrd image: /boot/initramfs-7.1.6-1.qubes.fc41.x86_64.img
fgrep: warning: fgrep is obsolescent; using grep -F
Found linux image: /boot/vmlinuz-7.0.14-1.qubes.fc41.x86_64
Found initrd image: /boot/initramfs-7.0.14-1.qubes.fc41.x86_64.img
fgrep: warning: fgrep is obsolescent; using grep -F
Found linux image: /boot/vmlinuz-7.0.12-1.qubes.fc41.x86_64
fgrep: warning: fgrep is obsolescent; using grep -F
Found linux image: /boot/vmlinuz-6.18.42-1.qubes.fc41.x86_64
fgrep: warning: fgrep is obsolescent; using grep -F
Found linux image: /boot/vmlinuz-6.18.40-1.qubes.fc41.x86_64
Found initrd image: /boot/initramfs-6.18.40-1.qubes.fc41.x86_64.img
fgrep: warning: fgrep is obsolescent; using grep -F
Found linux image: /boot/vmlinuz-6.18.35-1.qubes.fc41.x86_64
fgrep: warning: fgrep is obsolescent; using grep -F
fgrep: warning: fgrep is obsolescent; using grep -F
Adding boot menu entry for UEFI Firmware Settings
done

This is correct.

Okay, thanks. Then I can turn off my laptop or restart it.

Wanted to flag that the instructions might be incomplete and lead to data loss when writes fail as qubes_dom0/root appears backed by qubes_dom0/root-pool. Accordingly, the root-pool also needs to be enlarged. Otherwise, writes may start to fail when the root-pool size limit is reached.

might be a safer option.