-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Various changes and fixes with the general aim to support netbooting NixOS #2920
Conversation
So that `user` mount option would work allowing normal users to mount and umount stuff marked with it in `fileSystems.<name>.options`.
patches = [ debianPatch ]; | ||
|
||
postInstall = '' | ||
wrapProgram $out/sbin/atftpd --prefix LD_LIBRARY_PATH : ${stdenv.gcc.gcc}/lib${if stdenv.system == "x86_64-linux" then "64" else ""} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this in RPATH anyway? Maybe it should be fixed by patchelf, not by wrapping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be, I suppose, but for some reason it is not. Expression for wine in nixpkgs has the same problem.
Which are the ugly hacks you pointed out? |
@iElectric no hacks included here |
@iElectric currently it needs a bit hacky kernel configuration and a huge nonmodular blob of nix code I'm not quite ready to share yet. But I'm working on it. |
Also, @iElectric, could you then please cherry-pick 5e4d0f5 too? Isn't it minor enough? |
I have been booting nixos with pxe and it works ok, you need to use tarball On Wed, Jun 25, 2014 at 11:06 PM, Jan Malakhovski notifications@github.com
-----BEGIN PGP PUBLIC KEY BLOCK----- mQENBFEY1PEBCADPOfERF2wo4qeoq9L1m2z4pKfWqNd4B6BsoFUWPNd7BXmY+9JG |
@offlinehacker Yep, but the goal here is a bit more ambitious (cf. see the first line in the opening comment of the thread). |
@oxij cherry-picked, thanks! |
I guess we should cherry-pick the rest of non-obsolete changes and close… Does anyone know what changes are still relevant? |
@7c6f434c my humble opinion is than every non-applied change from this PR is still relevant |
What do we need from the Debian atftp patch? |
And what do we still need now? I tried to edit and commit most of the patches left… |
@7c6f434c debian pretty much maintains atftpd with their patch, I'd say we need less bugs and IPv6 support. Everything else looks merged in. |
Please verify that everything is now applied into master and if so, close the pull request. |
@oxij forgot to put Cc mark and no idea how GitHub handles this |
@7c6f434c Thanks. To do a proper testing I need to rebase a hefty branch that uses all these changes on top of current master, and that needs (much) more time (than expected) which I won't have at least till the end of the week. So, note that I will eventually reply and do not close this yet. |
@oxij Any news? My theory is that I have merged everything from this pull request and that you will have more fixes (not included here yet) once you test. Maybe close this instance and open a new request when you have more improvements? |
@7c6f434c three weeks ago I wasn't able to build this, but current master seems to compile and even netboot. |
Now we need a wiki page describing how to set this up :) |
@oxij Can you shortly describe how to set this up? We'll create a wiki page after that. Or you can do it yourself. |
I'd add this to NixOS manual to have information less fragmented. |
🍻 |
@oxij if you could just post a configuration file for the server and client On Thu Nov 13 2014 at 9:37:06 PM Arseniy Seroka notifications@github.com
|
@wmertens @jagajaga @iElectric a) it doesn't work perfectly; b) it's so ugly I'm embarrassed. What I do is I generate a pxelinux and/or iPXE configuration files referencing a set of system profiles and nixos expressions for dhcp/atftp/lighttp daemons from PXE and nixos daemon configurations are more or less okay, but the main part that evaluates nixos-configs into netbootable system profiles is so abhorrent I'm seriously surprised that it works. The problem is that netbooting with network-mounted root needs an early network, which I currently provide by a custom kernel config (with all the networking drivers and nfs builtin and "ip=dhcp" parameter), initrd (fs root mounting hack similar to live-cd profile) and some minor hacks (like persistent dhcpcd). Even after all that this doesn't ensure a successful boot, because some network card drivers need firmware blobs which are to be supplied by userspace, but "ip=dhcp" forces the kernel to mount/run initrd only after the network is up. In a way, I'm waiting for someone to make initrd configuration somewhat more modular so that one could generate a proper initrd with a service which would set the network up before /nix/store is mounted. Starting an init daemon from initrd would be perfect, but even a modular initrd/init script with an easy way to place packages onto initrd would be nice. I tried to implement this in a proper way myself, but after two weeks of non-stop hacking it turned out to be much more work than I was prepared to commit. Currently, I have a setup that has something like 80% chance of working, with 20% of effort (and I'm not happy with that). What I can probably do with a clear conscience is to transform the PXE part into nixos service, and put everything else into an example configuration profile. Will that be okay? |
About an init in the initrd, you may be interested in my systemd in initrd On Sat, Nov 15, 2014 at 1:28 AM, Jan Malakhovski notifications@github.com
www.debian.org - The Universal Operating System |
@oxij did you get PXE boot working with NixOS? Note there is https://github.com/sleinen/nixos-pxe-installer |
Yep. Like two years ago. You'd be surprised, but the biggest problem with my approach is that for (Yep, I actually though about forking nixpkgs on this point, but I hate I understand why @sleinen implemented his thing, installing via PXE is Also, my approach is somewhat more verbose than I'd like, e.g.:
Most of that crap is just the nature of PXE booting, but e.g. those
lines drive my crazy, especially when there's a ton of entries there, |
@oxij thank you. I'll review this in detail once I'm onto PXE boot and check on the level of effort. |
by serving NixOS images from a NixOS machine to anything supporting PXE.
The described concept works alright, but the main piece of code is far from being ready for the general public (ugly hacks), but I got tired of rebasing and stashing these changes.