Some Bits: Nelson's log

11 posts in February 2024

Taking over Feditrends

About a week ago I took over the service Feditrends, a link aggregator that shows trending stories on the Fediverse and Bluesky. The project creator (Jackson Palmer) had gotten tired of running it and shut it down a couple of times. I visit it every day so I took it over.

I have no immediate plans to change anything, I want to get some familiarity with what it’s doing and how it’s used first. Personally I use it partly to find interesting links and partly to keep tabs on what the Fediverse is talking about. The current dataset tends towards US news stories. I mostly avoid the mainstream news cycle but I like seeing what folks are talking about.

Taking it over

Taking it over was quite simple. Jackson did a great job releasing the code as open source. I got it running in about 15 minutes of work. It’s very simple, just a few hundred lines of Python code to fetch feeds and generate static HTML. It stores some stuff in a sqlite database. I haven’t looked closely.

Once I had it running locally and pushing to a web server of my own, Jackson just transferred the Namecheap domain name to me. I changed the DNS record and that was that. He also transferred the GitHub organization and the Mastodon account.

Observations

It all seems to run fine on its own. It does not have a lot of users. Feedly reports 22 subscribers, but of course that’s only a small fraction. The whole server is getting only a few thousand requests a day. About 30% of that is for the RSS feed for the main site, another 22% accessing the main HTML page. Maybe 1% of the requests are for the second experimental Bluesky product. I may remove that since I don’t use it and it’s completely separate code.

Feditrends now is pretty much entirely news links. That’s because its data source is Mastodon’s trending links (for example) on about 10 of the biggest English language Mastodon services. Mastodon.social is quite clear these are “News”. I’m not certain but I’ve been told these links are hand-curated, that a moderator has to approve a link to be valid for showing up there. Update: a friend says that the publishers have to be approved but not the links themselves. Also points to the Mastodon code for links.

Earlier versions of Feditrends used to have three tabs: News, Posts, and Hashtags. I’m not quite sure why Jackson narrowed down to just News but I can think of several reasons the other views could be harder to make work well. The code for posts is on GitHub.

Plans

The site could use an About page. With a last updated slug in it.

I never used the RSS feed before. It’s quite noisy, Feedly says it’s like 500 articles per week. I’ve gotten a suggestion to have a feed with fewer links, the Top 10 instead of all trending or something.

I really miss belong.io, Andy Baio’s old trending links service. That worked by watching Twitter accounts of a carefully selected list of 1000+ people for trending links. It’s possible a similar idea would work for the Fediverse but there’s various cultural forces at work that make me wonder if it really would. I should look at the “Trending Posts” data at Mastodon instances again to see if it’s interesting. Or consider my own curated set of accounts to track.

There’s some tinkering I could do to make the production a bit better. All my Proxmox work has paid off though, I got it up and running in an Ubuntu container on my server with simple backups, etc. I’m not sure what’s in the sqlite database and if it’s growing without bound. The static site publisher logs need some attention.

I should consolidate GitHub, right now I’m working in a fork.

I’d like to move the web serving off my own datacenter server and into some hosted solution. It’s so little traffic it’d be cheap or free on Github Pages or Netlify or just some sort of S3-like host or Cloudflare or something. Static sites are so easy to work with! The hard part is I’d like some basic access log info; I don’t want to add tracking Javascript just to get a rough count of visitors. I’m using GoAccess on the Apache logs for now.

Mojibake in RSS feeds for Feedly

I took over Feditrends, which has an RSS 2.0 feed. The feed’s contents are in UTF-8. Feedly doesn’t display them correctly, interpreting the typographical punctuation as ISO-8859-1 nonsense instead.

That mess is supposed to be quotation marks: U+201C “ at the start.

The underlying problem is that neither the feed document nor the Apache2 server specify the encoding. And in the absence Feedly is guessing ISO-8859-1. Odd guess in 2024! This may also be a problem for JSON feeds. Real weird if so, JSON’s default is UTF-8 as is jsonfeed’s recommendation.

