| 30 Nov 2025 |
not-jack | whats the advantage to having both boot and an ESP partitions?
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
| 13:39:39 |
not-jack | * whats the advantage to having both boot and an ESP partitions?
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
| 13:39:49 |
not-jack | what does the boot partition do here? | 13:44:42 |
hexa | that's called hybrid | 14:04:27 |
hexa | if you don't care or the thing needs to be portable | 14:04:36 |
not-jack | so i can get rid of it? | 14:05:47 |
mou | I'm using systemd-boot (no grub) with UEFI, and for this it is enought to have single /boot with ESP like this
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "2G";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
| 14:08:25 |
mou | but your config mentioned MBR in comments, so it might be different situation for you | 14:09:13 |
not-jack | this is the default config for single disk ext4 | 14:10:19 |
not-jack | so i think we're in the same situation | 14:11:48 |
mou | As i understand logic of the boot process, the important part is decide are you using UEFI. If yes, you have to have GPT partition table (not mbr) and old MBR requirement to have bootloader in first 512K of the drive is no longer reuirement. So this reservation for grub is not needed | 14:15:35 |
not-jack | aha, so it's legacy for backwards compat with grum | 14:16:46 |
not-jack | * aha, so it's legacy for backwards compat with grub | 14:16:48 |
mou | It is not grub specific. It is applicable to any bootloader for MBR partitioned drive. All bootloader put their initialization code into first 512K right after partition table | 14:17:51 |
not-jack | * aha, so it's legacy for backwards compat with grub MBR | 14:19:33 |
mou | But i did not refreshed my knowledge in this area for last decade, so i might mix things up. So, if you want to be sure, do additional check. | 14:19:34 |
not-jack | the check will be seeing if i can boot! | 14:19:50 |
mou | Here is more in depth explanation of the logic. https://superuser.com/questions/1566558/is-a-boot-sector-considered-to-be-a-partition | 14:22:28 |
not-jack | thanks, that helps :) | 14:26:46 |
spewdins | For those using disko for vm’s disk sizes…
I wonder. Are you declaratively setting your vm .qcow2 for example, from the host system? Or from inside the vm. | 17:03:16 |
not-jack | When using disko-install, i get no space left on device | 19:59:11 |
not-jack | I've tried remounting the store with more space, but that doesn't seem to do anything | 20:00:00 |
not-jack | Anyone have tips? | 20:00:07 |
not-jack | Actually, looks like i'm oom'ing now | 20:06:19 |
| ChickenIQ joined the room. | 21:39:45 |
ChickenIQ | I've been trying to generate a disk image for my pi 4 with disko, but i keep getting an error: "Firmware not found"
Any idea on how i could fix it?
Repo: https://github.com/ChickenIQ/NixOSPI4 | 21:45:53 |
ChickenIQ | * I've been trying to generate a disk image for my pi 4 with disko, but i keep getting an error on boot: "Firmware not found"
Any idea on how i could fix it?
Repo: https://github.com/ChickenIQ/NixOSPI4 | 21:47:01 |
| 1 Dec 2025 |
ChickenIQ | this seems to be enough to get it to work
esp = {
size = "1024M";
type = "EF00";
content = {
format = "vfat";
type = "filesystem";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
postMountHook =
let
configTxt = pkgs.writeText "config.txt" ''
[pi4]
kernel=u-boot-rpi4.bin
disable_overscan=1
enable_gic=1
arm_boost=1
[all]
avoid_warnings=1
enable_uart=1
arm_64bit=1
'';
in
toString (
pkgs.writeScript "postMountHook.sh" ''
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup4.dat start4.elf bcm2711-*.dtb /mnt/boot/)
cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin /mnt/boot/u-boot-rpi4.bin
cp ${configTxt} /mnt/boot/config.txt
''
);
};
};
| 00:20:12 |
ChickenIQ | proper hack, works without disko too
{
config,
pkgs,
lib,
...
}:
let
installBootLoader =
(import (pkgs.path + "/nixos/modules/system/boot/loader/generic-extlinux-compatible") {
inherit config lib pkgs;
}).config.content.system.build.installBootLoader;
populateFirmware =
(import (pkgs.path + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix") {
inherit config lib pkgs;
}).sdImage.populateFirmwareCommands;
installCmd = pkgs.writeShellScript "populate-boot.sh" ''
set -e && export PATH=${pkgs.coreutils}/bin:$PATH
${installBootLoader} "$@"
ln -s "/boot" "$NIX_BUILD_TOP/firmware"
cd "$NIX_BUILD_TOP" && ${populateFirmware}
echo "include usercfg.txt" >> /boot/config.txt
'';
in
{
system.build.installBootLoader = lib.mkForce installCmd;
}
| 03:27:03 |
ChickenIQ | * proper hack, works without disko too
{
config,
pkgs,
lib,
...
}:
let
installBootLoader =
(import (pkgs.path + "/nixos/modules/system/boot/loader/generic-extlinux-compatible") {
inherit config lib pkgs;
}).config.content.system.build.installBootLoader;
populateFirmware =
(import (pkgs.path + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix") {
inherit config lib pkgs;
}).sdImage.populateFirmwareCommands;
installCmd = pkgs.writeShellScript "populate-boot.sh" ''
set -e && export PATH=${pkgs.coreutils}/bin:$PATH
${installBootLoader} "$@"
ln -s "/boot" "$NIX_BUILD_TOP/firmware"
cd "$NIX_BUILD_TOP" && ${populateFirmware}
echo "include usercfg.txt" >> /boot/config.txt
'';
in
{
system.build.installBootLoader = lib.mkForce installCmd;
}
| 03:27:14 |