Initial commit: HPR Knowledge Base MCP Server

- MCP server with stdio transport for local use
- Search episodes, transcripts, hosts, and series
- 4,511 episodes with metadata and transcripts
- Data loader with in-memory JSON storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Lee Hanken
2025-10-26 10:54:13 +00:00
commit 7c8efd2228
4494 changed files with 1705541 additions and 0 deletions

280
hpr_transcripts/hpr3266.txt Normal file
View File

@@ -0,0 +1,280 @@
Episode: 3266
Title: HPR3266: Upgrading Debian on my raspberry pi
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3266/hpr3266.mp3
Transcribed: 2025-10-24 19:56:18
---
This is Haka Public Radio Episode 3266 for Monday 8th on February 2021.
Today's show is entitled A Braiding Baby and On My Raspberry Pi.
It is hosted by MrX, and is about 33 minutes long, and carry an explicit flag.
The summary is, in this episode I cover the process of upgrading baby and from desiated to stretch eye on my Raspberry Pi.
This episode of HPR is brought to you by archive.org.
Support universal access to all knowledge by heading over to archive.org forward slash donate.
Hello and welcome Haka Public Radio audience. My name is MrX, and welcome to this podcast.
I usually would like to start by thanking the people at HPR for making these services available
to us all. HPR as a community-led podcast provided by the community, for the community. That means
you can contribute to why you pick up a microphone, your mobile phone, a computer if you have one,
tablet, hit the record button and send in a show. They've gone to a great deal of effort
to make it very easy and streamlined, so nothing to lose. And you might even enjoy it.
If I can do it, you can. So it's been a wee while since I've sent in a show or recorded anything.
I've been really busy. Just for reference, I'm recording this on 19th of December.
I'm sure looking off a lot of us since all the madness started.
I'm really unfitting it. It's difficult to find the time to pull out anything together.
Just getting holidays organized and stuff. Well, you know, in these conditions, what you do
in a holiday is, like a lot of my colleagues have been holding back and in it with far too many
holidays at the end of the year, sort of things. So because of that, I've got some time off now,
so I've got a little bit of time to catch up. And so I thought of an ideal opportunity to record
that on a episode. So I mean, going forward, I think, for a while now, I think it's going to be
a bit difficult for me to send in shows, but I'll see what I can do. You never know. I'm not
going away or anything like that. So it's funny. I'm kind of working from home at the moment
these days. And this, I've been kind of off all week, in fact. And it's almost felt like I've
been continuing to work all week, because I'm still in the same flame and room looking at the same
flame and screen. Well, it's not quite the same screen, it's more on screen because I've got a
company screen as well, but it's in the same desk, same position. So it almost felt like I was working.
So it kind of takes a wee bit of the joy out of things, you know, working away.
Not doing the podcast. This is quite enjoyable. Yeah, but a little rubbish and to make for it's
very easy this bit. But I'm sure people around the world are finding it very difficult this now. So
times as they are. Some of you don't know what the reference that is to. But anyway, yeah. So I thought
I've been kind of putting this off for ages. I think I mentioned to Dave that Dave Morris that
all my computers are slowly going out to date. And you know, the distros are going out to date and
whatnot. And I was just dreading, upgrading anything, you know. So how did we spread
cheap? I was doing a bit audit. What computers have I got? And what dishes have they got on?
Bloody, bloody, bloody. And one of the ones that was due to an upgrade or a couple of Raspberry
pies. Now, I think the last time I've got two of my pies, one's the one of which two pies that
have a pie face add on board on them. And there are different boards. They're both old pies.
And the one downstairs is got a screen, you know, an LCD display and buttons. We're not
covered all that before. And the last thing that I had a heck of a job getting it working again.
And because it's almost now see it as a, you know, you plug it in, it does its job, you unplug it
and that's it. It does nothing else. There's one purpose. It's almost like a piece of them
consumable take. I seat like that now. I don't even think if it is a pie. So I thought that's it.
No, I'm not touching that one. Nope, no way. So it's just too much hassle. But my other pie, which
replaces a, it was going to use as a home server. It's, I thought it might be a bit more easy to
upgrade. It's got a pie face IO board on it, which is like a, again, I covered that one. It's got
some LEDs and some push buttons and whatnot. And I mean, a lot of, I think I put, and I don't,
I put an add-on PCB onto it, it extends. It's got more buttons that I can push. And, you know,
90% of them are just just rubbish, you know, just for fun, you know. It shows you how much
space is on the pie, what the up time is and stuff like that. But two of the buttons I use to start
and stop a mock music on the command line. And that will list them on podcasts and audio books.
And it's darn handy, because when I'm upstairs anyway, because otherwise what I have to do is I have
to turn on a laptop or a computer, waiting to boot up, ssh into the pie, hit the space bar, and I just,
yeah, it's just a nuisance. So it would have been really, really handy if that continued to work.
So, so basically I started documenting what happened during the upgrade and how I went about it
and went on, I thought, well, I'm going to be quite, quite good to cover that. So, so basically the
first thing I did was, first of all, moved all unnecessary files from the pie. I hope you don't
all find this too boring. Here we go. I moved all the files from my pie onto, I think I think
I've always had a hard drive or something like that, it was a bit of a hard drive or I can't
move it somewhere anyway. And then what I did is I used G parted and I shrunk down the partition.
Now it's as 128 gigabyte SD card and I shrunk it down to just over 25 gigabytes, 25106 megabytes,
in fact, and 25106 megabytes or 24.5 gigabytes, 25708, 544 gigabytes, 26325, 549, 056 bytes,
I've already had to hear that. So I can I calculated that, that worked out at
our explain why I'm covering, why I'm being so meticulous about the bytes, the sizes and all that.
That worked out at 51, 1, 2, 3, 4, 5, 6, 51 million, 417, 551, 417, 088 blocks, basically,
of 512 bytes. Because I was going to use DD to, to DD the image you see.
The reason for all of this was I was wanting to deback up the pie because I thought, well,
if it goes wrong, I want people to bring it back. I just thought, it's just so much hassle,
I'll just live with it with an old distro and that'll be it. So as I shrunk it down to 25 gigs
and I used the DD command to grab the first, the bit that was used plus a little bit more.
So I can I calculated that, rather than, I filled up 51, 51, 417, 008, 8 blocks, so I picked 55,
417, 008, 8 blocks, just to get a wee bit of the empty space after it. So it was pseudo,
the command was pseudo, DD input, IF equals and input file, output file equals, output file,
maybe I wasn't going to cover the full command, but maybe I can. So the full command was pseudo,
DD, pseudo space, DD, space IF, that's input command equals slash dev, slash SDB. That's
happy to be where my SD card was. And then space, OF, which is output file equals, slash home,
slash Mr X, because that's my home partition, of course, hold the home drive, slash pie 13,
dash IMG, dash backup dot IMG, that's the name of the image failure on a create space,
BS equals 512, and that doesn't mean that BS is block size, block size equals 512 bytes,
space count equals, and then I just did 55, 417, 008, 8, and that grabbed that amount of
them of a disk, because it took ages, took ages, I've been at this for days, I had two machines
top grade, so took me ages, I just put it off so much. So anyway, that was that, and then I used
the following command to write that image file back to an SD card, it was just pseudo, DD,
input file is the image file, output file is SDB, of course, block size 512, I put status
equals progress, so I could see what was going on as it was writing it to the SD card.
Then once that was done, I would, I opened up a G-parted, and then I plugged in a SD card,
and I did it in that order, because I think if you load up G-parted, it does not mount the disk,
it checks and stops the devices from mounting, so I did that, and plugged the SD card in,
and then I expanded that, we're partitioned all the way out to the fill of the SD card,
in this case it was actually a 64GB SD card, my second card, that actually contained an older
version of the Pi, because what I tended to do is buy a new SD card, back up and copy it onto
the bigger one, that way I could just get a bigger card each time, but once you got 120, I thought
what was big enough. So, and then I booted from the 64GB, just to make sure that it all booted
up and it all worked okay, and nothing went wrong, it was fine, so that was good.
So, I removed this, 64GB card, so I can go back to it if anything goes wrong, and then I booted
into the 128GB card, which remember was shrunk down to 25GB, so they're about, so I expanded it
back out to fill the whole 128GB of the SD card, this all takes ages of course, and then I used
SD card, that 128GB card to perform the upgrade, so the upgrade process, so I think generally speaking,
I think Dave means quite a solid distribution, and I know that I've had problems in the past
upgrading to an affair with other people, having issues with that sometimes,
I was going to crush your fingers, not for the best, but anyway, I found that
explanation, somebody's explanation about how to upgrade from JC to stretch, because that's
what was on the pie, I think it was probably the, what you call it, the minimal install, it
doesn't have a GUI, it's just a basic Debian distro, that's what I think, from what I recall,
so I'll put a link to the page that I used with the commands, but also include them in my show notes
as well, the heading at the top says, every day life of a penguin whisperer, so very good,
but I think it's actually a German site, you can pick the German or British sort of out,
German or English, I should say, but there you go, anyway, so what they recommend is,
or first of all, you want to make sure you've got plenty space, so you do DF space,
dash H, I think you've got plenty space, obviously I did have plenty space,
and then recommend checking package status, so you do that by doing pseudo space DPKG
space dash dash audit, and then pseudo space DPKG space dash dash get selections,
pipe that to grep, looking for the word hold, and I'll list as you've got any problems
with your packages, and of course I was fine, that was okay, so the next step is before upgrading,
you should update your Raspbinar Debian, completely just what's at the very latest standard,
before you go ahead and upgrade, so that was a pseudo space apt dash get space update,
then pseudo space apt dash get space upgrade, and finally,
pseudo space apt dash get dist upgrade, and that will update your pipe to the little
very latest version of on the mic as it was JC, which is, I think, Debian 8 basically,
so the Raspbinar Debian version need to modify your package lists so that they
point to stretch and not JC, and the way that they do at the use,
in this website, they use this head command to insert the appropriate lines,
it say aptsources.list, and it say aptsources.list.d, and I sort of checked the locations
that was going to make sure that these were correct in existence and whatnot, and that went fine,
and then you obviously would update your package list, so it's just pseudo apt dash get update,
and then finally to update to stretch, you just do pseudo space apt dash get upgrade,
and then then pseudo space apt dash get dist dashed upgrade, and obviously that takes
flaming edges, except for things seem to do, and then at the end of all that,
it's clean up the installation by to remove any unnecessary packages and whatnot, so you just
do pseudo space apt dash get auto remove, and pseudo space apt dash get auto clean, and that
what fine, so during the the upgrade there was a number of things reported, and of course,
what I should have said at the beginning of this, of course, is there's, I'm sure it was,
was it Chairs Griffin, funny things pop into your head, Chairs Griffin did a thing about how you
can log a series of commands and outputs, it's almost like an auditing trail sort of thing,
and I think it's not using the command scripts, SCRIPTS or something like that,
and I should have run that, and it writes it to a file and you can then go back and review what's
happened, I didn't do that, so I just jotted some notes down as it was going along,
so the there was comments about the lsb release, you know, you run the lsb release command,
for example, to see what version of OS you're running, you know, what release of debing,
you're running or whatever, and I found, of course, that when I tried to just check that
that upgraded that, it said, could not use us, I would just say, yeah, since some modules not
find or something like that, but you can also do it by cutting, yeah, you can, you can get it by
cutting, doing cat space, it forward slash, it say slash OS, dash release, yeah, sometimes
all the ways are the best ways, and that gives you a good clear indication of what you're running,
what version of the distro you're running, it's probably a good foolproof way of doing it, cat
space slash, it say slash OS, dash release, so that's a good tip,
so it mentioned my bash RC was different, I just kept that as it was,
there was a lot of changes to SSH, actually, the release not said there was, there was something to
do with them, hashes, char one, week yes, apt hashes, week yes, and all that stuff, so I'm about
to, yeah, obviously there being a lot more strict on the rules governing SSH, something about
the key length again, not having to be above a certain length, I've increased that length,
and it looks like there's two locations for keys, as authorized keys, and authorized keys,
authorized underscore keys, and authorized underscore keys, two stored in SSH, so you could have had
two alternative, you know, two places, and I think I'm deprecating that, so yeah, so there's
a good number of changes happened to SSH, so once a thing booted up after the upgrade,
I found that my beloved music on the command player would not run, I found a post, I haven't
actually written down what the actual error was, but I solved it by adding the line
I mean, I also stuttered the defeat equals no, that solved the problem, well, I think actually,
yeah, there was two errors, the first error was saying something about the, you might get
stuttering sort of thing, but it was still, it wasn't actually stopping mock from loading,
but it would continually give you this warning, and I think I put that into Google and I found
that you can, if you just add that in the config file from mock.mock in the dot mock folder,
I'll say stuttered defeat equals no, then that solves it, the other problem I noticed is it's
obviously a newer version of mock, and it obviously goes through and does some checking on
the configuration and keymap files and whatnot, and there were some changes and it obviously
didn't recognise one of the options that was there, line 82, I think it was something like
neck search equals carrot g, carrot n, so that wasn't allowed in this version of mock,
yeah, I thought just for the sake of it, I'd have a, I looked to see what it is in the
partly, on this, this Debbie and it's, it's 2.6, 2.6 version 2.6 dash alpha 3, gosh,
build November 27th 2016, you find out about using mock by issuing the command mock p space dash
capital V, or is it version, whatever it is anyway, there you would dash V's for a version anyway,
capital V, yeah, it's almost had an earlier version in that running on the, on the previous version
of Debbie and I thought there was some active work going on with mock p, I thought it would
have been newer than that, actually, anyway, there you go, so that changed, but that solved the
problem, these are all kind of minor things, so really, and I think I, I don't want two things,
it's, everything seems to be working okay, I don't do a heck of a lot with the, with the pie,
it's, it's, um, service files and, um, but yeah, it's, um, and it's got, uh,
get I player on it, and that, that seemed to work okay, although I had to, I had to, um,
um, remove the, uh, the repository, which was kind of broken anyway, so, um, that might,
could make that or no doubt give me a problem further down the line, uh, but, um,
but the, the, the thing that was more important was, uh, the last thing which didn't work was,
uh, was the pie face digital IO board, I explained at the beginning, it's, it's a board that's got
buttons, you can push, uh, and you can activate relays on the board, it turns LEDs off and on,
um, and I can use it to, to kind of turn the pie into, I can have,
the MP3 player, you can turn, you can pause and play, it basically toggles the,
between plop, plop, play and pause, that's, that's the two most, that's the most useful thing,
uh, the other things are just just kind of fun things, but, uh, it's on to my, uh, uh, a, a,
a Python file that I wrote called, uh, um, and a, um, rather unimaginatively the time I called it
test.py, because I was just testing out the, the board at the time when I never got a change in it, so,
uh, anyway, it reported, uh, multiple errors, and, um, one of the things it reported, it said,
pie face digital core, no pie face digital detected error, no pie, no pie face digital board
detected, hardware address equals zero, bus equals zero, chips like equals zero, and, um,
actually, I don't know quite what, I kind of, when did that, the wrong, wrong path,
and I, what, I think I changed, I changed the header at the top of the script to specifically
point to Python 3, and, uh, and it, and that error went away, so I assumed, oh, right, that's
solved, I just need to get all the, I just need to get the syntax errors and whatnot, so I spent
ages fixing all the syntactical differences between pie 2 and pie 3, uh, bringing it all up
to date and everything, uh, and then end up with the same error again, so, uh, that was a big
waste of time, um, so I put that error into, uh, into Google, and, uh, and I found, uh, something
written in a, in a forum, as a forum for everything, Raspberry Pi forum, it was at the Raspberry Pi
org forum in fact, in fact it was in there, and, uh, according to post, I, I don't begin to
fully understand it, I was just kind of keen to get it working, uh, according to the post,
it's something to do with the fact that the, um, SPI serial speed did change from 500 kHz to 100,
well, we're seeing 500 kHz to 125 megahertz, that's a heck of a difference. I did make sure,
because I thought, oh, I'll just be, when I first saw the error, I thought, oh yeah, the SPI got
to turn that on, that's like an interface, but, and that's how the, the board, the add-on board
communicates with the Raspberry Pi through the SPI interface, and you can use the Raspberry config
command to turn that off and on, so I did that, it made no difference, um, so, um, it was very,
clever chap-y, or chap-s, uh, person had, had, uh, actually solved it, and it was, it was down to,
um, what you can do is, if you, if you, if you modify the SPI.py file, and, um, I used the
find command to, um, to find locations where, where that file is, using find space forward slash
space, dash iNames, ignore case, that's probably the important space, SPI.py, and it, and it was in
two locations, it was in userlib, user slashlib slash Python 2.7 slash disk dash packages,
slash pi-face-common slash SPI.py, so it was in the 2.7, uh, Python folder, and it also,
in userlib, Python 3, disk packages, pi-face-common SPI.py, and, so also in Python 3, so in these two folders,
so, um, I copied, I created a copy of the original file, and I called it SPI.py.back, just in case,
because I thought, I'll, I'll, I'll, I'll log it back, so, always a good idea of that, um,
so I'll actually only that ended up only having to, do a very minor modification,
so I, um, and I only modified the SPI.py folder, and Python 2.7, I haven't actually done it for
Python 3, which I probably should do, and it, it, it entailed, um, that, um, at line 68,
I added a, I added a comma to the end of line 68, because the last, because I was going to add
a line to a block of code, and the last line on the block of code didn't have a comma, so I
assumed that there was a comma required, now that I'm going to add a line below that, so I,
I did that, comma, because all other lines had commas, isn't it? I didn't think too deeply about
what I was doing, you understand? Uh, and, uh, I added, uh, speed underscore h z, so that's our,
obviously, variable equals ctype dash c underscore u int 32, open parenthesis 15000, close parenthesis,
so it's, it's obviously setting, uh, variable, um, speed underscore h z to, to, uh,
integer of 15000, um, and, and that, and that, and that solved, solved the problem.
Um, after I did that, I closed the file, ran my original script, uh, test.py,
and, and that was it. Um, so that, that was, that was actually one of the last things I solved,
because it wasn't, you know, I thought, well, I, I didn't, I didn't, I, it was taking so long to
do all this, and I thought, well, I'll have a quick go at it, but if it's, if it takes too long,
I'm going to stop, because I haven't got enough time, but so much to, to get on with.
So I'll do the other things, I, I know of what a good chance of fixing.
Uh, so I was very pleased that just recently, just, in fact, just,
an hour or so ago, I'm, I'm going to solve that.
So the other things that I had, I had SSH not working, and of course,
as we said, they've been a bit more security conscious with SSH, obviously, with the later version of, uh,
the sympathy with the, with Debian stretch.
So, so basically my, my Raspberry Pi downstairs would not,
um, SSH into the Pi upstairs, so I couldn't remote the control mock, um, from my wee remote box downstairs,
because it wouldn't SSH into the Pi up, up here, upstairs.
And it turned out that was because, uh, my Pi downstairs, Pi face, the Pi downstairs, with the Pi face,
C-A-D, um, I don't know what, I had DS, D-S-A, and are it's A type keys, public keys,
public and private keys in, in the dot SSH folder. And, um, when I looked at the logs, uh, I looked at
the log on, on my Pi upstairs, uh, tail dash F, slash FAR, slash logs, slash auth dot log.
And then I tried to log in from a Pi downstairs, an auth pub key, key type SSH,
dash DSS, not in public key, accepted key types, so there you go.
So, I inserted the RSA key, uh, into the, uh, a copy of the RSA key, public key, into the
Pi 13 upstairs, and, uh, and that solved the issue. And, uh, my triple EPC, it, it was the same,
well, in fact, it only had, uh, we only had DSA keys, it didn't have, uh, RSA keys, um, so I had
to generate a fresh RSA keys, and I added into the Pi 13, and that solved that problem, um,
and allowed me to SSH into the Pi from my triple EPC. So, yes, I think, um, I don't know,
maybe that was about a day, a day and a half, something like that. And I upgraded a,
a laptop, so, uh, which, uh, I might cover on another episode, but I really think that's,
that's more than enough, and I've probably bored you all to tears. So, uh, I do apologise,
but it is a show after all. Anyway, it's, it's, it's, it, it does feel really good to be back online
again and, uh, and, uh, back with the HPR crowd. And, uh, I do hope I can, uh, post a few more shows,
maybe something a bit simpler, but I thought it was a golden opportunity to cover this, um,
when it, while it was fresh, my mind. If you want to contact me, you can contact me at
MrX, at HPR, at googlemail.com, that's MRX, AT, HPR, the art symbol, googlemail.com. So, until next time,
you're back online.
Sure.
Thank you, and goodbye.
You've been listening to Hacker Public Radio at Hacker Public Radio dot org.
We are a community podcast network that releases shows every weekday, Monday through Friday.
Today's show, like all our shows, was contributed by an HPR listener like yourself.
If you ever thought of recording a podcast, then click on our contributing,
to find out how easy it really is. Hacker Public Radio was founded by the Digital
Dog Pound and the Infonomicon Computer Club, and it's part of the binary revolution at binrev.com.
If you have comments on today's show, please email the host directly, leave a comment on the
website or record a follow-up episode yourself. Unless otherwise stated, today's show is released
under Creative Commons, Attribution, ShareLife, 3.0 license.