The fix I just deployed now for the RSS feed is to add <?xml version="1.0" encoding="utf-8"?> to the start of the RSS feed document. I don’t know if this works yet. Two years ago I discovered it’s hard to test RSS feeds, there’s very few clients to use. And ones like Feedly I can’t force to refresh and display new. So instead I’ll just wait a day and see. Update I think it worked; the U+2019 in this headline displays in Feedly properly as “Ford’s” and looks like a curly apostrophe.

The other fix would be to get the HTTP server to specify the encoding. I suspect that’s what the old server was doing and I introduced a bug when I took over the product. Right now my server is sending Content-Type: application/xml without specifying the byte encoding. Adding a charset=utf-8 to that would be a good idea. But that configuration turns out to be slightly difficult in Apache2. I’ve already got AddDefaultCharset utf-8 in the config but that doesn’t really apply everywhere. Some random LLM recommends adding this to my config:

<FilesMatch "\.xml$">
Header set Content-Type "application/xml; charset=utf-8"
</FilesMatch>

That looks plausible. But I prefer the RSS document itself be self-describing. I’d set it in the HTTP transport too but I hate messing with Apache configs.

Two observations

Apache2 is really not a good web server anymore. It’s never modernized. So configuring Let’s Encrypt is a real mess (smoothed over by certbot). It has strange defaults for a world before UTF-8 and HTTPS everywhere. It’s possible it’ll never support HTTP/3. I only use it because I’ve been using it for, what, 29 years now? It’d be a Project to migrate my existing stuff over. I like Caddy these days as a modern simpler replacement although it lacks CGI support. (Don’t laugh, it’s still useful!).

The word “encoding” is ambiguous. I often say things like “that document is encoded in UTF-8”. But people also say “the feed is encoded in RSS 2.0” or “RSS is encoded in XML”. So many layers of encoding. “Charset” seems to be the better term to mean “is this ISO-8859-1 or UTF-8?” But that doesn’t feel quite right either. Surely Unicode is the set of characters, and UTF-8 is the encoding of that into bytes? Huh.

Notes on 110ppi monitors

I had to help Ken get some new monitors for his desktop. He currently has two 24″ 1920x1200 monitors. He doesn’t want high DPI monitors, good old cheap 110ppi-ish monitors are fine. Here’s what I learned.

PC monitors come in several standard sizes. Here’s some measurements for what’s out there:

24″ monitors 1920x1200 (unusual height)

This is what Ken has now. Most 24″ are 1920x1080.
20.4x12.8″ = 522 sq in (for two)
95 PPI

27″ monitors, 2560x1440

23.5″ x 13.2″ (596.7 x 335.7 mm) = 620 sq in (for two)
110 PPI

34″ Ultrawides 3440x1440

This is what I have now.
31.4x13″ = 411 sq in.
109PPI.

38″ Ultrawides 3840x1600

34.6x14.4″ = 498 sq in.
111 DPI

49″ DQHD 5120x1440

Basically two 27″ monitors glued together
47″ x 13″ = 611 sq in
109PPI.

Resources

Screen size calculator
PPI calculator
Wirecutter 24″ monitors
Wirecutter 27″ monitors

Netflix vs. two houses (Feb 2024)

I just spent 45 minutes getting Netflix to work at the same time in my two houses. I don’t know if it will keep working but I’ll write up what I’ve learned so far. The rules have changed recently as Netflix tries to crack down on account sharing. I don’t even know if what I want to do is allowed anymore.

A key concept here is the “Netflix household” which seems to be defined as “on the same internet connection as this TV”. They don’t explain what “this TV” might mean in a world of many different Netflix clients. Nor do they define “internet connection”: is it WiFi SSID? External IP address? What about VPNs and static routing and IPv6? Is “household” just a synonym for “house with a LAN” or does it encompass a larger notion of a family that might not always be in one building together? Netflix doesn’t make any of this clear.

What is working right now

