123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <!DOCTYPE html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /><meta name="keywords" content="GNU, Emacs, Libre Software, Hurd, Guile, Guix" /><meta name="description" content="GNUcode.me is a website focusing on libre software projects, especially the GNU project." /><link type="application/atom+xml" rel="alternate" title="GNUcode.me -- Feed" href="/feed.xml" /><a rel="me" href="https://fosstodon.org/@thegnuguy"></a><link type="text/css" href="css/footer.min.css" rel="stylesheet"></link><link type="text/css" href="css/header.min.css" rel="stylesheet"></link><link type="text/css" href="css/main.min.css" rel="stylesheet"></link><title>The Hurd on Bare Metal Update — GNUcode.me</title></head><body><header><nav><ul><li><a href="index.html">GNUcode.me</a></li><li><a href="services.html">Services</a></li><li><a href="about.html">About</a></li><li><a href="business-ideas.html">Business-ideas</a></li></ul></nav></header><h1>The Hurd on Bare Metal Update</h1><main><section class="basic-section-padding"><article><h3>by Joshua Branson — January 07, 2024</h3><div><h1>Running the Hurd on Bare Metal</h1><p>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 <a href="https://www.debian.org/ports/hurd/hurd-install">Debian wiki</a> page. There are sections that mention how
- to upgrade to the unstable distribution, setting up X, and the correct
- upgrade procedure:</p><pre><code># apt update
- # apt upgrade --without-new-pkgs
- # apt full-upgrade</code></pre><p>Let's install some packages and set up X.</p><pre><code># 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</code></pre><p>Create a keyboard shortcut to kill X, because X may get stuck.</p><pre><code>cat /etc/X11/xorg.conf.d/xorg-ctrl-backspace.conf
- Section "InputDevice"
- Identifier "Generic KeyBoard"
- Driver "kbd"
- Option "XkbOptions" "terminate:ctrl_alt_bksp"
- EndSection</code></pre><p>If, I am running X, then the best way to shutdown the computer, is to
- first kill X, then from the console execute <code>sudo halt</code>. I tried to
- issue <code>sudo halt</code> from an <code>xterm</code>, and that caused some filesystem
- corruption on my <code>/home</code> partition.</p><p>So what works?</p><ul><li><p>Emacs 29.1</p><ul><li>Gnus</li><li>magit</li><li>erc</li><li>org-mode</li></ul></li><li><p>git send-email</p></li><li><p>netsurf web browser</p><p>I "ported" it via hard-coding <code>PATHMAX</code>, which is not an ideal
- solution, but at least I have a web browser that can render simple
- websites like Wikipedia.</p></li><li><p>ffmpeg</p><p>I actually use <code>recordmydesktop --no-sound --fps 2</code> 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.</p></li><li><p><a href="https://mail.gnu.org/archive/html/bug-hurd/2023-03/msg00021.html">terrible-mdns-responder</a></p><p>Sergey created this as a way to easily ssh into his hurd box from a
- GNU/Linux machine. I use it like so: <code>ssh joshua@pippin.local</code>,
- and I can ssh into my Hurd machine without having to know its IP
- address. It's pretty cool!</p></li><li><p>i3</p><p>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.</p></li><li><p>pastebinit</p><p>It would be nice if netsurf would work with a pastebin, but it's
- not. So the <code>pastebinit</code> command works.</p></li><li><p>ikiwiki</p><p>I can update the GNU Hurd wiki entirely using the Hurd. That's
- awesome!</p></li></ul><h2><strong>Gotchas</strong></h2><p>There are some gotchas when running the Hurd.</p><p>If, <code>/home</code> or <code>/</code> are readonly, then X will refuse to start and will
- not tell you why. So, my <code>.bashrc</code> has this in it:</p><pre><code>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 == "writable" ]; then
- echo "starting X";
- else
- echo "NOT starting X";
- fi</code></pre><p>When I have filesystem corruption, I need to umount <code>/</code> and <code>/home</code>
- 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.</p><p>When you have to fsck the filesystem, here is how to do it. You have
- to login via <code>root</code>, then <code>umount /home && umount /</code>. Then run
- <code>fsck.ext2 /dev/hd0s1 && fsck.ext2 /dev/hd0s6</code>. Now reboot.</p><p>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.</p><p>Also, <code>apt</code> is apparently not the best tool to install various
- packages. It is actually better to use <code>aptitude</code>. <code># apt install elpa-magit</code> fails, but <code>#aptitude install elpa-magit</code> somehow works.
- I do not know why.</p><p>This is kind of new, but <code>sudo</code> is failing:</p><pre><code>$ sudo ls
- malloc(): invalid size (unsorted)
- Aborted</code></pre><p>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 <code>guile-commonmark</code>
- was not installed. Then it was that haunt could not find
- <code>guile-commonmark</code>. The fix was pretty easy. In the haunt source
- code directory:</p><pre><code>$ export GUILE_LOAD_PATH=/usr/local/share/guile/site/3.0"
- $ ./configure</code></pre><p>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.</p><pre><code>$ autoreconf -vif
- autoreconf: error: automake failed with exit status: 1</code></pre><p>And of course the <code>./configure</code> in the guile-reader directory failed
- too.</p></div></article></section></main><footer><p>© 2020 Joshua Branson. The text on this site is free culture under the Creative Commons Attribution Share-Alike 4.0 International license.</p><p>This website is build with Haunt, a static site generator written in Guile Scheme. Source code is <a href="https://notabug.org/jbranso/gnucode.me">available.</a></p><p>The color theme of this website is based off of the famous <a href="#3f3f3f" target="_blank">zenburn</a> theme.</p></footer></body>
|