The Professional blog of Jason Firth, C.E.T.

Workmanship matters

As I've documented previously, I moved this website from a third party host to hosting it from my own 'datacenter'. For a while, said 'datacenter' consisted of a bunch of computers sitting in my spare room on the floor, but I wanted to clean things up and make it a bit more permanent, since I intend to just let them sit and run for a very long time, hence getting fanless PCs (and two of the machines don't have a single moving part)

I would have preferred to use slotted tray such as the kind available from panduit, but I was limited to what I could find from home depot, so I used stickybacks and ty-wraps and hid the complexity with an extra little board. I'm very happy with the results, and it's something that doesn't look bad on the wall. Even better, these computers really are meant to be mounted vertically, so I immediately got a 10+ degree celsius temperature drop.

In the field, neat installations are very important. A neat installation is more likely to stand the test of time, and the extra thought you put into workmanship will translate to a more robust final product most times. This home installation took a bit more time and money to complete, but it's working better than ever and there's a lot fewer ways it can be damaged than if I let everything be loose.

Thanks for reading!

Installing ubuntu on a chromebook c201p

how to get ubuntu running on an asus chromebook c201p

I'm Jason Firth.

My dad is starting to enjoy chromebooks, he's been playing with them for a couple years, and so he had an Asus Chromebook C201p kicking around. He said to me "Play around with it, maybe you can get full blown linux installed on it!"

I was able to get libreboot installed fairly easily following the instructions I found here. Once that was done, I spent a long time fidlding around trying to get everything working, and it wasn't easy.

The problem I've been having is that the most commonly available install is based on a totally free kernel that doesn't support wifi. the only other image I could find supported wifi with an older kernel with non-free elements, but I couldn't get the software I wanted running. I think I've found a decent compromise for now, so I wanted to share the compromise with everyone.

So to start with, you'll want to set up libreboot using the above. The scariest part of that is opening up the case to remove the write protect screw.

Once you've got that, you can now boot off of a USB memory stick by pressing CTRL-U at bootup.

To create the memory stick, you'll need the following:

Win32 disk imager utility

The USB memory stick image

You use the imager utility to write the USB memory stick image.

You might want to make a backup of everything on the device before you continue. I think you can use the dd utility to do that, but frankly I made the mistake of not doing that step so I can't tell you how to do it.

Once you have your backup, boot up onto the USB memory stick you created. It's going to keep showing different boot messages after it shows the login prompt so you might not recognise it. you can just enter the username and password regardless.

the username is root the password is toor 

This copy of ubuntu is 18.04, which is supported for several years after the writing of this article. I tried later versions but it started to mess up.

This seemed to give me the ability to run X11, as well as wifi you could control from x11, and overall a decent experience. I wasn't able to get sound working, but I believe that the drivers do work and there's just a volume thing to fix. At least this will bring your system up to a point that you can work on the system from the system.

To install to the internal mmc, I did the following:

  1. I ran fdisk on /dev/mmcblk0 and erased all the partitions, then created a 32MB partition at the beginning of the drive and a second partition making up the rest of the drive. The first partition needs the partition type of 65 to be the chrome boot partition.
  2. I ran:

dd if=/dev/sda1 of=if/dev/mmcblk0p1

to copy the boot partition from the USB stick to the chromebook.

3. I ran the following commands to create a filesystem, mount it, and copy the contents of the system running on the USB stick to the mmc:

mkfs -t ext4 /dev/mmcblk0p2

mount /dev/mmcblk0p2 /mnt

rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt

You can now reboot and should boot into the linux system now installed on your internal mmc.

once you're logged in, you'll probably want to set up some basic wifi.

run:

wpa_passphrase [SSID name] [SSID Passcode] > ./wpa_supplicant.conf

wpa_supplicant -B -c ./wpa_supplicant.conf -i wlan0

dhclient wlan0

You can run apt update to make sure you're working with the latest files, then you can do a few things to help make your setup more secure.

  1. passwd to set the root password
  2. adduser [username] to create a user
  3. nano /etc/sudoers to add your new user to the sudoers file

Now when you log in next time you can log in as a normal user and elevate privileges if neccessary.

Now it's time to install a full desktop environment.

you can run apt install lubuntu-desktop to install an lxde based desktop, kubuntu-desktop to install a kde based desktop, xubuntu-desktop to install an xfde based desktop, or ubuntu-desktop for a gnome based desktop.

Once the install is complete, run reboot to reboot. You should now see a graphical login, and the system should operate like a normal ubuntu desktop, albeit one without 3d acceleration.

I hope this helps for anyone who was like me and looking for some help setting up an asus c201p chromebook to run a full powered version of linux while using the internal wifi and being able to run most standard software. I'm lucky there were a lot of people doing good work elsewhere to help me get to this point. If I manage to get a more up to date version of linux installed, and especially if I manage to compile a fully featured kernel that's newer than the ancient 3.14 version included in this image, I'll make another post.