I followed the instructions for “Using Netflix outside of your home”, “Second home or frequent travel to the same location”. These are frustratingly vague but the nut of it is “From the main place you watch Netflix open the Netflix app or go to Netflix.com on a web browser on your portable device once a month... Then take the same steps when you arrive at your second location to continue watching Netflix without interruption.”

The key thing here seems to be “on Netflix.com on a web browser”. We first tried this using iPad and Android client apps or the Roku client app and things kept not working. However when I watched Netflix first on an Android tablet Chrome tab, then Ken watched it on an iPad tablet Safari tab, suddenly everything started working and we were allowed to watch two shows at the same time in two houses. Once we’d done the browser thing we were able to both watch a show at the same time in the Roku client in two houses. Success! At least, for now. I’m anticipating it breaking.

I have a theory that what’s happened is Netflix is willing to take a look at all the IP addresses that recently tried to use an account. And then accept that they are all part of the same household if you jump through the login / email verification hoops. It also appears that they have a one SSID only policy for wireless devices. I’ll also note we were sent to the evocatively named URL https://www.netflix.com/tv2. Is that for a second TV? Who knows?

What Netflix policy allows

Netflix Standard ($15.49) allows you to watch on two devices at a time simultaneously.

Netflix now only lets you watch in one “household”. What’s a household? “A Netflix Household is a collection of the devices connected to the internet at the main place you watch Netflix.” As I said above this isn’t a very specific definition and I can’t tell if “one family that goes back and forth between two houses” counts as one household or not. The existence of special instructions for “Second home or frequent travel to the same location” suggests what we are doing should be OK.

There’s a bit more specific info on this help page. This part (and the reliance on mobile browser logins) makes me think SSIDs are a key factor: “If you have multiple Wi-Fi networks, we may only associate one with your Netflix Household. If you want to watch Netflix on a device that is connected to a Wi-Fi network using a different ISP account or that has a different external IP address, you may be asked to verify that device as part of your Netflix Household.” Just to complicate things: I have separate WiFi networks in the two houses, of course, but they both share the same SSID.

They also say “We use information such as IP addresses, device IDs, and account activity to determine whether a device signed into your account is part of your Netflix Household. We do not collect GPS data to try to determine the precise physical location of your devices.”

There’s a whole separate flow from Netflix for “I am temporarily at a hotel”. We used that first to get the second house working, and it worked fine for awhile but then it stopped. I think maybe they have a 14 day limit? Interestingly that device no longer had the option of saying I was temporarily there.

Finally Netflix has the option to add an Extra Member to an account. This costs another $7.99 a month and basically creates a new limited account with a separate email and password. It’s not clear whether an extra member is allowed to be in a second house / household / internet connection or not. Also I really don’t want a separate login, that sounds like I’d have to constantly be juggling who is logged in every time I watch TV. I just want two profiles on one account.

ARGH

This is all so maddening and more than once I thought to myself “you know, Plex never hassles me about this when I watch unlicensed copies of Netflix videos”. But I’m trying to be an upstanding citizen and pay for my service. Why does Netflix make it so hard?

I’m sympathetic to their desire to crack down on account sharing. Folks abused the old system quite a bit. I think the restriction that would make sense is “you can’t watch two streams simultaneously from two IP addresses”. Ie: two people could watch different things at the same time in one house, or one person can watch things at any house they want”. Just not two across houses. But I don’t think that’s their model.

I sure wish they defined exactly what their model is in technical enough terms I could understand if what I’m doing is impossible. I tried asking support for help and they seemed even more confused than me.

Landlines and VoIP phone services

I’m fed up with my landline. I pay $100/mo and all I get are fraud calls and politicians asking for money. My Grass Valley number doesn’t even work reliably; crappy wiring and an unreliable AT&T VoIP setup that fails during power outages (in violation of their obligations). It’s long since stopped being POTS over copper.

So I’m doing like the young people do and ditching the landline. But I need the old number to work. So I’m porting it to a VoIP service. The other choice would have been to port to a second number on my cell contract, but I don’t want my cell ringing with scam calls every day.

