<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>GNUcode.me</title><id>https://gnucode.me/feeds/tags/Hurd.xml</id><subtitle>Tag: Hurd</subtitle><updated>2024-04-18T01:18:57Z</updated><link href="https://gnucode.me/feeds/tags/Hurd.xml" rel="self" /><link href="https://gnucode.me" /><entry><title>The Hurd on Bare Metal Update</title><id>https://gnucode.me/the-hurd-on-bare-metal-update.html</id><author><name>Joshua Branson</name><email>jbranso@dismail.de</email></author><updated>2024-01-07T19:00:00Z</updated><link href="https://gnucode.me/the-hurd-on-bare-metal-update.html" rel="alternate" /><content type="html">&lt;h1&gt;Running the Hurd on Bare Metal&lt;/h1&gt;&lt;p&gt;So apparently, you can run X on the Hurd, and I am currently daily
driving the Hurd.  It's not perfect.  Once a month or so the Hurd will
lock up completely, and I will have to hard shutoff the machine and
deal with filesystem corruption.  But it does work!  You will need to
read the whole &lt;a href=&quot;https://www.debian.org/ports/hurd/hurd-install&quot;&gt;Debian wiki&lt;/a&gt; page.  There are sections that mention how
to upgrade to the unstable distribution, setting up X, and the correct
upgrade procedure:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;# apt update
# apt upgrade --without-new-pkgs
# apt full-upgrade&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let's install some packages and set up X.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;# apt install i3 xinit pinentry-gnome3
# Tell X to let any user startx (it is better to let only console
# users to start X, but that is not working for me.
# apt dpkg-reconfigure x11-common xserver-xorg-legacy&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Create a keyboard shortcut to kill X, because X may get stuck.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;cat /etc/X11/xorg.conf.d/xorg-ctrl-backspace.conf

Section &amp;quot;InputDevice&amp;quot;
        Identifier &amp;quot;Generic KeyBoard&amp;quot;
        Driver &amp;quot;kbd&amp;quot;
        Option &amp;quot;XkbOptions&amp;quot; &amp;quot;terminate:ctrl_alt_bksp&amp;quot;
EndSection&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If, I am running X, then the best way to shutdown the computer, is to
first kill X, then from the console execute &lt;code&gt;sudo halt&lt;/code&gt;.  I tried to
issue &lt;code&gt;sudo halt&lt;/code&gt; from an &lt;code&gt;xterm&lt;/code&gt;, and that caused some filesystem
corruption on my &lt;code&gt;/home&lt;/code&gt; partition.&lt;/p&gt;&lt;p&gt;So what works?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Emacs 29.1&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Gnus&lt;/li&gt;&lt;li&gt;magit&lt;/li&gt;&lt;li&gt;erc&lt;/li&gt;&lt;li&gt;org-mode&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;git send-email&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;netsurf web browser&lt;/p&gt;&lt;p&gt;I &amp;quot;ported&amp;quot; it via hard-coding &lt;code&gt;PATHMAX&lt;/code&gt;, which is not an ideal
solution, but at least I have a web browser that can render simple
websites like Wikipedia.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;ffmpeg&lt;/p&gt;&lt;p&gt;I actually use &lt;code&gt;recordmydesktop --no-sound --fps 2&lt;/code&gt; on the Hurd
machine.  This does actually work.  I tried
using ffmpeg on my Guix System to add audio to the file, but the
audio is out of sync with the video.  I'm not sure why.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://mail.gnu.org/archive/html/bug-hurd/2023-03/msg00021.html&quot;&gt;terrible-mdns-responder&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Sergey created this as a way to easily ssh into his hurd box from a
GNU/Linux machine.  I use it like so:  &lt;code&gt;ssh joshua@pippin.local&lt;/code&gt;,
and I can ssh into my Hurd machine without having to know its IP
address.  It's pretty cool!&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;i3&lt;/p&gt;&lt;p&gt;i3 is probably the slickest window manager out there!  Since the
Hurd is currently X only, I might as well use something light-weight
that I like.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;pastebinit&lt;/p&gt;&lt;p&gt;It would be nice if netsurf would work with a pastebin, but it's
not.  So the &lt;code&gt;pastebinit&lt;/code&gt; command works.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;ikiwiki&lt;/p&gt;&lt;p&gt;I can update the GNU Hurd wiki entirely using the Hurd.  That's
awesome!&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;&lt;strong&gt;Gotchas&lt;/strong&gt;&lt;/h2&gt;&lt;p&gt;There are some gotchas when running the Hurd.&lt;/p&gt;&lt;p&gt;If, &lt;code&gt;/home&lt;/code&gt; or &lt;code&gt;/&lt;/code&gt; are readonly, then X will refuse to start and will
not tell you why.  So, my &lt;code&gt;.bashrc&lt;/code&gt; has this in it:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;cat .profile | grep -A 15 'tell me'

