[Nix-dev] Troubleshooting boot failures & rollbacks

Philip Potter philip.g.potter at gmail.com
Mon Sep 5 08:29:20 CEST 2016


On Monday, 15 August 2016, Stephen Whitmore <stephen.whitmore at gmail.com>
wrote:

> At long last though the inevitable occurred: I rebooted, and my system
> only partially boots. This wasn't quite as obvious to solve as booting
> to the previous configuration: I had made a dozen system rebuilds since
> I last rebooted, so I had to spend a bit of time figuring out which
> snapshot introduced the failure.
>
> Now I'm in the position of trying to deduce what configuration change
> corresponds to that failure. I pinged some folks on #nixos, and an
> obvious solution wasn't made apparent. One user noted that they keep
> their .nix configuration files in a git repo and put the commit hash in
> their system name to correlate snapshots. Smart! But alas, it did not
> help me in the moment.
>
> Are there any tips or strategies for dealing with this situation?
> Failing that, how do y'all deal with debugging your system when this
> happens? Any relevant nix config repos you could point me at would be
> appreciated.
>

You can get the actual configuration files for each previous snapshot by
looking in /nix/var/nix/profiles/system* - there will be a symlink to each
generation in there, with the full filesystem at that stage.

You could start looking for differences between generations there. In
theory, you could use Nix's merkle tree structure to quickly prune
identical subdirectories but I don't know what tooling, if any, is smart
enough to do this for you.

Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160905/d7432777/attachment.html>


More information about the nix-dev mailing list