I picked Numberbarn to port the number to. Other choices were Google Voice or Callcentric. But Google Voice looks creaky and on the verge of being abandoned and also can’t directly port a landline. A friend uses Callcentric but I didn’t try it. Honestly NumberBarn had me with the cute pig logo.

Numberbarn has a nice looking product. It’s clear what their business is: selling phone numbers for marketing purposes, they list vanity phone numbers at $1000 and up. But they have a significant sideline in helping people cheaply park phone numbers they don’t really use. Also simple voicemail, call forwarding, and phone menus.

I was particularly impressed with Numberbarn’s help pages, a set of clear marketing-free descriptions of how to do things you’d want. Their how to port in page is as clear as could be. They have symmetric porting out docs too, an easy process. A sleazy company would try to make it hard to leave their service.

It’s cheap too. $2/mo for basic parking, $6/mo for voicemail, fancy forwarding, menus, etc. I need the voicemail so I’m paying $6. It has a voicemail-to-email but audio only, no text transcription.

Porting

I’m porting an AT&T landline. The process is shockingly simple. I just sent Numberbarn a copy of my phone bill and it was approved nearly immediately, then took three days to actually happen. It happened just as predicted and now the phone is answered by Numberbarn’s voicemail. Easy peasy.

A little surprised by the security of that. Cell phone porting became a big problem with all the hacking of SMS authentication, so they tightened security and added a required PIN to port a number. It looks like anyone with a copy of a landline bill can steal the number. It may be the equivalent of a PIN is just printed on the bill.

Another authentication option was for them to call my number and me to relay a security code. But since my AT&T line isn’t even working at the moment, that was not an option.

Cancelling AT&T

This is going to be the hard part. I’ve already tried the website and a customer support call to cancel and had a terrible experience. AT&T can’t look up that number at all anymore, all they can tell me is that the phone number belongs to “Bandwidth”. I see some hints that Bandwidth may be another name for Numberbarn but I’m not certain.

With any luck AT&T will simply stop billing me now that the number was ported, but I’m not hopeful. I’m now taking meticulous notes for the inevitable PUC complaint.

Update: Numberbarn support replied swiftly and thoroughly and confirmed that Bandwidth is their carrier. Also they suggested AT&T might automatically cancel my bill. Fingers crossed.

Update 2: about a week later I noticed that att.com is showing “Canceled” on my old landline. I can’t find any more information on the website, just a bunch of irrelevant ads in the Notices section, but at least that’s a sign that I won’t be billed for further service.

Pixel 8 system shows out of date information

I have a frustrating problem with my new Pixel 8 phone (running Android 14). The phone often shows out of date information when it’s idle, sitting on my charger at 80% or more battery.

One problem is the weather is wrong. In Grass Valley today it’s currently fully sunny and 43° with a forecast of 47–62. I think my phone is showing me weather in LA instead. That’s where my IP address geolocates too, so it must be a dumb service. My phone knows I’m in Grass Valley with WiFi or GPS location but that information is not getting used.

The other big problem is notifications are often delayed; the Gmail app (for instance) won’t chime when I get a new email until I unlock the phone, when suddenly a flood of notifications arrive all at once.

I think the underlying problem is all the various battery saving tricks that have been added to Android. The “Adaptive Battery” feature definitely can cause delayed notifications, it says so right in the settings, and turning that off helps some. But also the “App battery usage > Optimized” setting. I know to turn that to “Unrestricted” for certain apps (like Syncthing, GPSLogger, etc) but I just went and turned it on for a bunch of core Google services like “Google” and “Android System Intelligence” following this guide. We’ll see if it helps. If the Google system components don’t work in “Optimized” it’s a pretty serious bug, Google should fix that by either changing optimization or else disabling it where it breaks things.