# tell me if / or /home are writeable or not.
echo -n '/ is '
myroot=$(fsysopts / | awk '{ print $2 }')
myroot=${myroot:2}
echo $myroot
echo -n '/home is '
myhome=$(fsysopts /home | awk '{ print $2 }')
myhome=${myhome:2}
echo $myhome

if [ $myhome == &amp;quot;writable&amp;quot; ]; then
    echo &amp;quot;starting X&amp;quot;;
else
    echo &amp;quot;NOT starting X&amp;quot;;
fi&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When I have filesystem corruption, I need to umount &lt;code&gt;/&lt;/code&gt; and &lt;code&gt;/home&lt;/code&gt;
and run fsck on them.  Then reboot.  Most of the time the Hurd can
auto run fsck for you, but sometimes it is so bad that you must do it
yourself.&lt;/p&gt;&lt;p&gt;When you have to fsck the filesystem, here is how to do it. You have
to login via &lt;code&gt;root&lt;/code&gt;, then &lt;code&gt;umount /home &amp;amp;&amp;amp; umount /&lt;/code&gt;. Then run
&lt;code&gt;fsck.ext2 /dev/hd0s1 &amp;amp;&amp;amp; fsck.ext2 /dev/hd0s6&lt;/code&gt;.  Now reboot.&lt;/p&gt;&lt;p&gt;I also cannot shutoff the machine from a terminal inside X.  I first
have to kill X, and then shutoff the machine from the console.&lt;/p&gt;&lt;p&gt;Also, &lt;code&gt;apt&lt;/code&gt; is apparently not the best tool to install various
packages.  It is actually better to use &lt;code&gt;aptitude&lt;/code&gt;.  &lt;code&gt;# apt install elpa-magit&lt;/code&gt; fails, but &lt;code&gt;#aptitude install elpa-magit&lt;/code&gt; somehow works.
I do not know why.&lt;/p&gt;&lt;p&gt;This is kind of new, but &lt;code&gt;sudo&lt;/code&gt; is failing:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ sudo ls
malloc(): invalid size (unsorted)
Aborted&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I would love to get haunt running on the Hurd, and it does run!  But
it fails to build this blog.  At first it was that &lt;code&gt;guile-commonmark&lt;/code&gt;
was not installed.  Then it was that haunt could not find
&lt;code&gt;guile-commonmark&lt;/code&gt;.  The fix was pretty easy.  In the haunt source
code directory:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ export GUILE_LOAD_PATH=/usr/local/share/guile/site/3.0&amp;quot;
$ ./configure&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So that helped me build haunt correctly and it could find
guile-commonmark.  But then it needed guile-reader installed as well.
Now I can't build guile-reader.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ autoreconf -vif
autoreconf: error: automake failed with exit status: 1&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And of course the &lt;code&gt;./configure&lt;/code&gt; in the guile-reader directory failed
too.&lt;/p&gt;</content></entry></feed>