From b728087f4f8de438d332e4d952870239df7ee55d Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Thu, 14 Apr 2022 07:30:38 +0000 Subject: [PATCH] gopher: Add "plan9 journal" This is just a small nightly log of my journey using 9front on a thinkpad! --- gopher/notes/all/acme-notes.txt | 2 ++ gopher/notes/all/plan9.txt | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 gopher/notes/all/plan9.txt diff --git a/gopher/notes/all/acme-notes.txt b/gopher/notes/all/acme-notes.txt index 0776cf2..a157e00 100644 --- a/gopher/notes/all/acme-notes.txt +++ b/gopher/notes/all/acme-notes.txt @@ -1,6 +1,8 @@ Acme Notes ========== +tags: plan9 + Day 1: Getting plumbing via mouse3 to work ------------------------------------------ Sun Feb 27 23:17:12 EST 2022 diff --git a/gopher/notes/all/plan9.txt b/gopher/notes/all/plan9.txt new file mode 100644 index 0000000..0b06cde --- /dev/null +++ b/gopher/notes/all/plan9.txt @@ -0,0 +1,180 @@ +== Plan 9 Journal == + +tags: plan9 + +My journey in installing and using the 9front fork of plan9 on +bare metal hardware (an old Thinkpad X220). Mostly just musings +and intermittent problem solving. Mildly interesting at best. + +[Thu Mar 24 02:54:53 EDT 2022] + +This is my third time booting this system. Still can't get +wifi to work. There's a message at boot about missing firmware. +Something like /lib/firmware/iwn-6005 maybe? Need to check to +see if theres proprietary blobs I'm missing... + +Writing in acme(1) of course. It's maybe the most familiar +interface to the system (from my time poking around plan9port). + +Goals for tonight: + +- read intro(1) and linked pages + +My date is wrong by 4hr exactly. Wonder if there's an ntp equivalent? +It's showing the UTC time as EDT, but when I run `date -u` it's got +the wrong GMT... hm. Probably should set my timezone to UTC and see +if that helps on reboot? + +... + +Found $home/lib/profile. Realized $path doesn't exist. Just a series +of bind mounts into /bin . Why not? One mechanism that works. Let the +kernel search the union directory... + +... + +Figured out my wireless issues -- I was right! I need firmware. Found +the relevant portion in plan9.ini(8): + + iwl Intel Wireless WiFi Link mini PCI-Express adapters + require firmware from + http://firmware.openbsd.org/firmware/*/iwn-firmware*.tgz + to be present on attach in /lib/firmware or /boot. + +Now just to figure out how to get the drivers on a thumbdrive... maybe +it'd be easier to reboot with ethernet plugged in first. + + +[Fri Mar 25 01:04:01 EDT 2022] + +I booted tonight with ethernet connected. Time still wrong. But we +have webfs(4)! + +Things automagically worked--I was able to use mothra(1) to connect +to 9front.org, so that felt great. + +The next logical step seemed to be to leave the system using ssh(1). +First take failed. Maybe factotum(4) isn't running? + +Looking for answers here: + + https://pspodcasting.net/dan/blog/2019/plan9_desktop.html + +Hm seems it should just work. Why do I get the following? + + term% ssh @sdf.org + ssh: read1: eof + + +[Sat Mar 26 02:27:37 EDT 2022] + +Another day another boot. I put /etc/firmware/iwn* from my OpenBSD +install on a USB and successfully got it to mount on 9front (not +hard--just plug and check /shr)... but even with the firmware in +/lib/firmware it didn't work! hmm maybe I'll copy to /boot too? + +At least the desktop guide above taught me about /dev/kmesg! I +no longer have to remember what it said at boot time :) + +[Mon Apr 11 03:35:57 EDT 2022] + +Been a hot sec. Life got busy. Went on a company trip to Asheville, +NC and then a bachelor party in Vegas. Caught a stomach bug and +ended up spending most of the party in the hotel room. Still a story, +I guess. Just not the one I expected to be telling. + +Anyways, I'm not quite sure where I left off. src/net.sh and src/res.sh +both worked so I was up, fullscreen, and on wifi in about 3 min. + +Maybe I'll try to take a whack at ircrc(1) or email? Probably good to get +SSH up too... + +end of night update: ircrc(1) worked great, no issues! ssh(1) still +not working. I checked the server logs and it said "unable to negotiate, +client offered: ssh-rsa", so I wonder if the client's cipher's are +too old? The 9front fqa says that it supports chacha20-poly1305, which +I think openssh should support on the server side... so why is the +handshake failing? unclear. + +maybe I'll ask in #cat-v on IRC next time I boot :) + +Some other things I tried: + +1. Creating a SSH key (as documented in rsa(8)): + + term% auth/rsagen -t 'service=ssh' >ssh.key + term% cat ssh.key >/mnt/factotum/ctl + term% ssh ajk@sdf.org + ssh: read1: eof + +That should have added it to factotum(4) for retrieval. hm.. I mean +obviously the SSH server doesn't expect the key, but it shows that it's +not like ssh(1) is keeling over because of lack of key (I don't think.). + +[Tue Apr 12 03:27:55 EDT 2022] + +I did it! At long last, a working ssh(1). + +I browsed the mailing list for a while and finally stumbled upon +this patch [1] that linked to the fact that in 2021-09 openssh +deprecated the ssh-rsa cipher (which from the sshd logs was what +I was offering...). + +I'm not sure _why_ this patch didn't seem to make it into my install, +but sure enough I was able to do a system update and rebuild from +source and my new ssh(1) works out of the box! (I double checked and +the patch is indeed applied). So the fix was: + + term% sysupdate + term% cd / + term% . /sys/lib/rootstub + term% cd /sys/src + term% mk install + +As described in the fqa: http://fqa.9front.org/fqa5.html#5.1 + +[1]: https://inbox.vuxu.org/9front/CD1ED7F51E72A0050786E39FADF6EBFE@felloff.net/ + + +[Thu Apr 14 02:46:06 EDT 2022] + +Tonight's goal: move this blog to the interwebs. Up until now +it's lived on this thinkpad as /usr/glenda/notes.txt, but I +(1) want to back it up and (2) want to share it in case it +helps anyone else! + +Now that I have ssh(1) working, and given that 9front recently +added git(1), it should be pretty trivial to publish to my +gopherhole, just add it to the repo and commit and push! + +I had to first generate an ssh key as listed in rsa(8) and add +it to factotum(4) so that I could clone via ssh: + + % auth/rsagen -t 'service=ssh role=client' > ssh.key + % cat ssh.key >/mnt/factotum/ctl + % auth/rsa2ssh ssh.key # copy to clipboard, add to authorized_keys + +Then: + + % git/clone git@alexkarle.com:alexkarle.com akcom + % cd akcom + % mv /usr/glenda/notes.txt gopher/notes/all/plan9.txt + % git/commit gopher/notes/all/plan9.txt + + % git/push + +By the "weird dance" I mean: + + 1. Type my commit message + 2. Type CTRL-D and newline + 3. Hit escape? + +Whacky. + +I couldn't get git/diff to show the diff, so instead I checked +my diff with git/export HEAD, which worked great. + +Oh and I put my git config in $home/lib/git/config (name/email). + +The date is still 4hr off, so sourcehut rendered the commit as "3hr in +the future" :) whoops! -- libgit2 1.1.1