Part of the problem here is how complex Android settings have gotten. Here’s the full list of fixes in a guide I found to fix At a Glance weather

  1. Go to settings -> privacy -> personalize using app data (ON)
  2. Go to Google app -> Profile photo -> Settings -> Location -> Always (ON)
  3. Go to settings -> Apps - > Search for Pixel Launcher -> Battery -> Unrestricted (ON)
  4. Go to settings -> Apps - > Search for Android System Intelligence -> Battery -> Unrestricted (ON)
  5. Go to settings -> Apps - > Search for Google app -> Battery -> Unrestricted (ON)
  6. Go to settings -> Location -> Location -> Permissions -> Google app -> Allow all the time (ON)
  7. Have your location (GPS) always turned on
  8. Go to settings -> Apps - > Search for Google app -> Mobile Data & Data -> Background data (ON) and Unrestricted data usage (ON)

Got that? 8 different places just to make the stupid weather widget display correctly. Which may or may not work, and these instructions are a year out of date. Didn’t work for me; I rebooted and the phone is still showing me LA’s weather.

Even more complex.. the lock screen display of the time and weather isn’t actually configured in Android’s Lock Screen. That’s some other older system lock screen. My Pixel phone is actually using the Google Assistant’s “At a Glance” feature, which is configured separately. Well most of the time; when the phone first boots it’s using the default lock screen. It’s all a big mess.

I should add here my GPSLogger stopped logging reliably. For years I’ve coaxed this thing into running 24/7 getting my location every few minutes, something Android really doesn’t want to let you do. That stopped working two days ago, with 3+ hour gaps of no logging. I’m hoping that was just a temporary thing and restarting it will fix it, but we’ll see.

Android’s been around now, what, 20 years? I guess a bunch of platform cruft and confusion is to be expected. Maybe it’s time for a new OS to rethink everything. Or for some dedicated product manager inside Google to spend two years figuring it out, untangling it all, and coming up with a new rational design that makes all this configuration work well and be comprehensible. That’ll never happen, no promotion in fixing old shit.

Let’s Encrypt / certbot in 2024

I was an early adopter for Let’s Encrypt, back in 2016, then renewed in 2019. Over time I’ve accumulated a lot of cruft in my main web server related to it. To the certbot team’s credit it’s worked all this time with minimal intervention. I was adding a new virtual host domain name and needed to update the certificate, so I looked at it for the first time in a few years.

I was running certbot 1.10 or something; certbot 2.9 is current. So I used apt to remove the certbot packages I’d installed long ago from a PPA. And followed the new instructions to install from snap. This installs an executable in /snap/bin/certbot. It also installs a systemd timer to renew certificates that you can see with systemctl show snap.certbot.renew.timer.

I think I still have some old cruft lying around. /etc/letsencrypt was never purged so the new Snap picked that up, which is a missed blessing. I also have a /etc/cron.d/certbot which will renew, but only if systemd isn’t installed. So I’m just leaving that assuming it’s harmless.

Anyway, certbot reinstalled it’s time to reconfigure certificates. This is as simple as running certbot and accepting the defaults. It generates a single SSL certificate to be used for all the domain names it finds in your Apache configs. It creates Apache2 site config files named *-le-ssl.conf to reference the SSL certificate. Certbot also prompted me to switch from RSA to ECDSA keys. Sure, why not.

Renewal can be tested with certbot renew --dry-run. It seems to process all the files it finds in /etc/letsencrypt/renewal. I have an old one left behind from December for windhistory.com, which I think is no longer used so I removed it. My new one it has chosen to name for logsoflag.com, probably a name it picked years ago. It seems to be used for all my domains.

Another mild naming nuisance: the SSL certificate has Common Name (CN) feditrends.com. That’s one of my 9 domain names. Apparently certbot just picks the first name in an alphabetical list when making a cert for multiple domain names. You can override it but it’s a nuisance, so I’m just going to ignore it.

It all seems to work and honestly took less time to run than to verify what it was doing and write up these notes. I’ve made a reminder on my calendar to check in May a few days before expiration that the renewal worked automatically.

TCL Roku vs Plex subtitles

