mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-04-25 15:15:56 +03:00
[GH-ISSUE #37] NixOS support #19
Labels
No labels
Hacktoberfest
Hacktoberfest
bootloader
bsd
bug
confirmed
documentation
duplicate
enhancement
enhancement
enhancement
eol
experimental-merged
freebsd
help wanted
invalid
investigate
ipxe
linux
live-os
memdisk
menu
no-issue-activity
no-issue-activity
pull-request
released
todo
upstream
windows
windows
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/netboot.xyz#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @globin on GitHub (Jan 17, 2016).
Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/37
Originally assigned to: @antonym on GitHub.
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.
@domenkozar commented on GitHub (Jan 17, 2016):
ISO: https://nixos.org/releases/nixos/latest-iso-minimal-x86_64-linux
@antonym commented on GitHub (Jan 17, 2016):
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
initrd http://releases.nixos.org/nixos/15.09/nixos-15.09.919.b3bba00/nixos-minimal-15.09.919.b3bba00-x86_64-linux.iso
boot
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.
@domenkozar commented on GitHub (Jan 17, 2016):
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
@domenkozar commented on GitHub (Jan 17, 2016):
Otherwise we'll have to use https://github.com/sleinen/nixos-pxe-installer
@antonym commented on GitHub (Jan 17, 2016):
Yeah, no luck with the unstable either.
@domenkozar commented on GitHub (Jan 17, 2016):
Thanks @antonym
@davidak commented on GitHub (Jan 23, 2016):
That is the same error i have when booting on machines with a BIOS (unlike EFI).
https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-171042344
@nshalman commented on GitHub (Apr 14, 2016):
https://github.com/NixOS/nixpkgs/issues/14538 may help.
@antonym commented on GitHub (Apr 14, 2016):
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.
@nshalman commented on GitHub (Apr 15, 2016):
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.
@antonym commented on GitHub (Apr 15, 2016):
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.
@domenkozar commented on GitHub (Apr 29, 2016):
We've added (i)PXE support now in https://github.com/NixOS/nixpkgs/pull/14740, this should be possible.
@antonym commented on GitHub (Apr 29, 2016):
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?
@antonym commented on GitHub (Apr 29, 2016):
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.
@domenkozar commented on GitHub (Apr 29, 2016):
That would indeed be most simple and it should be completed once https://github.com/NixOS/nixos-channel-scripts/issues/6 is closed
@antonym commented on GitHub (Jun 30, 2016):
Any progress on this?
@domenkozar commented on GitHub (Aug 16, 2016):
I've pushed a commit that gets us closer, see https://github.com/NixOS/nixos-channel-scripts/issues/6#issuecomment-240138999
Now we just need to modify mirroring script for channels and this should be ready.
@antonym commented on GitHub (Aug 16, 2016):
Nice, was able to get NixOS to boot via netboot.xyz using that latest build. Here's my initial testing branch:
github.com/antonym/netboot.xyz@9d8cca27c9Is 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.
@domenkozar commented on GitHub (Aug 16, 2016):
@antonym use
init=/nix/var/nix/profiles/system/init@antonym commented on GitHub (Aug 16, 2016):
Perfect, thanks!
@antonym commented on GitHub (Aug 16, 2016):
@domenkozar looks like there's only a /nix/var/nix/profiles/per-user and not a system/init
@domenkozar commented on GitHub (Aug 16, 2016):
Huh, that's strange,
systemprofile should exist. Can you scan initrd ofinitfile (mind it can be a symlink)@bobvanderlinden commented on GitHub (Aug 16, 2016):
From what I've gathered, there isn't a clear symlink to init at the moment. At boot time (stage2)
/run/current-systemis linked, which will containinit, but at that time it's already too late./nixas a whole isn't included because squashfs only contains/nix/store/*and that is mounted at stage1. I've tried to get around this problem by creating/nix/var/nix/profiles/systemin stage1, but usingln -s "${config.system.build.toplevel}" /nix/var/nix/profiles/systemin there will cause a recursive loop (config.system.build.toplevelcannot be created without stage1).Still need to investigate what the best solution for this is.
@domenkozar commented on GitHub (Aug 17, 2016):
We could just generate
nixos.ipxeand then updating would mean copying that file. That seems the easiest here.@antonym commented on GitHub (Aug 17, 2016):
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!
@bobvanderlinden commented on GitHub (Aug 17, 2016):
I'm not entirely sure what the limitations are, but a possible quickfix would be using
chain http://hydra.nixos.org/something/netboot.ipxe. Each version should have its ownnetboot.ipxefile already.bzImageandinitrdshould be in the same directory asnetboot.ipxe.@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)
@antonym commented on GitHub (Sep 21, 2016):
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.
@domenkozar commented on GitHub (Sep 21, 2016):
@bobvanderlinden
initis really${config.system.build.bootStage2}, so we need stage2 built at that time.@antonym we need to implement https://github.com/NixOS/nixos-channel-scripts/issues/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?
@antonym commented on GitHub (Sep 21, 2016):
@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.
@antonym commented on GitHub (Jan 28, 2017):
Just curious how things are going on this end. Are we getting any closer to a release of the network builds?
@domenkozar commented on GitHub (Jan 28, 2017):
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.
@nshalman commented on GitHub (Mar 28, 2018):
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 https://github.com/NixOS/nixpkgs/pull/14740#issuecomment-215049974 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?"
@grahamc commented on GitHub (Mar 28, 2018):
I can see about getting them pushed through the channel scripts, it shouldn't take too much work there.
@Mic92 commented on GitHub (Jul 30, 2018):
https://github.com/NixOS/nixpkgs/pull/44089 is related to this.
@Mic92 commented on GitHub (Feb 5, 2019):
@lassulus got something working! https://nixos.wiki/index.php?oldid=2984&rcid=3040
https://github.com/Lassulus/netboot.xyz/tree/nixos
@nshalman commented on GitHub (Feb 5, 2019):
Based on my testing, the following appears to work:
chain https://hydra.nixos.org/job/nixos/release-18.09/nixos.netboot.x86_64-linux/latest/download/netboot.ipxeThought we might want to prefer to use
chain https://hydra.nixos.org/job/nixos/release-18.09/nixos.netboot.x86_64-linux/latest-finished/download/netboot.ipxe@antonym commented on GitHub (Feb 6, 2019):
Merged support for NixOS so we can finally close this out!