Open bam80 opened 7 months ago
yes, there a multiple solutions. like a modification of https://github.com/nix-community/disko/blob/master/docs/disko-install.md#using-disko-install-in-an-offline-installer or https://github.com/nix-community/nixos-anywhere
Thanks.
Few questions:
modification of https://github.com/nix-community/disko/blob/master/docs/disko-install.md#using-disko-install-in-an-offline-installer
It's not quite clear to me what I supposed to do with these two snippets?:
disko-install "can also be used to create bootable USB-Sticks from your normal workstation."
https://github.com/nix-community/disko/blob/master/docs/disko-install.md#disko-install The bootable USB-Stick presumably will contain the installed system here, but what I wanted to achieve is to generate unattended installation media instead. Is it possible?
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/cloud-init-unattended-install/39149/5
Any help?
Can you please clarify what you mean by unattended installer? The code here does install NixOS onto a system when the installer is booted: https://github.com/nix-community/disko/blob/master/docs/disko-install.md#using-disko-install-in-an-offline-installer
OK, as I mentioned above, I do not quite understand how to exactly use these code snippets. It also was other question, could you look? https://github.com/nix-community/disko/issues/606#issuecomment-2067365962
You include those in a configuration that generates an image i.e. using nixos-generators: https://github.com/nix-community/nixos-generators?tab=readme-ov-file#supported-formats
Sorry, it's still not clear to me how to embed that snippets. Could you provide complete files please, not just snippets? And the commands to run after.
Please note I don't have Nix/NixOS yet.
You include those in a configuration that generates an image i.e. using nixos-generators: https://github.com/nix-community/nixos-generators?tab=readme-ov-file#supported-formats
@Mic92 so I installed Nix package manager to the system. But further steps are unclear to me.
I would be appreciate for your support.
I have "a" solution to this... it's still a bit hacky, but everything is building, it's just not booting. https://github.com/cowboyai/cim-start/blob/main/vhosts/x86/readme.md that builds an x86 system with libvirtd and specifically with 2 nvme drives and loads 3 containers. it builds correctly and deploys properly, then hangs at reboot because it won't load the disko config. it is specified here: https://github.com/cowboyai/cim-start/blob/main/vhosts/x86/vhost-dev/configuration.nix I have tried every attempt I have seen documented and cannot get the bootloader to configure correctly. The ISO works fine... create the ISO, boot the system... I have to usually restart wpa_supplicant and then install.service once I have an IP. then the system auto-builds correctly, exits disko-install correctly with no errors. on reboot, it hangs ALWAYS waiting for /dev/disk/by-partlabel/disk-sys-nixos rebooting into the ISO and getting a console reveals lsblk to show nvme0n1 does indeed contain two partitions, nvme0n1p1: disk-sys-boot nvme0n1p2: disk-sys-nixos nvme1n1p1: disk-data-data
![Uploading 20240502_091147.jpg…]()
on reboot, it hangs ALWAYS waiting for /dev/disk/by-partlabel/disk-sys-nixos rebooting into the ISO and getting a console reveals lsblk to show nvme0n1 does indeed contain two partitions, nvme0n1p1: disk-sys-boot nvme0n1p2: disk-sys-nixos nvme1n1p1: disk-data-data
My efforts are still ongoing, but seems I passed the stage you stuck on, see: https://github.com/nix-community/disko/issues/613#issuecomment-2079307891
for auto-installation, I am using a systemd service that runs when the iso boots... https://github.com/cowboyai/cim-start/blob/main/vhosts/x86/builder.nix this is all working perfectly until reboot and then mounts all fail. I just don't see anywhere in the docs or the code that says I have to explicitly tell it to load something in the bootloader, in fact it specifically says NOT to and that utterly fails on grub... to even get grub to try to boot it needs grub.boot.device = ["some partition"]... ["nodev"] always fails on grub. systemd seems to work, but fails to mount root onto "/". I cannot see what is getting written to initrd so I can't tell if it is passing something incorrectly or not.
WFIW, for my configuration I linked above, I had to pass OVMF firmware file to Qemu (for UEFI to work), and it uses systemd-boot. I was able to boot the installed system then.
I don't see a link to your config for that... I will need to do some of that later like: boot.initrd.kernelModules = [ "vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd" ]; so I can pass through a GPU. but that shouldn't be needed to get the boot to work.
I don't see a link to your config for that...
The config is embedded in the linked flake:
https://github.com/nix-community/disko/issues/613#issuecomment-2079307891
No more configs were used, search net for how to run Qemu with UEFI.
This is how I did it: https://gitlab.com/misuzu/nixos-unattended-install-iso
And this is how I did it https://github.com/ibizaman/skarabox
Linking to these examples might already be a win wrt the discoverability of this.
Could we produce a solution for unattended install?