{"id":327,"date":"2016-03-05T22:41:04","date_gmt":"2016-03-05T22:41:04","guid":{"rendered":"http:\/\/www.micha.name\/blog\/?p=327"},"modified":"2016-03-05T22:41:04","modified_gmt":"2016-03-05T22:41:04","slug":"debian-jessie-fix-post-upgrade-bootup-problem-nfs-mounts-and-systemd","status":"publish","type":"post","link":"https:\/\/www.micha.name\/blog\/2016\/03\/05\/debian-jessie-fix-post-upgrade-bootup-problem-nfs-mounts-and-systemd\/","title":{"rendered":"Debian &#8220;Jessie&#8221; &#8211; fix post-upgrade bootup problem (nfs mounts and systemd)"},"content":{"rendered":"<h2>TL;DR:<\/h2>\n<p>System stopped booting after an upgrade. Turns out systemd was trying to mount nfs mounts before the network was up, failed, then aborted the entire boot process. Disabling nfs mounts in fstab let me boot into my machine again.<\/p>\n<p><!--more--><\/p>\n<h2>Rant<\/h2>\n<p>Ok, major rant here.\u00a0 I.H.A.T.E.S.Y.S.T.E.M.D.! I seriously don&#8217;t see the point. I&#8217;ve read lots of pro- and con- arguments. At the end of the day, sysvinit just worked. It may be clumsy. It may be ugly. But it <strong>works<\/strong>. And it&#8217;s nicely transparent and modular, in the Unix tradition.<\/p>\n<p>systemd on the other hand is an opaque binary monolith. And when it breaks, it&#8217;s not always easy to figure out why (and it breaks often enough on upgrading). sysvinit was all text files. Easy. grep, vi, (and some web searches) and all could be fixed. Failing all else (or if you were masochistic enough)\u00a0 you could read your way through the various scripts and figure out what it was (trying) to do.<\/p>\n<p>Not so easy with systemd. Maybe it&#8217;s just a case of needing to learn the new tools of the trade, but when something esoteric breaks, it&#8217;s very difficult to trace down exactly why. Often times it was easier to just reinstall (I cry a bit at this stage. Linux is turning into Windows). In either case, why learn bespoke tools to troubleshoot\u00a0 every subsystem, instead of having the same generic tools used for every subsystem? This is seriously where systemd falls down. I get the feeling it was designed by Microsoft and is being forcibly inserted into Linux to share their pain.<\/p>\n<h2>Issue<\/h2>\n<p>Anyway, thankfully this particular time I was able to (eventually) find the time and managed to trace down why my box was refusing to boot after the latest apt-get dist-upgrade. Turns out that for some obscure reason, systemd felt the need to ensure my nfs mounts were mounted <strong>before<\/strong> the network was up. Uh, right, like <strong>that&#8217;s<\/strong> going to work! I still haven&#8217;t figured out why.<\/p>\n<p>I tried marking the nfs mounts as &#8220;_netdev&#8221;, and &#8220;x-systemd.requires=network-online.target&#8221; (despite the fact that both of those should be rather obvious for nfs type mounts, and the documentation claims systemd does default to that), but neither made any difference.<\/p>\n<h2>Fix (or is it)<\/h2>\n<p>Eventually I just disabled my nfs mounts in fstab to least let me boot into the box again. Hurrah, sort of. Solution? Not really.<\/p>\n<p>I will eventually\u00a0 play around with some more of the systemd-specific markup and see if I can force it to see sense.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian fails to boot after an upgrade; systemd tries to mount nfs before network. GAH!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,56,29],"tags":[12,30],"_links":{"self":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/327"}],"collection":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/comments?post=327"}],"version-history":[{"count":1,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/327\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/327\/revisions\/328"}],"wp:attachment":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/media?parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/categories?post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/tags?post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}