I don't want to misrepresent, this seems to be functional at this point but all it takes is one wrong update to blow things out of the water, and it's still missing some key features that should be functional.

thanks for reading!

Tevo Tornado - updated configuration for Duet firmware v3 series

I'm Jason Firth.

One of the most popular pages of all time on this site is where I connected my Tevo Tornado to a DuetWifi. I've been using that 3d printer routinely for years since I put it together, and it's been rock solid.

That being said, one thing I believe strongly in is running the latest version of software. You never know when you're going to run into a bug that has been solved years ago, or you'll need to solve a problem and nobody else can help with your ancient copy of the program.

This year, the duet firmware had a major upgrade from the version 2 series to version 3. The new version has some major changes. Where Version 2 used input and output numbers, version 3 uses specific i/o names. It's just slightly different.

As a result, you can't just move to the new version of the firmware and expect it to work, the configuration needs to be modified to deal with the changes to the i/o addressing.

After waiting way too long, I finally got around to making the modifications and testing them. I was able to get the printer back up and running!

When you're upgrading the firmware from here you will need to do the upgrade in 2 steps: First, you need to install the 3.0 revision to bring your machine to the latest. Next, you need to install the latest 3.x series firmware.

Here is the config.json you can load into the reprapfirmware configurator.I recommend using this with the reprapfirmware configurator to configure anything specific to your unit.

Here's the final configuration. You'll probably want to change the wifi parameters before uploading it to your printer if you drop it in directly!

Thanks for reading!

Fanless PCs, the latest rings in this tree

I'm Jason Firth.

I'm never a fan of when the website is down in spite of the fairly small number of readers (hi everyone!), but I have wanted to make a change for quite some time.

In a previous entry, I talked about migrating from from my previous hosting provider. Godaddy was a decent host, but they made some changes that stopped this blog from operating properly, so eventually I switched. I didn't really want to go with a third party host, but after fighting with trying to get a port opened to the outside world, I decided it was safest to do so. At the same time I started playing with Nextcloud, a service that's sort of like a self-service google cloud. I really like nextcloud, and every few months I see it get better and better.

Unfortunately, nextcloud isn't a small or simple program, and eventually the hosting company got upset with me for using to much resources on their servers. They offered me to pay a large sum for their top plan, but I wasn't really feeling warm and fuzzy about third party hosting -- who was to say they wouldn't take the money and still be upset with me for using too many resources? Besides that, there were things I wanted to do that I'd want direct control to accomplish, so I decided to run my own server. In my experience, fans are the #1 most likely cause of failure on a PC, so I decided my websites would run on a fanless PC. I found a fantastic deal on an NDIS 163 fanless sign PC. The specifications of the PC are right on track with what I was looking for: a Core 2 Duo low energy CPU, and a SATA hard drive. It came with a Crucial MX500 SSD, but I wanted to use a spinning hard drive for this server because in my experience spinning hard disks are still the most reliable choice for long-term storage.

I looked inside at the box, and found some standard DDR-3 memory slots, a couple mini pci-e card slots for wifi or wlan, and a replacable CPU block. The heat sink for the CPU and chipset connected to the top of the machine with some thermal pads. Overall a simple, boring design which is exactly what I wanted.

The power connector turned out to be the biggest issue. The power connector is KPPX-4P 4-pin male connector. I determined by looking at the circuit board that the top to pins were positive, and the bottom two pins were negative. Miracle of miracles I actually happened to have such a connector in my house, so I quickly built a power supply.

It's surreal turning on a PC like this. Most PCs announce that they're running with a loud whirr, this one doesn't have anything like that. Even the mechanical hard drive is so quiet that all other ambient noise in the room overwhelms it. You don't hear a thing.

If anyone is coming here hoping to find out if you can use an NDiS-163 as a daily driver PC, I strongly recommend against it. I ran pcbenchmark in Windows 10 and what I found is that it was relatively fast for the components within, but really very slow compared to anything you'd use on a regular basis. Mobile versions of CPUs tend to be de-rated to reduce the energy consumption, so even as a core 2 duo, it is already slower than usual, and the video is just a standard intel integrated graphics which don't like Windows 10 very much at all. Based on the temperatures this ran during setup (The core temperatures were below 40C) I expect this machine to run for decades without issues, which is what I wanted. Worst case scenario the hard drive fails and I install another one.

To be honest, for the sake of a good story I wish I could tell you there was a bunch of excitement and interesting problems setting up the computer, but there wasn't. The machine is a pretty straightforward intel-based machine, and ubuntu server installed without any problems. This document contained all the basic steps for installing nextcloud, and the only big change is I switched from php 7.2 to php 7.4 since I saw that the next version of nextcloud won't support 7.2 any longer. 

I've wanted to use nextcloud talk between my wife and I, so I used This document to set up a TURN server. Such a server acts as a go-between if two machines are both behind NAT and thus cannot talk to each other directly. This meant that video conferencing functioned -- which is fantastic. Imagine, you get full video conferencing without a middle-man. Everything involved is your own hardware!

I used this tutorial to set up encryption, so everything is https. Google pushed for https to be default on the Internet quite a few years ago. Frankly, it's sort of a waste for 99% of what you'd do. Did you really need to encrypt this article to read it? It's free for all to see, you know... Regardless, playing ball with Google is a pretty much a given in 2020, so I went ahead and did as they asked.

One of the problems I faced last time is that I couldn't get a port 80 or port 443 to the outside world. Thankfully, I resolved the issue by taking control on my own -- replacing the phone company's router with one of my own. Now I face a problem of dynamic IP addressing. Someone made a great article here that shows how to automatically update your dns records within 15 minutes of an IP address change. I followed that and now all my sites resolve to their domain names.

And that's about it! Like the rings in a tree, I can go back and see the signs of the different eras of my websites, and I love the process of learning how to set it all up.

Thanks for reading!

Keep your nose to the grindstone, that's how you win.

I'm Jason Firth.

Sometimes you have problems that seem insurmountable, and all it takes to solve them is keeping your nose to the grindstone long enough.

I recently decided I wanted to have Network Attached Storage. Lately cloud services like Google have been getting sort of strange, and I just felt more comfortable having my data stored locally on my own hardware. I also wanted to have the data mirrored. This would mean that I have the data on two separate hard disks, so if one drive had problems, I would have a copy available. I purchased a pair of used hard drives and a used NAS. Unfortunately, the NAS shipped with a 50V power supply instead of a 12V supply so it immediately blew to smithereens, and I feared it may have damaged the drives at the same time. I purchased a new NAS and inserted the drives, only to have problems immediately.

The drives were Western Digital Red 3TB drives. They are both fairly old, but I figure this should be adequete to get me started and I can replace the drives at a later time.

To troubleshoot the drives I hauled out my ancient PCI got all sorts of Input/Output errors on the drives. I assumed it may be a problem caused by a faulty NAS, but something didn't smell right -- the drive appeared to be functioning properly. My intuition was telling me that the drives should be functional or not -- the idea that the electronics would appear to be functioning perfectly while we see massive failures on the magnetic media or read/write heads didn't really pass the sniff test, so I decided to dig deeper.

Here's what Western Digital has to say about error 220: https://support-en.wd.com/app/answers/detail/a_id/7519

My daily driver PC is a laptop, so I couldn't just plug in the computer and expect success. I would have to do everything I could from USB memory sticks.

Next up, I downloaded and ran a Western Digital diagnostic utility for MS-DOS. That's where I got the clue I needed. According to the utility, it couldn't run a bunch of benchmarks because the hard drive had a Code 220 or Code 0220 "Drive is Locked". That was my clue that something I could fix was going on.

The utility I finally succeeded with was called HDAT2. With it, I was able to unlock the drive.

The following is a fairly raw recounting of the steps I used to fix the drives:

  1. Download Rufus from https://rufus.ie/
  2. Downloaded HDAT2 https://www.hdat2.com/
  3. Created a freedos boot USB using rufus and copied the hdat2 executable files to the stick
  4. Opened HDAT2
    1. cd hdat2
    2. hdpmi32
    3. hdat2
  5. Selected the drive
  6. Hit Enter to open the menu
  7. Selected the security menu
  8. Hit enter on the Unlock feature
  9. hit I to select the master identity
  10. Pressed K to select a known password, there were a number available. The one I ultimately needed was "WDCWDCWDCWDCWDCWDCWDCWDCWDCWDCW "
  11. Pressed S to set. It will ask if you're sure. Press Y. If it is correct then it will say it's succeeded. If it isn't correct then it will say aborted. You can try the other known passwords.
  12. Next select disable password from the menu.
  13. Select the master identity by pressing I once and press S to set. Press Y to confirm.
  14. If it worked correctly then it will say it succeeded. If it failed then it will say aborted.
  15. Security on the drive is now shown as disabled!
  16. Before I took these steps, the drive could not be accessed successfully in any way. After I took these steps, I was able to immediately install Windows 7 on the drive, proving that it worked.

Thanks for reading!

A small practical print I wanted to share

I'm Jason Firth.

3d printing is an amazing tool for a variety of reasons, but one of the big reasons is that you can create something you needed much more quickly than if you couldn't just 3d print a thing.

I've had this YI Home PTZ camera for some time, but the problem is where do you mount it? Every object talking about mounting a YI Home PTZ camera left out a really important piece: the part where you actually mount the camera! They had all these really fancy arms and the like, but that was totally meaningless without the piece to connect to the camera!

A few minutes with a micrometer later, and now I have a nice sturdy mount for the camera. I used a pair of drywall screws to connect it to a surface. Since I wish I was able to find one earlier, I've made it available here.

Here's a link to the STL file

Thanks for reading!