New OS Smell: Manjaro Linux

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m starting my first expedition into another branch of the Linux family. Let’s get started!

Moving away from Windows involved one of the larger culture shocks I’ve ever experienced without leaving home. The concept of software package managers was something I had only seen on phones. The file system left me wondering where my secondary drive was. And the downright alien sense of open-ended desktop environment customization options almost sent me reeling with decision fatigue. But the mindset surrounding Linux lends itself to self-guided study, an element that is sorely absent from a number of other mainstream operating systems.

The switch to Manjaro has brought back some of that sense of culture shock, but the similarities are already surfacing. Of note, I am also finally trying out this fancy KDE desktop environment, now that I’m on something with a discrete graphics card, so I won’t be totally sure what change comes from where all of the time. The file system has some subtle differences, such as /run/.local, a directory I am otherwise used to finding in ~/.local. Software installation comes from either an official repository, or else code can be downloaded and compiled from AUR (Arch User Repository — similar to Ubuntu’s PPA, but it’s supposed to be safer to use). Furthermore, Arch-based distros have a rolling release schedule for their software, delivering the “bleeding edge” experience.

Installation was typical from what I have come to expect from distros meant for a desktop experience. I downloaded an ISO to “restore” to a thumb drive, and installed the intended install drive. I was sure to physically detach any other drives that I wanted intact before booting to a live session with a few essential programs and an installer application. It did offer a choice between a couple Office suites, which was nice.

Of note, I did have to install some proprietary drivers to get my NVIDIA graphics card to run Minecraft, or at least a custom mod pack. I hear it’s a bit of a gamble with KDE and that there are workarounds that tend to break with updates. I was cautioned to enable SSH before flipping the proverbial switch, but fortunately I was lucky and didn’t have to do some extensive repair.

I gave the system a few days to ease in before getting my father to rustle up my old PCI Wi-Fi card from somewhere in the garage. Long ago, we got this card when the machine was relatively new. I was in a dorm setting, and my wireless printer was particular about having only serving computers connected to the same wireless network. When I upgraded from Windows 7 to 10, was having the hardest time getting the upgrade to take. I even reached out to tech support some scammers who showed me to a network log or something and said, “These errors are what is keeping your computer from –what was it your problem was?– upgrading to Windows 10.” (aside paraphrased, the rest is as close as I remember) My parents were ready to pay these guys a reasonable-sounding fee, but the whole thing smelled off, and I backed out. Our own, internal diagnostics pointed to the Wi-Fi card, and I had to give it up.

My Wi-Fi card has had one of its detachable twin antennas smashed and trashed. In the meantime, I had need for my desktop to go wireless again. We bought a USB3 based antenna that served me well until the day I decided to use it with Linux. Since then, I’ve been using my Raspberry Pi 4 as a reverse Wi-Fi hotspot, and I’m quite proud of it.

Today, I decided to install the old card back into its slot and lo and behold, it worked straight away. I tried to run some speed tests to find if the newer Pi 4 was outpacing the older, more direct PCI card. But it was during peak usage in my area, so I’ll need to run something across my local network. Whatever the case, my father had the idea to stick the double-length antenna from the new Wi-Fi adapter onto the vacant attachment point on the old card.

Final Question: Have you ever reinstated anything you thought was hopelessly obsolete?

Emergency Teardown

Good Morning from my Robotics Lab! This is Shadow_8472 and today, I am not the hero of this week’s story. Let’s get started!

My laptop has had no business continuing to run for a few years now. It’s working on 10 years old, hardly ran Windows before I formatted over the wrong drive, and now it has suffered through a little more than a sprinkling from a water cup.

The first few seconds, everything was “normal” as I was panicking to turn the thing off, but capillary action won out, and everything shut off.

There was a minute of shock and confusion before I regained my composure enough to realise the possible danger of leaving a wet appliance plugged in. While liberating my laptop from its various plugs, I realized there might be hope if it could be dried out.

I can not thank my father enough for his help on this project! He literally dropped what he was doing to take care of my emergency while I was in no shape to handle it myself. I just shoved it into his hands wet side down and ran off and he did the rest.

I don’t know much about the actual teardown, but I hear the dust and critter fur at the bottom of the unit was dry. Parts were left to dry for around a day and a half. I wanted to do a rice bath, but my father told me that those are usually just for phones and then you gotta deal with any rice dust afterwards.

Before reassembling, there was an upgrade to make. I have a 1TB SSD intended for my desktop, but running Linux from a USB 3 drive with a small cable is kind of the opposite of portable, and with that sad excuse for a proper power port evicted, I’ve been able to take the laptop on Sabbath afternoon drives with my father, where we listened to a seminar by AWR. Two talks a week for roughly 45 minutes each, I had to mind OS’s umbilical.

Installing the internal SSD was straightforward. The original drive is the same length and width, but is noticeably thinner and much lighter. Most importantly, it fits the provided bracket so I don’t need some improvised block to hold things in place. Personally, I think the new drive is so lightweight that friction with the SATA connection alone would be enough to keep it from moving, barring impact from the wrong side.

Reassembly was delayed a few hours because my father wanted to try an epoxy to fix some plastic studs that have broken off over time. I always remember three of them rattling about, but one post’s superglue job was still holding and a small post with a fin was unfamiliar and didn’t fit any of the three holes. I surmised the later was from under the motherboard, a component that requires removing the whole screen assembly (not fun), but I actually identified the wrong screw hole. The remaining peg was located and all were affixed to their rightful positions once again.

I was not privy to most of the reassembly, but I did catch that going by pure memory has its drawbacks when you don’t have the teardown guide memorized. Also, the F9 key popped off, and we are waiting on a magnifying glass to aid in the particularly delicate work.

I brought a battery to the testing bench and arranged for the laptop to be booted to a live USB instead of my usual OS. I wasn’t there for the smoke test, as it’s called. My father reported, “The patient lives!”

Further operations are believable. There is a power status LED that’s broken off a tiny circuit board that I’d like replaced some time. We also have a faster CPU I might like to try, if neither are soldered in, the sockets are compatible, and my cooling system is up to it. For now, I’m just glad my old friend is still around.

Final Question: I have been trying to look into Firewalld for weeks now for my “supercomputer” project. Any ideas where to find a tutorial with some theory and isn’t just someone demonstrating a list of tasks?

Recovery

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am trying to recover my Laptop’s Windows drive. Let’s get started!

This project… this project I never wanted to need… has bullied around other stuff, and I’ll be glad when the equipment I’m using for it is freed up.

What felt like ages ago, I was formatting a drive so I could install MineOS on a 1 TB drive and move my family’s Minecraft server over from a smaller drive. The tutorial I was following said to format sdb, and I formatted sdb, but sdc was the one I really wanted to format. I missed the warning signs, and by the time I noticed, the deed was done. Normal procedure would dictate that I immediately shut down and remove the affected drive, but it’s screwed in and the computer is presently functioning as my primary workstation. Aside from mounting it once or twice right away to verify the damage, I’ve mostly left it alone.

Ideally, I would have backed anything up right away and only worked on a copy. For that, we ordered an eSATA to SATA cable (with power included) and it came on a slow boat from Taiwan. In the meantime, doflagie, a friend from my family’s server who has a few decades in IT, told me how handy USB to SATA cords are and “[wished] you were next door, I’d throw you one!”

With the cord in hand, I hooked it up and quickly learned to treat it more like an internal SATA connection and less like an external USB drive. I HAVE A QUESTION OUT ABOUT USB TO eSATA. I had to rearrange the BIOS again to prefer USB over eSATA, but that wasn’t anything new to me.

I learned my way around the dd command. There’s a reason it’s called Disk Destroyer, and I’m thankful I haven’t learned that lesson for myself yet, and I hope this lesson I’m going through now is close enough. Data Duplicator, the actual name, is a rather odd command when you look at it. Where most commands would have you order your parameters, dd makes you explicitly state the input and output files.

I eventually dumped the formatted disk straight onto a waiting 1 TB SSD and took it to my tower upstairs. I don’t want any chance of wiping another important drive, so I grabbed the original HDD from ButtonMash, the drive with my first Linux install, and put it in my personal desktop instead of another Windows drive. I tried installing TestDisk from a package, but I was missing dependencies, and Ubuntu didn’t like my USB Wi-Fi dongle (What is it with that machine and OS changes needing different Wi-Fi? I mean, first Win10 hates my internal Wi-Fi card and now this?).

This is where the project lingered while I worked on my Pi 4 Wi-Fi to Ethernet router. I broke down and finished that the easy way shortly after posting about it last, and due to fatigue and a photo chest week, I bumped this post a couple weeks and used something I had in reserve about a scam. I had another one, by the way. This time it was only about half a Bitcoin, but I reported it right away.

With a working Internet solution, I installed TestDisk and let it run. All I know about this utility is that if you’re doing free and open source data recovery, you’re dealing with TestDisk. I didn’t really see another option. I used it to find missing partitions, and I didn’t understand a lick of what I was doing. I ended up giving up and making an ISO file of the original drive over the copy I had made.

ISO copies don’t appear to be readily editable, it seems. I’ve since been working with the main drive. Most of my work toward this project has been the slog through the hard drive, looking for partitions, multiple times over.

I tried burning Win10 recovery CD. which needed a few megabytes more than a single layer, single sided DVD. A new, low-end USB drive has joined the fold, and it’s the biggest thumb drive I now have, weighing in at 16 GB. The ISO Microsoft gave me didn’t work: “operation [sic] not found”. I tried booting to it from my GRUB CD, but was told something or rather was invalid. I also tried some small distro called Trinity Recovery Kit, but again, it’s the right tools in inexperienced hands.

I’m getting tired of this. I want to move on, and doflagie even told me I could be on this for months. I just want to run a general recovery program and see what I can grab from the mess of things I have now, then try again after putting the ISO back for another pass. After that, this project needs to go rest in peace.

Addendum: I was going to make this post a two parter, but in all reality, I’m done with this project. I don’t have enough content for a second half.

I carved out what I could with some program I forget the name of. It combed through the remains of my hard disk and spat out a bunch of files. At least it had the courtesy to separate them by file type, because when I opened the PNG and JPG folders to sift through the ashes with a GUI viewer, my laptop chugged at tens of thousands of tiny, little files.

I had to learn the find command to weed out the smaller ones. I figure in the hands of someone who knows what they’re doing, it can fully replace all functions you would expect from a GUI file viewer except actually generating a preview. One little adventure here was when I had around 22,000 or so PNG’s larger than one kilobyte , roughly 50,000 PNG’s total, yet 0 of those were smaller that 1k. The difference were exactly at 1k.

Another small adventure was when I moved the 1k files into their folder, but then it tried moving each file over and over again in an infinite loop. I immediately knew I was dealing with a recursive directory error.

When I finally went and combed through the reasonably sized PNG’s it was mostly stuff I probably had lying around in a cache or swap at some time. Other bits were system icons like for forward or back. The JPG folder looks more promising, so I hope to recover more memories from there.

I’m done with this project. As with a few of my other projects, I need to release this one before all progress possible is made. Data recovery is expensive for a reason. I’ve done what it’s worth it to salvage things. Any additional data the professionals might glean from my drive isn’t worth it.

Final Question: What projects have you had to lay to rest with no intent to ever finish?

ButtonMash Upgrade Take II

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am actually doing a one-and-done project. Granted it’s more of a follow up to a huge project I did last year, but still, it felt great getting something short in. Let’s get started!

My family and a few online friends have enjoyed ButtonMash, a Minecraft server I assembled from hardware I had laying around, for several months now, and it recently ran out of hard drive space. Turns out 60 Gb of space doesn’t last all that long when you’re making full weekly backups of the whole server! I started covering this upgrade when I accidentally formatted my Windows drive on my laptop.

I started with a new download of MineOS. I formatted the correct drive and used the dd command to write the image file to the correct drive. With a new install media, I brought it and the new 1 Tb SSD to my tower and hooked them up to be the only things connected. Installation went smoothly until MineOS didn’t recognize the USB WiFi adapter I have.

I put the project down for a while while until I had a chance to continue working on it using an Ethernet connection. The only SATA port my laptop has is hidden below about twenty to thirty screws, the ButtonMash server wasn’t going down for any longer than I could help. Aside from two computers I highly doubted I could use, I was left with the one I put together for my father. With his permission, I installed the drive and ran the security updates recommended earlier during setup.

The only real snag I hit was when I ran into the DHCP configuration requiring manual intervention each time the machine booted. Annoying, as I was working with it mostly from SSH. I knew I had had this issue before, but I couldn’t remember how I solved it. I was a little frustrated with the lack of information online on this topic, but it was amusing for a previous blog post to show up in my search results — twice. My father ended up manually configuring a static IP one boot. It took another hour or two before I remembered static IP was the way to go. I added “fixing the static IP” as something to do announcing project completion.

Copying over the server files was fun. I got into the old server’s web interface and made a fresh archive. Then, using the new install of MineOS, I SSH’ed into the old one to copy the archive over to an import folder using scp. I goofed on the long file path, so I ended up copying it to the home directory and then over to the new hard drive.

With that, I moved over to the new server’s web interface and imported the server. Everything was there, except any backups. I logged into Minecraft and got in no problem, and when I checked, the automatic updates were still around. I’m thinking about redoing those as monthly, but it works for now, nobody touch it!

As a side note, I did some digging into using Let’s Encrypt with MineOS. A thread on the MineOS forums filled in some gaps in my understanding of MineOS’s https security heigine. Https relies on a security certificate –usually issued by a trusted third party– to scramble their communication. When the server self-signs a certificate, you as a client have to trust a potential unknown with keeping their half of the code safe. Before, I was under the impression there wasn’t any sort of security certificate without Let’s Encrypt. However, since the only people who need encrypted access are admins looking to access the web interface, they should probably be in a position to trust a self-signed certificate. From an outside attacker’s point of view, it looks the same as one from a more official source.

I shut both computers down and moved the hard drives around. My father’s computer was reassembled, and ButtonMash’s small MineOS SSD and Ubuntu hard disk were pulled and replaced with the new SSD. I booted it up, logged in with SSH (Public/private key authentication is so nice!), and fixed the static IP from when it had adopted my father’s computer’s IP as static. One more reboot later, and the server was officially up. Within half an hour, one of our players from the outside was on.

One more side note: it looks like by default, you have to first ssh in as a standard user, mc by default, and then use the su (substitute user) command to switch to the root account, as sudo does not come with MineOS by default.

On a finishing thought, I honestly hope someone finds this useful, even if I end up rambling. I purposefully added some key words I wish I had covered last time, so maybe I’ll come across this one next time I find myself setting up MineOS.

Final Question: Have you ever searched for help, only to be redirected back to yourself?

I’ve Got No Strings

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I carried out a very special and long-awaited project. Let’s get started!

For the one or possibly two people who have read almost everything I’ve ever posted, you will know that I had my laptop’s power port break on me roughly a year and a half ago, give or take (I have a vague memory from that time involving a Christmas tree, it’s been more than a year, and likely less than two).

My father and I stripped my laptop down and got it functional again, though when we tried installing it, the cord was extra long and something at the hardware level refused to charge the battery. Ever since then, the BIOS has been beeping at me every boot that the power adapter cannot be determined.

Several months ago, we decided to take another swing at repairing the laptop correctly this time. I pulled out the broken power port and we were able to grab the part number off it. Looking online, we found a match and bought it.

That part took quite a lot longer than it should have. The package had a hand written label that matched the part number, but when I opened the package, yes it was a power port, and the length looked to be about right, but the connector had seven pins to my laptop’s five. We took a closer look at the company who sold us the part and found they were operating out of China when their name heavily implied they were American distributor. My father asked for his money back, but has yet to receive a reply from these suspected small-scale fraudsters.

After another, much shorter round of waiting, we got a genuine part from a real supplier with a real part label this time. The only difference I spotted were different colors on the wires leading up to the pins, though they were effectively a palette swap from the original.

We grabbed a PDF of the service manual for my tablet and my father printed out the top-level instructions detailing the order of our specific tear down job. I got impatient to start, so I started pulling screws.

I did most of the work myself this time. When we got to the power jack, I used the original as a guide to find the proper routing the cord is supposed to take. I took the opportunity to dust off some hard-to-reach places while they were more exposed than not.

During reassembly, I tried to only tighten screws as tight as they needed to be, in case of any additional work in the near future. The most nerve wracking part was while replacing the screen; I kept catching and more than once did I hear what sounded like something breaking. I also spotted where one of the status LED’s was mostly gone from a tiny circuit on the front. Just the tiniest bit of red could be seen where it should have been, but not on any of the other lights.

Final assembly felt like it took the longest. Not only did I forget to connect the keyboard electronically the first go around, but I had already put the top plate on when I remembered I still had four screws to replace below the keyboard. At one point, I accidentally dropped a screw through a broken screw hole. With a little shaking the “loose conductor” fell right out.

Once everything was tightened back up, I put the battery in and connected everything. Moment of truth. The BIOS didn’t complain. Debian said it was charging, but it was stuck at 0.0% for a while. I swapped batteries and booted to Windows, and everything seemed to indicate things were going well.

It was back in Debian when I saw it. Net battery gain on the smaller battery from 51% to 54%. Prayers answered. We explored the idea that the larger battery might have been damaged from being discharged for so long, but I eventually got a similar confirmed charge point on it.

It was only a small formality to unplug my running laptop and use a little of that fresh battery power.

Repairing your own electronics gives you a much better understanding of how everything works. Even if you aren’t interested in what happens within each circuit board, it still lets you diagnose it better in the future.

Final Question: Have you ever repaired any of your own electronics? If not, have you ever looked inside anything just to look?

Linux Deep Dive Part 3: Stability

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am just going over the stuff I did this week. Spoiler alert: it’s more of a mix and mash. Let’s get started.

My idea while writing last week’s post was it. I believe my laptop wasn’t booting reliably because GRUB was configured incorrectly. The BIOS went fine and selected the external drive to load from (or the GRUB disk). The bootloader, GRUB, loaded correctly, gave me the option of operating systems to boot, but when it went to load Debian, some of the time the drives respond out of order: when GRUB went to the drive presently known as sda, the internal, Windows drive, and expected to load Debian, it panicked and dropped into BusyBox.

I diagnosed the problem by looking directly at the grub configuration files and sorted out any instances of “sda.” There were a few. After fielding some questions about the suspect config lines, I regenerated the config file after reverting the only change I had previously made without regenerating. When it was done, I scanned for the parts where “sda” had previously shown up, and there was the correct UUID I was looking for.

I wish I had found someone identifying this problem. Ironically, I came within inches of mysteriously solving this issue none the wiser when I tried regenerating the GRUB files to give the drives a full minute to load instead of five seconds. I can see where I might have spent just as long trying to reproduce the bug an failing. I wouldn’t have it any other way than how it happened. I can live with this.

With stability issues out of the way, I have other things to move over. Remember when I used to do 3D printing? Well, I want to make a bookmark, and I want to do it from Linux. I popped my SD card into my laptop, and found the copy of the Cura slicer that originally came with my printer — it’s a .exe file. Linux doesn’t do .exe files.

Side note: I’ve been using aptitude instead of apt-get. They both do the same job, but aptitude tries to put a nicer face on it, like not changing half its name for searching instead of installing.

After teaching myself how to search the apt repository like I did back on MicroCore, I used aptitude search cura and installed the package pertaining to g-code generation. I looked in my program menu and found “Ultimaker Cura.” OK, I suppose this is the generic. I already knew the version I was on before was a fork of some other parent program. Lacking another explanation, Ulitmaker Cura seems to be it.

The first time I opened this newer version of Cura, I was bombarded with a prompt to add my printer. I didn’t see my printer, so I ended up picking a wrong one and continuing from there. And that is where I’m stuck.

I poked around in the menus and did some research, and found the latest version of Cura is on at least version 4.0, but the on in the Debian repositories is 3.3.1. I am starting to get the feeling that this is what they meant when Debian software is chosen for proven stability. I may go around the repository on this one.

Diagnostic procedures involved a bunch of research and plugging in with a USB B connector. I hooked my printer up and told Linux to list my USB devices. I isolated an entry called “QinHeng Electronics HL-340 USB-Serial adapter.” I’m not exactly sure what is going on here, but it looks like my printer is electronically connected to something inside that then talks to the computer outside. Oh, and the menu still works off just USB power.

I am open to using other slicers. The main goal is to demonstrate a workflow, and I don’t have that right now. I also tried Slic3r Prusa and it had even fewer options, but it had a list of questions for configuring other printers.

Looking around, there is a lot more to the world of slicers than the narrow sliver I was looking at before. The IIIP branded Cura is great for someone who is just wants to 3D print or doesn’t want to move away, but there is a whole world to explore out there with different optimizations and features to play with — all locked away behind a learning curve that starts with getting my printer back online.

There are plenty of 3D printing videos out there. Every one I clicked on while trying to get things working on Linux was using Windows. Maybe there was one, but I don’t know. I’m going to have to tackle OS/slicer and slicer/printer issues separately from now on.

Unrelated: I have been getting a lot of use out of my Steam controller. It turns out to be very useful as a mouse on my Widows machine when I want to sit back without a hard surface in easy reach.

Final Question: What was one challenge you faced that left you feeling good for going through it?

Linux Deep Dive Part 2: End of Week 3

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am continuing my coverage of my deep dive into Linux. Let’s get started!

Last time, I installed Debian Linux on a USB external solid state drive using skills I learned from previous projects.

I am very much still in my trial period for Debian. Most of my time working with it has gone into exploring and diagnosing the system.

A lot of my MATE explorations into panels happened on at least day two. While I was able to assemble a semi-convincing Start bar look-alike, it still has a way to go.

I discovered the first of two big hitches when I took it in to Third Workshop and booted to Windows to demonstrate Minecraft in its unplayably slow state. I hit restart, booted into Debian, and it was still unplayably slow. I even rebooted several times, only for it to refuse the decent performance I knew I had seen already. We even put a simple clone of Minecraft by the name of Mine Test on there to test the FPS. I got it home, booted straight to Debian and Minecraft unexpectedly worked correctly.

It took me a while, but I finally narrowed the pattern down. The performance drop only happened if and only if I first boot to Windows and restart into Linux without shutting down completely.

Even though I didn’t master the problem by solving it completely, it hasn’t come back, so long as I don’t reproduce it on purpose. I’m fine leaving it alone.

And now for my other problem: Debian only successfully boots about half the time. I still don’t know this one. All I can do is lay out everything I know about it and hope someone knows what the deal is because I’ve yet to find a help topic that matches my problem exactly.

It used to be that Debian would boot every other time, but it did have a spell where it booted and failed about six consecutive times each. A few days ago, it’s gone to not booting at all. Whenever it fails, it drops into BusyBox, displaying an ash shell with the prompt (initramfs). It has some basic commands, and I think the general idea is that when the Linux kernel can’t find the files it needs, a knowledgeable operator can manually mount a drive and boot from there.

Now, I’ve mounted drives by hand before. I met someone going by hyperreal who generously spent over an hour and a half of his time on me. We seemingly tried everything to try and get BusyBox to boot. Nothing. We even peeked at the hard drives’ contents from a GRUB boot menu console (Don’t cite me on terminology here!). Everything looked good until BusyBox showed up again.

A lot of it was repetitive. In short, it looked like /root had the contents of my Windows… I may have it. What if GRUB is looking for sda or sdb specifically and they respond in the wrong order? I’ll check into it.

As I was saying before a flicker of hope interrupted me, The Windows drive was mounted to /root and I was able to umount it, but neither drive would mount there. I kept getting an “Invalid argument” error. Maybe the BusyBox mount command is a little different, but it should have worked each time. We tried mounting it from /dev, where devices are listed by an internal shorthand per system, and from a more out of the way place that listed them by UUID. There were four entries, and I suspect the two that didn’t look like hard drives were my mouse and keyboard.

Moving along, I also tried burning a Super GRUB Disk a total of three times. The first two were on my laptop, but they both flopped. I detoured for a while, doing other stuff mentioned above before making a good disk from my desktop.

I still need to mess around with the disk to know exactly what is going on. The working theory has been an unreliable install of GRUB. I have a new idea since writing this, but for now, I have a way to use my computer when I want.

Final Question: Any ideas on this one? I could really use the input, though I should probably get the comments section working some time.

Family Photo Chest Part 4: PyCharm Migration

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am moving PyCharm from Windows to Debian. Let’s get started!

The past month didn’t feel all that fast in terms of this project. I reread a few of my paragraphs from last month, and I get the feeling I didn’t have a clue about what I was looking at.

There are at least a couple reasons why I believe IDE’s are only for when you have an expert handy. They are full of stuff beginning programmers don’t need to be using yet and that stuff can be incredibly fragile. The moment something breaks, progress stops and you need someone familiar with the program to sort things out. If you’re engaging in self-study, working from the command line has fewer things to break and most language tutorials provide command by command instructions anyway. If possible, you should seek out one or more groups to join who can answer programming questions when they come up.

PyCharm was a little fussy to migrate to the new operating system. I made the mistake of just importing everything straight from the configuration on the old install. First of all, all the file paths were written in Windows. I tried routing the interpreter to the one that came with Linux, I had to move the link to my project file around, and I went hunting through the venv settings for references to Windows paths.

The easiest thing to do is to just say no to importing anything on first launch and recustomizing everything. I ended up moving looking into individual files in my settings and plucking out the ones with intrinsic ties to the old install. I had a lot of custom colorization going on, so I sifted through my settings files and plucked out anything with file paths starting with C:\.

Project files were a separate but parallel undertaking. With all the errors I kept getting, I ended up grafting my old project files into a new set of project files. Almost everything copied over, but a hidden .idea folder holds a lot of ties that rely on things not moving. I also had to remove a workspace.xml file or something similar over a reference to the old hard drive. Pycharm brought up a dialogue box to fill in the appropriate information and that angle was solved.

Now, about virtual environments. Implementing them is an important gesture toward seasoned programmers collaborating on projects on different computers, but they complicate things a bit much for the average novice on his or her own. On my windows install, I managed to hack it out of my project, but I never told PyCharm that I didn’t want to use them in a way it could understand. This time, however, I had help addressing the issue.

The IDE is a powerful tool. Powerful tools are okay to pick up and use, but the learning curve can be sharp, and reckless newbies can easily damage something while careful newbies just get slowed down by all the things to research. Supervision like what I used to get in my programming classes or what I’m getting now at Third Workshop is a practical must-have. I don’t always get the answer I’m looking for right away, but stray comments tend to provide seeds to plant in a search engine.

Final Question: Have you ever made a major change and had little cracks you didn’t anticipate?

Minecraft Server Optimization Part 1: G1GC

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am working on my Minecraft server. Let’s get started!

A few months back, my sister put together a server idea she called Creepers ‘n’ Cream. It runs on Vanilla Minecraft, but has a few datapacks that offer us little gameplay changes, like mob and player heads, Elytra drop on a rematch with the dragon, and a tool for rotating some blocks in place. All I know is that she got the idea from Hermitcraft, a well known Minecraft server for YouTubers and streamers. We don’t run all of their packs.

I covered my process to get the server machine ready to host Creepers. it provided me with about six weeks of content, and in the end, I accepted MineOS as a much easier alternative to a practically custom-built Linux distro.

Once I got MineOS behaving with 16 GB of RAM open to it, I set it aside for a while. At one point, it had been running more or less stably for about two weeks without a reset when a couple players showed up unannounced. We had them contained in a house in adventure mode, so they were more or less contained. The server crashed unceremonially by a game tick (normally 1/20 of a second) lasting for a full minute. After a peek into the accounts’ history, it looked like they were hackers.

I don’t remember the second big crash all that well, but a couple weeks ago, it crashed the same way for a third time. I started doing some research, and found several places talking about garbage collection.

For the non-programmer, there’s a part of a program’s memory called the heap. If the heap ever overflows, the program crashes. As the program runs, objects are put into the heap when needed, and when they aren’t useful anymore, the program marks them as garbage. Every so often, a garbage collector comes by and tidies the heap up so it has more room for new objects. This takes time away from the program you want to be running. By default, Java collects all the garbage when the heap is full. Unfortunately for Minecraft, this causes a noticeable lag spike when garbage collection (GC) happens, and the bigger the heap, the longer it has to wait.

A number of posts I found in my research sung the praises of G1GC (Generation 1 Garbage Collection) for use with Minecraft. From what I gathered, G1GC focuses on making sure unused objects don’t clutter your heap for any longer than necessary. By having the collector come by frequently, it can collect in several short bursts too fast to notice at the trade off of taking a little longer overall.

Somewhere, I read a G1GC guide or two that suggested allocating all your RAM to Java when you start the program. Bad advice for default GC. The server was running a lot worse for a week before I reigned the minimum from 15 GB back to 4 GB.

Farther research into this theory led me to a programming Discord. Someone there informed me I almost certainly had a memory leak. On a trip to Third Workshop, I learned that even though two or more programs may be free from memory leaks their collaboration may introduce them.

I eventually switched over to basic G1GC. Where default GC would require daily restarts to remain in peak performance, G1GC kept the server stable for three days until planned maintenance took it offline.

In conclusion, I recommend all Minecraft server operators consider trying G1GC.

Final Question: Have you ever broke something by following poorly understood advice?

Minecraft Server, Week 6: Press Start

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I almost posted one of my backlogged posts, but I managed to pull together something to continue this project one more week. Let’s get started!

I don’t know where to begin on this one. Last week, I left off with reinstall after reinstall, trying to fix some error I kept seeming to get. I gave up after wrecking my bootloader during one last attempt to fix everything, forcing the machine to depend on booting to live media, such as my Puppy Linux CD. I stuck around to determine that Ubuntu wasn’t accidentally nuked alongside Micro Core, so I was at least partially appeased on that front.

Sunday came and I thought I would try one more time. I had done some research on GRUB 2 (GRand Universal Boot Loader). Boot loaders are programs that take charge after the BIOS select a drive to boot to. They are in charge of starting the operating system. GRUB is designed for environments with more than one OS, like the one I seem to have ended up with. It is worth noting that GRUB and GRUB 2 are two different boot loaders that serve the same purpose, they both refer to themselves as GRUB, but some places say you can get in trouble if you use support for one on the other. From what I can tell Arch Linux is one of the few distros that use the first one.

I started up Puppy Linux and suffered while trying to find the terminal. That little distro does not follow many of the conventions I’m used to as is! Bad dog! I researched how to repair GRUB and when I looked in my MineOS drive, I found… what looked like a fully functional boot loader.

Annoyed, I told the BIOS to boot to the old SSD before the HDD with the bricked GRUB install. It worded. I was able to boot to MineOS, but I still got a corrupt terminal pseudo-window interface: the configuration console. Sometime after I seemingly bricked my machine, I had the thought that I might not have really had an error to fix all along. I was hoping everything was just one unknown away, and that was it.

MineOS is fairly minimal on the host machine. It really shines in its Web Interface. You connect to its IP with https at port 8443 and sign in using the account you set up during your first boot. I tried that and got a page that got stuck loading. Different computers didn’t help either. I gave up and resolved to put the finishing touches on a stand-alone post I have written after pinging my contact with a picture of the error message and corrupt-looking screen I was having trouble with.

Hours passed, and I eventually got a celebratory reply of all things. I decided to humor him with one last attempt on connecting to the previously tried IP and port. It worked. I seemingly didn’t do anything differently, but it worked on me. I went over to the other towers I had previously tried it on, and it worked on those. It did not, however, like Android Firefox on my tablet, but the browser built into LastPass was accepted.

About this time, I investigated one of the features of MineOS inherits from its parent distribution, Turnkey Linux: Let’s Encrypt. Let’s Encrypt seems to be a free SSL certificate authority, if I got my terms all correct. If you already know what you’re doing or are following a set of instructions and don’t care about learning, you can reportedly have one within ten minutes. The only issue for me was that the application script gave me a bit of a head scratcher. It wanted a domain, and I didn’t know what to put. In the end, I figured I wouldn’t be exposing the login port to the Internet anyway, so I can wait on setting that up.

The web interface itself is well polished. I still don’t know what all I am looking at, but it is a whole lot easier to behold than a command line. Exploration is also much easier. I set up a test server, trying to get something going on a port other than 25565, the default Minecraft port, but some diagnostics and research later, and it looks like part of the Web Interface’s design principals exclude it from being able to open additional ports, mainly that not all operating systems it can possibly be installed on keep track of open ports the same way. I suppose that keeps the dabblers contained in a field of relative protection, leaving advanced use to more seasoned computer users.

I moved my test server to the default port and had a volunteer try again. It worked, and this time when I expected it to work.

MineOS has an import feature that’s supposed to be fairly smart when it comes to importing archived servers. .ZIP files were confirmed, but I wanted to feed it a tarball and see what would happen.

I took the server of interest offline and –very important– made a copy separate to any backups I may have had. I then started weeding out things that wouldn’t make it over to MineOS, such as the WorldBackups folder, the start script and its backup, and copies of the datapacks we are running. The tarball came out to 1.9GB.

Transportation was a hassle. I didn’t have the patience to set up SSH correctly, so it gave me a warning if I tried to copy. The old host machine, my father’s computer running Linux Mint, didn’t have an SSH server on by default, so I couldn’t grab it from the new server. I tried my 1TB external drive, but when I finally got it mounted, it was read only, likely because of the way it was formatted. Two additional USB sticks were too small, but I could get it onto an external hard disk drive we have around with plenty of room.

Issues persisted. The MineOS terminal did not want to mount my storage device, and when it did, it wasn’t polite about where it put it. I still don’t know where it was hidden, but one search did turn something up I know for a fact was on the external HDD. For a few actions, like mounting/umounting or listing the contents of some directories, I required root access, but sudo doesn’t look to be a thing here. I used the su (substitute user) command to switch to root, something that should never be done lightly. I even tried booting to Ubuntu and manually copying the .tar.gz file over, but I had some kind of error I have no clue how to address.

In a frustrated fit of doubt, I suggested I may just move the hard drive over to my father’s machine and copy it over to the import directory manually. It actually sounded worth a shot, so I did it. It worked.

I booted the server machine and found a file all ready to import. I set it up, and had a volunteer log in to a brand new world– It was supposed to be the preexisting world. I ended up moving the drive back over to my father’s computer only to discover that it had basically unpacked my improperly compressed tarball and stuck a new server at the root.

I was not pleased. I manually moved the different elements over to the new hard drive and saved each piece. Not all parts had counterparts. I kept the MineOS exclusive files intact, while grafting in the original server’s files. The World file was spelled world (lower case w), but the hardest element was the properties file. For that one, I actually had to evaluate it line-by-line.

Finally, after six weeks worth of work, I had the server on its own dedicated server. I started it back up, and had my volunteers examine the world. So far, all systems appear normal. I plan on keeping on its original Minecraft version for at least a day and I want to make a restore point or backup or whatever they call it. I just need to learn the MineOS Web Interface.

I learned a lot in this project. If it weren’t for this blog, I would likely have given up long ago and just hosted it from my own machine. If it weren’t for my time in MicroOS, the last push I made could have easily have taken two or three more weeks. I’m glad it’s over in time for New Year. And now, I present the newest member of my little computer family: ButtonMash!

Final Question: There are a few details left to polish, but I do not plan on covering them. Do you want me to change my mind?