Finally fixed an annoying problem where Plex subtitles wouldn’t show on my TCL TV (which runs Roku OS).

The solution is in the TCL TV settings, under “Accessibility / Captions mode”. Set it to “Off” (or maybe “On Always”). If you have it set to “On replay” or “On mute” then the subtitles Plex puts in a subtitle stream for the TV won’t display. (I suspect the TCL setting is overriding the stream.) I found this solution here.

There’s a different solution I found on Reddit that no longer seems to work. That has you setting the Plex app settings, to turn subtitles to “Roku captions mode”. Despite the Plex support docs describing this, my Plex app (version 7.14.6) does not have a Settings menu at all.

A third workaround is to tell Plex to “burn subtitles always”. But that has the server transcode the video and render the subtitles into pixels on the video stream. It’s much better to have Plex send a separate subtitle stream and let the TV do the rendering.

PS5 controllers vs Anker USB chargers

For years I’ve been annoyed that Sony Playstation controllers won’t charge when plugged into my high quality Anker USB chargers. They charge fine on the PS5 itself but not an external charger. Turns out this is sort of Anker’s fault, at least according to an informed-sounding reddit post.

It’s a screw up on both sides, Sony and Anker.

The reason the Anker charger won’t charge the PS5 controller is because the Anker does not correctly follow the rules of the USB Type-C specification, which forbids proprietary charging modes, and requires that USB-C chargers present as a USB BC 1.2 DCP (ie, a short between the D+ and D- lines.

The Anker charger presents Apple, Qualcomm, and other proprietary charging modes on D+ and D-. This is Anker’s “PowerIQ” technology, which tries to present a grab bag of random proprietary fast charging modes in an attempt to make the other side happy no matter what.

The Sony controller *requires* BC 1.2 DCP in order to start charging from a charger. This is technically also not spec compliant, as it should start charging from any 5V 1.5A or 5V 3A charger signaled via USB-C...

But yeah... in this case, the PS5 controller doesn’t charge because both sides aren’t following the USB-C spec in their own ways.

So the key protocol here is USB Battery Charging 1.2 Dedicated Charging Port. This spec dates to 2010 and works with old USB A devices. It predates the USB Power Delivery protocol from 2012 that I think is the hallmark of good USB C charging.

For USB BC, the charger simply connects the otherwise unused data D+ and D- lines with a 200Ω resistor and that’s a signal to the device it’s connected to a dedicated charging port. Unfortunately a bunch of other common proprietary devices (Apple, Qualcomm, etc) used D+ and D- in different ways to control charging. Anker supports those under the name “Power IQ” but then that doesn’t do USB BC.

It may be impossible to build a device that reliably supports all these old different weird ways of signaling charging. I’m sympathetic to the argument that in 2024, chargers should no longer be doing out-of-spec stuff for 10+ year old devices. But that’s a product choice that’s not clear. Also Anker is very proud of PowerIQ, back in 2014 or whenever it seemed like quite an innovation.

Sony could sure help by updating to USB PD.

Some more reading here, here, here, here.

Vaguely related; the PS5 DualSense battery is 1560mAh. There’s third party replacements that are 2650 mAh. Details here. My Pixel 8 has a 4575 mAh battery. Anker’s power packs are 5,000 to 40,000 mAh.

Ubuntu 23.10 upgraded: signed GRUB failed

Tried upgrading my main daily driver Ubuntu system from 23.04 to 23.10 and got left with a broken system. Upgrading grub-efi-amd64-signed failed with the error Unknown device "/dev/disk/by-id/*": No such device. I tried hacking around to get it working and failed. Finally reloaded from the Proxmox VM backup I’d thankfully made before trying the upgrade. I filed an Ubuntu bug.

I’m totally guessing here but I think the underlying cause is from when I virtualized the Linux server from physical hardware to a VM. That worked, including Secure Boot and ordinary kernel updates and update-grub, but now upgrading the GRUB packages fails. On the virtual system there really is no /dev/disk/by-id filesystem right now after rebooting back to 23.04. This discussion says that’s working as intended, that virtio devices don’t have serial numbers. I assume my old physical server had entries in /dev/disk/by-id. Those old entries are referenced in the hard-to-find /var/cache/debconf file, which contains the actual configuration options chosen at apt install time. And so now when I go to update the grub package it picks up the old config which is no longer valid.

If my diagnosis is right the fix is to get the working GRUB install to reconfigure itself somehow to use whatever new path is relevant, to stop referencing /dev/disk/by-id. And only then attempt an Ubuntu release upgrade.

Update: I tried just running dpkg-reconfigure grub-efi-amd64-signed. That just prints the error about /dev/disk/by-id missing. That seems like a usability bug; the reconfigure tool should recover gracefully if the configuration is bad. I tried various other methods of convincing apt to reconfigure GRUB but the best I could do was change the menu entries or Linux command line, never change which device it thought GRUB should be installed on.

Update 2: I may have found a fix using debconf-set-selections to reconfigure GRUB. It sort of worked but not entirely.

It’d be awfully nice if the package installer had better error messaging and recovery.

Detailed notes

Some extra details that are poorly edited but I’m capturing anyway.

Looking around on the Internet I found lots of posts about upgrades failing on this package going back to Ubuntu 18.04. Lots of various cargo cult solutions. This one is clearer than most. See also here or here. All of them boil down to forcing apt to remove and reinstall GRUB.

Here’s what I did in my failed attempt to reinstall GRUB after the upgrade had failed.

apt remove --allow-remove-essential grub-efi-amd64-signed shim-signed
apt install grub-efi
update-grub

This succeeded in that it installed a new, unsigned GRUB. But the Proxmox OVMF BIOS refused to boot it. The BIOS had secure boot turned on; turning that off it still refused to boot. Probably what I really should have done was force a proper reconfigure of the signed GRUB install instead. I tried to do that but various methods of reinstalling grub-efi-amd64-signed kept failing on the missing /dev/disk/by-id/. Need to look up how to force a full reconfigure of that package.

Boy do I hate messing with GRUB.

Dump of error logs:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up grub-efi-amd64-signed (1.197+2.12~rc1-10ubuntu4) ...
Unknown device "/dev/disk/by-id/*": No such device
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of shim-signed:
shim-signed depends on grub-efi-amd64-signed (>= 1.191~) | grub-efi-arm64-signed (>= 1.191~) | base-files (<< 12.3); however:
Package grub-efi-amd64-signed is not configured yet.
Package grub-efi-arm64-signed is not installed.
Version of base-files on system is 13ubuntu2.1.
shim-signed depends on grub-efi-amd64-signed (>= 1.187.2~) | grub-efi-arm64-signed (>= 1.187.2~); however:
Package grub-efi-amd64-signed is not configured yet.
Package grub-efi-arm64-signed is not installed.

dpkg: error processing package shim-signed (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
grub-efi-amd64-signed
shim-signed
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Here’s the entries in /var/cache/debconf that reference the missing path

Name: grub-efi/install_devices

Template: grub-efi/install_devices
Value: /dev/disk/by-id/nvme-eui.002538b22140b542-part1
Owners: grub-common, grub-efi-amd64, grub-pc
Flags: seen
Variables:
CHOICES = /dev/nvme0n1p1 (1127 MB; /boot/efi) on 2000398 MB Samsung SSD 980 PRO with Heatsink 2TB
RAW_CHOICES = /dev/disk/by-id/nvme-eui.002538b22140b542-part1

Name: grub-pc/install_devices
Template: grub-pc/install_devices
Value: /dev/disk/by-id/nvme-Samsung_SSD_980_PRO_with_Heatsink_2TB_S6WRNS0T220037X
Owners: grub-pc
Flags: seen

This might be the original install log that shows what path was chosen. If so, it gives a choice for an alternate name for the device.

2022-08-09 23:28:45,261 - cc_grub_dpkg.py[DEBUG]: considering these device symlinks: /dev/disk/by-id/nvme-Samsung_SSD_980_PRO_with_Heatsink_2TB_S6WRNS0T220037X,/dev/disk/by-id/nvme-eui.002538b22140b542,/dev/disk/by-path/pci-0000:01:00.0-nvme-1

2022-08-09 23:28:45,261 - cc_grub_dpkg.py[DEBUG]: filtered to these disk/by-id symlinks: /dev/disk/by-id/nvme-Samsung_SSD_980_PRO_with_Heatsink_2TB_S6WRNS0T220037X,/dev/disk/by-id/nvme-eui.002538b22140b542
2022-08-09 23:28:45,261 - cc_grub_dpkg.py[DEBUG]: selected /dev/disk/by-id/nvme-Samsung_SSD_980_PRO_with_Heatsink_2TB_S6WRNS0T220037X

More info on how debian is configured

# debconf-get-selections | grep dev/disk
grub-common grub-efi/install_devices multiselect /dev/disk/by-id/nvme-eui.002538b22140b542-part1
grub-efi-amd64 grub-efi/install_devices multiselect /dev/disk/by-id/nvme-eui.002538b22140b542-part1
grub-pc grub-efi/install_devices multiselect /dev/disk/by-id/nvme-eui.002538b22140b542-part1
grub-common grub-efi/install_devices_disks_changed multiselect /dev/disk/by-id/nvme-eui.002538b22140b542-part1, /dev/vda1
grub-efi-amd64 grub-efi/install_devices_disks_changed multiselect /dev/disk/by-id/nvme-eui.002538b22140b542-part1, /dev/vda1
grub-pc grub-pc/install_devices string /dev/disk/by-id/nvme-Samsung_SSD_980_PRO_with_Heatsink_2TB_S6WRNS0T220037X

Small Linux distributions

Quick notes for further research on small Linux distributions that are none-the-less useful. See also this list of resources.

Components

MUSL is an alternative to GNU libc that is very small. It is a mature product that is actively maintained and used.

Of historical interest: dietlibc and uClibc. I think both are no longer being developed. See also this comparison of library features.

busybox is a set of userspace command line tools built into a small binary. It’s a mature product, widely used.

toybox is a rewrite of busybox with a non-GPL license. It presents itself as a reinvention / improvement as well and looks usable and under development. It’s about 740kb binary (compare 1110kb busybox) but has less implemented in it.

OpenRC, s6, runit are alternative init systems to replace systemd.

Linux distros

Alpine Linux is a MUSL and Busybox distribution. Very mature product and an enormous package database, it’s quite productive. The VM ISO image is 60MB.

glaucus is MUSL + Toybox. Just had their first ISO release recently, it’s 528MB (or 210MB compressed).

OS/1337 is a new project for a MUSL + Toybox Linux distro witih very ambitious binary size goals. No release, not clear if the developer’s enthusiasm will be matched by working code, but it’s got some well articulated ideas.

See projects using MUSL for a list of other Linux distros based on the small libc.

Wikipedia has a roundup of other small Linux distros. Worth splitting the CLI vs GUI distros, also those targeted at small RAM vs not.

What I haven’t found is a good list of really small glibc based Linux distros. busybox for instance still works with glibc, see these Docker images. When I looked at this in December I noticed that the locales and SSL were two major sources of space usage; those can easily be optimized.

Further afield

Beyond Linux from Scratch is a learning exercise, building a working Linux system from sources. Maybe a bit of overlap with Arch in being interesting for a source for ideas of a highly customizable Linux distribution. A stated goal of toybox is to allow building BLFS.

Unikernels are the idea of replacing a generic Linux operating system with a kernel specialized to run a single service as a single user. There’s a bunch of them, OSv is one I’ve read about a few times. NanoVMs are another cut at them; there’s some Proxmox support.

Distroless is one approach to building containers (for Docker) without shipping a Linux distribution inside the container. Makes particular sense for GoLang / Node / Java systems where you basically never interact with the user space tools.