My third attempt to build a raspberry pi, it seemed easier to start a third page than refactor the last one. Here are my notes. I turned it off in August 22, and back on in Nov 2022. …

1st steps

  1. I bought myself a micro-sd/usb adaptor and a ceritifed power adaptor.
  2. I reformatted the sd card using this tool.
  3. I installed the OS onto the SD card.
  4. I ‘touched’ the /boot/ssh file. I used the dos command program and used type nul > ssh I used D: to access the boot directory. I got the advise here.

I then plugged the thing into the hub and power

  1. I logged in using ssh
  2. sudo apt-get install git samba apache2 xrdp
  3. adduser ${newusername}; and then usermod -a -G sudo ${newusername} and then sudo adduser xrdp ssl-cert
  4. Virtual Box VMs will need ssh installed, for more on VB, see here.
  5. I reinstalled the web site using ftp
  6. I reauthorised the hostname with noip.com and changed the firewall rule on the hub. I used whatismyip to discover my pubic ip address.  I reinstalled noip’s dynamic update client. and copied down my noip service file and then systemctl enable ‘d it. (Need to checkit works after the next boot.)
  7. I restored the https certificates using these instructions.
  8. I set up /share, using these instructions., the service names are nmbd and smbd
  9. I removed the games, they are called code-the-classics

On three, but not on its rebuild

  1. then usermod -a -G videos ${newusername} for Raspi Check
  2. I am still copying HUGO files, but if I wanted it on the Pi, then How to install Hugo on Raspberry Pi will be useful although it uses snap which I have managed to avoid by now.
  3. I also found this about deluge and buster, on deluge’s community forums which talks about the install and apt.
  4. A link to opentracker, a bittorrent index, and a git repo, I write more about opentracker on my bittorrent page.

I turned it back on today 12 Nov 2022.

  1. I turned off deluge using systemctl. i.e. service stop deluge && service disable deluge
  2. I installed the microsoft rdp client onto my tablet; it’s very slow. I also installed Juicessh & raspcontroller. I can’t get Raspicheck which is what I used to use, to work and it’s not available on the tablet, raspcontroller does what’s needed and I can issue commands using the ssh program.
  3. I amended whatismyip to cope with Pi outputs from ifconfig and fixed the menu option.
  4. I looked at the cronjobs, I must use run_aptjob -u to do the upgrades in future, run_aptjob writes log files. It should be amended to also use logger.
  5. I installed an ssl certificate which was a bit of a faff . Nov 2022.

To do

  1. I then looked at my check_aptrepo and checkfspct, and discovered that notify-send was not working. So I spent a couple of hours working on it, installing notification-daemons which seem not to work which I asked for help on the PI community forums, although it seemed to fix itself or my mucking around with the base software fixed it. See also https://davelevy.info/wiki/notify-send/
  2. I have installed postfix on the virtual machine, and send a message between root and dave using mail. So mailutils is on the machine. See also https://davelevy.info/wiki/my-little-mail-server/. The next phase on mail involves installing on the real machine, working out the firewall rules. Installing postfix will need a robust naming solution on my internal network. (Or will it, will the hub and nip solve it for me. I need to workout how to fix a firewall rule.

Backups and Disk Cloning

All the reading suggests that an appropriate image based cut and paste will work; it seems it needs to be image based to pick up the boot partition.

  1. How to copy / clone / back up a raspberry pi microSD card image for retropie and raspbian. a video by Mt Sujano, makes recommendations on the apps, Win32 imager to read, and Etcher to write.and on pimylife, How to Backup your Raspberry Pi SD Card, additional sites that recommend using windows include, Easily Clone Raspberry Pi SD Card to Larger Card in Window, or Backing up and Cloning your Raspberry Pi SD card in Windows, the latter is using WDI.
  2. How to clone a raspberry pi  sd card, from linuxhint.com this is text based, app agnostic and proposes using Pi tools., as does this from  all3dp.com,; it uses SD Card Copier which is accessed via the GUI and seems the best option. I found this page, from pi my life up, on mounting an external micro sd, which should allow me to do a file based back up of v3 of my  build.

Extending Swap

To extend swap on my pi, and or an ubuntu 22 system.

Related Posts

  1. https://davelevy.info/wiki/raspberry-pi-part-deux/
  2. https://davelevy.info/wiki/raspberry-pi/
  3. https://davelevy.info/wiki/systemd-ptui/
  4. https://davelevy.info/wiki/raspberry-pi-and-messages/
  5. https://davelevy.info/wiki/event-monitoring/

10 Replies

  1. My desire to use the Pi as a torrent node for some specific documents has led to further reading. Deluge goes on quite easily.

    I may need a tracker, which led me to webtorrent and then node.js. Not sure this uses the bittorrent protocols, nor if I want node.js on the pi. utserver does not run on raspbian unless you use an emulator.

    I seem to be stuck, deluge on the pi does not allow the posting to a tracker, is this true? If not, I need to find a tracker that will host my .torrent and is of low risk to me and then download the file. The alternatives are, to discover the link which is simply available via utserver, test if I can publish the torrent file via http[s] or to build my own tracker for the Pi, the raspbian community suggest that Open Tracker will do the job.

    Raspian Community has a recent article on setting up a torrent box, transmission-daemon is indirectly recommended. I have asked about seeding a swarm there.

    Does this at Life Hacker imply that a private tracker must manage membership?

  2. Earlier today, I restarted the pi, and ran apt. I logged into NO-IP and created a new dns name then the old one as I am unsure if the border firewall needs to know about both DNS names. The configuration panel suggests it does and requires a password; I am not sure who issues that, me, BT or NO-IP

    I rewrote whatismyip and cut and pasted into my git tools repo. I need to work out how to use git from the command line since they introduced 2FA.

    I then restarted the uptime robot monitors, and found that I am only issuing http services but they are new monitors and the hyperlinks no longer work. I need to work out how to do https. Use Hypertext Transfer Protocol Secure (HTTPS) on your domain from google. No-Ip issue a certificates.

    Both of the dns names resolve on my old home page if using http.

    I ran service and found that the no-ip duc is not running, but the deluge daemon is. (I need to put a stop to that, or work out how to build bittorrent index. ) See https://davelevy.info/wiki/bittorrent.

  3. Today, not so good, not a lot of progress.

    1. I turned off deluge using systemctl. i.e. service stop deluge && service disable deluge
    2. I installed the microsoft rdp client onto my tablet; it’s very slow. I also installed Juicessh & raspcontroller on the tablet and phone. I can’t get Raspicheck which is what I used to use, to work and it’s not available on the tablet, raspcontroller does what’s needed and I can issue commands using the ssh program. But see above on adding the Raspicheck user to the videos group.
    3. I amended whatismyip to cope with Pi outputs from ifconfig and fixed the menu option.
    4. I looked at the cronjobs, I must use run_aptjob -u to do the upgrades in future, run_aptjob writes log files. It should be amended to also use logger.
    5. I then looked at my check_aptrepo and checkfspct, and discovered that notify-send was not working. So I spent a couple of hours working on it, installing notification-daemons which seem not to work which I asked for help on the PI community forums.
  4. Today, I installed SSL certificates for the server. NOIP comes with a free certificate subscription. I advise to read the documentation, I chose apache & openssl as my server, and then + add csr to the free service. This instructs you to make a key pair using the openssl program. The ISO country code for the UK is GB, you need to define a state/province. You mustn’t add the extra attributes. They then authorise a cert which needs to be downloaded and copied to the /etc/ssl/certs directory. Now I need to enable mod-ssl and pick up the certs.

  5. The xrdp from the laptop is unusable. Booting chromium leads to the system hanging!

    Using top suggests that pulseaudio is consuming cpu. It gets worse when I boot chromium, logging in via Remina on the black laptop displays a chromium profile error, but using MS RDP does not show this message. using MS RDP the desktop opens, opening a terminal session is very slow, and opening chromium hangs the system.

    The package runes for pulseaudio is ‘pulseaudio’ from Fixing raspberry pi audio issues. For chromium, sudo apt install chromium-browser -y, the program is invoked via chromium-browser.

    I googled performance issues on the pi, and reminded myself that the logs are held in /var/logs.

    Examining the logs suggests i/o errors on the SD, this article, which has similar error messages, describes the extended boot times. It mentions a program called bad blocks, which took me to asking if bad blocks can be mapped out? But time for a new SD card.

    Some services have moved their PID files from /run to /var/run/, this generated syslog warnings. I had a quick look which suggests that systemd’s PIDFile parameter might be the answer. This query, looks to see if the blocks can be mapped out.

    Might it be the change in hostname? Surely not.

    1. As above, checking the log files suggests some bad blocks and a failing disk i.e. micro sd card. I bought a new one and rebuilt the PI. My notes were obviously very good as this didn’t take very long. The big problem was that I have not backed up my web keys so I needed to get them off the old disk as the my supply chain was broken; I could not get the cert reissued. But otherwise, good notes.

  6. I moved the following comment; I have failed to copy my old disk, I think it had/has bad blocks. I wonder if https://www.imgburn.com/ can do the job, the advice seems to be https://win32diskimager.download/ (WDI) which is optimised for cards, they claim imgburn is optimised for CD/DVD, seems odd, they both present via N:\; I wonder if dd can do the job. WDI is a pain in the bum. I downloaded from sourceforge, then discovered,
    you need to disable google drive, that “read only allocated” must be checked and that you need to stop explorer as WDI needs an exclusive lock on the drive. I gave up on this route.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.