-
-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NixOS support #37
Comments
Thanks for the request, I gave this a quick try with memdisk and ran into: http://i.imgur.com/dNV2Xru.png You can replicate this by going into the iPXE command line and doing: kernel http://boot.netboot.xyz/memdisk iso raw I believe this might be a way to get it work from the syslinux pages. Ultimately the most ideal way is not to use ISOs but to pull the kernel, initramfs, and the rootfs from a official mirror. |
Hmm, it's worth to also try the unstable http://nixos.org/releases/nixos/unstable/nixos-16.03pre75174.d0e3cca/nixos-minimal-16.03pre75174.d0e3cca-x86_64-linux.iso |
Otherwise we'll have to use https://github.com/sleinen/nixos-pxe-installer |
Yeah, no luck with the unstable either. |
Thanks @antonym |
That is the same error i have when booting on machines with a BIOS (unlike EFI). |
NixOS/nixpkgs#14538 may help. |
For installing from netboot.xyz, the installer ISO needs to be able to leverage memdiskfind to identify where the ISO has been loaded into RAM when it fails to load it from CD. Then we can leverage memdisk to load the ISO image and run through an install from iPXE. https://www.reversengineered.com/2016/01/07/booting-linux-isos-with-memdisk-and-ipxe/ We don't want to worry about cracking open the image ourselves, but rather want to utilize the release ISO provided by the distribution. |
Sure, but an ISO generated that doesn't depend on being able to further find a squashfs might work better than the current ISO that does. In short, an ISO generated using the kernel and ramdisk built the way that I'm developing might have a better shot at working. I'm glad you clarified for me that you always use an ISO. It will be up to others to decide what to do with the work that I'm doing. |
Ah, I see what you are saying, yeah, if it doesn't need to look for a squashfs and has everything it needs in the initrd, then that works as well. |
We've added (i)PXE support now in NixOS/nixpkgs#14740, this should be possible. |
So can I expect to be able to point directly to the release ISO during the next release after the merge (https://nixos.org/releases/nixos/latest-iso-minimal-x86_64-linux) to boot via memdisk? Or would I still be required to self host the files? |
Even better would be if I could just point to the vmlinuz and initrd of the installer kernels like I can do with Fedora today. If during the release cycle, NixOS could make those available as part of the release, it makes things a lot simpler and faster since then I can skip using memdisk to load the build. I'm trying to avoid hosting or manipulating the release files of the distributions myself and instead relying on the projects to host the files to maintain as much trust as possible. |
That would indeed be most simple and it should be completed once NixOS/nixos-channel-scripts#6 is closed |
Any progress on this? |
I've pushed a commit that gets us closer, see NixOS/nixos-channel-scripts#6 (comment) Now we just need to modify mirroring script for channels and this should be ready. |
Nice, was able to get NixOS to boot via netboot.xyz using that latest build. Here's my initial testing branch: Is there a way to simplify the name of the init path? It's easier to update versions over time if the path is predictable. I wasn't sure if that was just a build server artifact or not. |
@antonym use |
Perfect, thanks! |
@domenkozar looks like there's only a /nix/var/nix/profiles/per-user and not a system/init |
Huh, that's strange, |
From what I've gathered, there isn't a clear symlink to init at the moment. At boot time (stage2)
Still need to investigate what the best solution for this is. |
We could just generate |
What I usually do for netboot.xyz is create a menu with the options to load multiple versions if available. If there's a unique init path on each version, it complicates the menu process as I'd have to store that init path for each version. If it's more uniform, then I can make minimal changes for ongoing support as then I only have to change the location of the bzImage and initrd. I can hardcode the unique init locations for now to get rolling but it would be nice to have a generic symlink to use in the future. Thanks for everyones work on this so far too, appreciate it! |
I'm not entirely sure what the limitations are, but a possible quickfix would be using @domenkozar At the moment they aren't in the same 'directory'. Is there an url where they actually are? (http://hydra.nixos.org/build/38615837/download/3/netboot.ipxe and http://hydra.nixos.org/build/38603078/download/2/initrd) |
Are the network builds queued up for the next NixOS release? If not, would there be a good place to point for release candidate images? I'd like to get an initial NixOS support pushed, but I also want to make sure they are useful and not just coming off random build server releases directly. |
@bobvanderlinden @antonym we need to implement NixOS/nixos-channel-scripts#6 to copy the files into a directory. As @bobvanderlinden mentioned, best way to avoid specifying init would be for us to publish ipxe that would be chain-loaded. Does that sound good? |
@domenkozar I guess in my use case I would need to add additional logic like urls directly to the kernels, signature checking and etc, so I probably would not be chaining the ipxe file directly. What's typically useful for this sort of thing is having the url to the images and kernel command line consistent with the only change being usually being the version or architecture. That makes it a lot easier to maintain over time and then I just need to bump the versions in the ipxe code for that distro. |
Just curious how things are going on this end. Are we getting any closer to a release of the network builds? |
Not much has happened since. This is mostly done, sadly I don't use this work atm and have no time to take it forward. |
I haven't had a chance to work on NixOS related code in a while. Perhaps @grahamc has enough spare cycles to take a quick look. My sense is that if the netboot kernel and initrd were marked for hydra to publish, then URLs could be provided to netboot.xyz to use. I think this NixOS/nixpkgs#14740 (comment) from @domenkozar is the hint as to what remains to be done on the NixOS side. I think would provide some nice visibility to NixOS when people see it in the boot menu and ask themselves "Huh, what's that?" |
I can see about getting them pushed through the channel scripts, it shouldn't take too much work there. |
NixOS/nixpkgs#44089 is related to this. |
Based on my testing, the following appears to work: Thought we might want to prefer to use |
Quoting https://nixos.org/
See NixOS/nixpkgs#2100 for more information and feel free to join the #nixos channel on freenode for more information and answers.
The text was updated successfully, but these errors were encountered: