linux

Full Migration from Windows to Linux – Report #5 Long-term Madness

It’s been a while, in fact I had a whole post ready for “1 year on Linux full-time”… Yeah it’s now past 2 years, I dropped the ball on that one and just let it roll under the couch.

I’ve been soaking in as much Linuxy related info as possible in these past 2 years.

https://www.fosshub.com A nice list of software that I looked at a couple times but haven’t really looked at recently.

https://linuxjourney.com A website to help you learn about operating Linux in handy lessons.

https://play.google.com/store/apps/details?id=com.enki.insights is an app on my phone where you do daily questions and challenges related to Linux and/or Bash, this has helped with a lot of nit picky details on navigating around when the desktop freezes/crashes.

https://github.com/zfsonlinux/zfs/wiki/faq I’m using ZFS for my local file server so this was my main jumping platform on what to do or fix.

https://www.pantz.org/software/cron/croninfo.html there was a strange amount of times I had to fiddle with cronjobs

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/index This is when things started getting out of hand…

Alright so why so many links? Well Linux can get pretty deep. And found myself in it's deepest parts, looking and reading at things that I genuinely find interesting but rather than casually filing it away for reference later, I found myself studying quite a lot of it.

I’ve always enjoyed reading technical manuals. When I used to work at a TV station I spent time during lunch reading the manual to the Chyron from front to back twice over. Now it wasn’t in my job description to do anything other than type in names and locations on the lower thirds. This TV station was super scrappy and under staffed so everyone had least 2 jobs. Also I had a really good boss, I’ve proved to him that fixing things is something I’m good at and enjoy quite a bit.

s-l16002.jpg

Other than killing the mini-fridge, screwed that one up real good.

This Chyron is super old and running on an old platter drive that has it’s own spot on the rack; Old, large and slow. Typing on this beast took forever, luckily it had enough memory to queue up all of my key strokes and then be able to walk away and come back 10 real world minutes later to see it just finish.

This was just the terminal input. It had 3 screens and the Chyron itself was on a rack.

This was just the terminal input. It had 3 screens and the Chyron itself was on a rack.

Now for the most part this wasn’t a huge problem but this was a live news broadcast and there was often times when a name, place or correction had to happen on my AUX screen (the display that didn’t show live) and often times the Chyron would take to long to fill in the letters, by the time it was done the next segment was already showing and it was much to late.

So after reading this manual and knowing how platter drives read data faster closer to the center, I completely reformatted the disk uploaded the most important data first. The Chyron even had a function to reserve physical block space depending on what number I FTP to it so I sent super large images towards the middle of the platter.

Now it wasn’t screaming faster but oh boy did it run way smoother than before and I was able to make live on air corrections in time.

Wait, what part of this is about Linux?

My point to this is that I’m aware that once I want to learn everything about something I will typically make it happen. I’m the sort of mad man to take a month of my free time to learn how something works.

However this approach with Linux has really hurt my creative output, there is always something more to discover with the Linux stack, to the point where you could simply scroll through the entire source code to every program running on the very computer you’re using at that point in time.

A good week was spent looking at and figuring out a way to become RHEL certified, why? Just wanted to and maybe something for the future but honestly I wasn’t going to be a sysadmin or even anything close to that.

At that point in time it finally hit me that I’ve been desperately trying to play catch up at a rapid pace. I used to fix up Windows computers and my know-how of Windows was good, where compared to Linux was just next to nothing.

It took some restraint but I took a step back and saw that everything running (RSS feeds, Podcasts, Youtube, Twitter, Ect.) was delivering me something Linux related, be it news or some reference blog. First thing I did was removed the (Five) Telegram rooms that were Linux related (wasn’t even using them anyway!), Telegram is back to just a messaging program with my friends and family. Not going to bog you down with every little program I went through to trim the excess but it was every where to the point of overwhelming distraction.

Which shows, as I haven’t posted much of anything in the entire year of 2017.

Now here is the (maybe) useful part for everyone else; Things I’ve learned.

Discovery

Linux distros are all very similar, as in practically exactly the same, it all comes down to how packages are delivered, what pre-loaded software or extras are included (such as SELinux) and what Desktop Enviroment you like.

Discovering how you like these things is the more time demanding detail than anything else. What I did to try out desktops was just install all the well maintained DE’s, log out, switch to whichever one and give it a whirl for a week or so. They all had something to them that was enjoyable and as someone used to the Windows world I'd recommend MATE or Cinnamon.

GPUs

Nvidia proprietary drivers… Well I could rant on about this forever- short version: Pain in the ass.

If you’re using Ubuntu or a flavor of it, just make your life easy and load in this ppa

ppa:graphics-drivers/ppa

If you use some other distribution find some 3rd party maintained repo to plug in (RPM Fusion for Fedora in example)

Then finally add nomodeset to your grub file, this is just needed anywhere you go no matter what distro.

I think thats the shortest most informative way to installing Nvidia drivers I can get. Manually installing the drivers are there on Nvidia’s site, you can even load in beta ones. I wouldn’t waste time on it unless you had a reason to do so.

As for AMD GPU users I’m afraid I know very little other than from what I’ve heard using the open source drivers these days is fairly smooth sailing if you have a semi-new card.

Software Locations

Be aware the repo that a distribution runs on is not the only place to get software from, there are things like Flatpak, Snap, AppImages, PPAs for Ubuntu based, .run files, tar.gz files or even build from source. I've personally come to dislike it when software is packaged in a DEB or RPM, as a desktop user I don't really see the advantage to doing this. Even had .deb files made for the version of what I was running and had it fail to run.

And now that I’ve learned how to build from source, discovered all the locations for keeping the software I use up to date, how to navigate using the terminal and over saturated my brain with sysadmin commands… It’s time to change just about all of that and stash it away.

Where to now?

For over almost 2 years I’ve stuck to using just Linux Mint, I figured if I stick to one distro there will be less time spent on reinstalling or learning a different layout. That worked for the most part. Everyday normal users I don’t imagine will have the nit picky details I do. There is a lot of software in my day to day, from photography, digital art of 2D and 3D, music production or some other odd ball thing that I just enjoy making. A lot of this stuff is just hobby projects and hardly any of it sees the light of day, or rather the black hole of the internet.

I found myself spending a lot of time looking at what is the best way to keep software up to date whether that be an AppImage, PPA, Flatpak, Snap or tar.gz.

One of the strange obstacles with Linux distributions is either having super bleeding up to date software or something that is months old, even if that distro version just came out.

For the most part I had about 17 or so PPAs loaded in, this isn’t exactly terrible but it did cause problems and even had to go in to directly tell apt-get to download the same library from both the offical repo and the ppa repo then make symlinks so the software I was using could function with it’s new version but keep the rest of the system in line for the other software could run as well. Fun...

Flatpak and Snap programs each have a different home folder. For example the .gimp-2.8 folder was in different places for each one. Little things like this drive me nuts, I understand it’s to keep things from conflicting but I can’t put up with it. Oh and some appimages did this too, just to rub it in.

With all this ranting I can hear it now, ARCH!1!!

I did look at Arch Linux a few times, now I like cutting edge but not bleeding edge. Also with the amount of software I load in, conflicts are just going to happen.
Even considered running on Debian sid, but same thing as Arch, just the newest bleeding edge builds.

Now that I’m reading this over, it wasn’t the agony I’m quite describing above, it’s just lots of little things I was putting up with that rubbed me the wrong way. Was willing to make it work, to put the effort into it. The alternative was Windows 10 or OSX (who am I kidding, only Windows). Just in retrospective thinking about it is really annoying.

Something new that works for me

One late night reading through r/Thinkpad I came across a couple of posts involving the Carbon X1, in each one it was either the poster or in the comments about how Solus Project worked great for their shinny new Thinkpad.

Found myself the next day backing up my laptop home folder and sticking Solus on it to fiddle around. Color me impressed. I’ve heard other people remark on how it’s a great distribution but really, if you look around that is said about every distro. Even Arch <3

Just going to summarize what important bits Solus does for me.

The repo has software that is the newest stable release, this one is a huge for me.

The repo has software loaded in that doesn't have to abide by a guide line of some sort of strict open source license. Along with every single bit of software I use that is open source.

Newest stable Nvidia drivers in the box, it's just there. Also does the nomodeset thing for you.

Steam Linux Integration. It handles a lot of pesky problems with loading in games, such as having it load on the wrong monitor. This just isn't a problem any more. Along with other snags with older unity engine titles, gone.

Lastly

These reports originally were intended to help Windows users that are fed up with the ecosystem Microsoft has been shifting towards. Give that person some perspective about how this Linux stuff works. I'm not entirely sure that I've achieved that here, perhaps this will help someone out there?
Honestly the best advice I can give is, download a Linux distribution, make a bootable USB drive and install it (make a backup of your other drive first). After that just simply use it. Everything I mention above makes it sound like you have to learn so much but that's just how I tick when it comes to new things.

Naturally the question "Which distro?" will come around, so I'll just say it here; Solus Project. It's what I'm currently using.

This past 2 years has been a very dense amount of learning and even burned myself out on it, however overall, I’m still glad I did it.

Now to worry less and enjoy working on more creative projects.

Minecraft server at home

In this helpful guide I'm going to go through what I did to make a self-contained Minecraft server at home on the cheap and also keep it low power but can still run 2 or 3 separate worlds at once (depending on the amount of players)

The main thing that bought all of this together is MineOS Turnkey. This linux distribution of Turnkey is ready to deploy with a webGUI for both Minecraft and the OS itself so you won't have to struggle with staring at a terminal all of the time (but you will have to use it sometimes). You'll more than likely be going with the 64-bit version depending on your hardware and speaking of hardware.

Parts!

ASUS Mini ITX AM1I-A
AMD Athlon 5350 APU
Kingston HyperX FURY 8GB Kit (2x4GB) 1600MHz DDR3 CL10 DIMM - Black (HX316C10FBK2/8)
Sentey Mini ITX Ss5-2514 Computer Case

All of this so far brought me up to $222 but I didn't mention a disk drive, you can use really anything but I used a Crucial 128GB M4 SSD for the low noise and low power, though honestly you don't even need 128GB so if you can pick up a cheaper 64GB. With the 128GB SSD in mind everything came together for about $300 total. A HDD with work just fine if you're looking to go as cheap as possible.

On a final note you will need a USB thumb drive to create the boot stick. And an external monitor & keyboard for the very first install. Also I'd recommend getting a Uninterruptible power supply if you plan on leaving this on for other players for long periods of time. As this is so low power even the cheapest one will give you a safety net to power outages and brown outs.

Hardware setup

As this build is straight forward there isn't really anything to point out other than to put it all together and if you've ordered different parts you'll have to go on your own anyway, but here are some photos.

The front of the case. An internal 3.5-inch SATA drive for size comparison. I also printed the IP number on the case with a label maker.

The front of the case. An internal 3.5-inch SATA drive for size comparison. I also printed the IP number on the case with a label maker.

Power and Ethernet, in the end that's all the system needs to run as a server.

Power and Ethernet, in the end that's all the system needs to run as a server.

Cords are easy to keep out of the way, there is hardly anything in here!

Cords are easy to keep out of the way, there is hardly anything in here!

OS Setup

Everything is together and now you're ready to get MineOS on here. Note that you will need a monitor and keyboard for the initial setup.
First part is to download the ISO, head on over to minecraft.codeemo.com and download the  version you need (likely 64 bit). While you're downloading grab Rufus, this is the bit of software I use to make bootable ISOs.

Once your download is done stick in your USB thumb drive and open up Rufus, from here all you have to do is make sure the drive letter is the same as the USB thumb drive and then click the CD image icon to open a window to find the ISO, load it up and hit start!

Once it's done safely remove the thumb drive and plug it into your soon to be stand alone minecraft server. When booting make sure the first bootable device is the USB thumb drive.
Go through all the steps of the install.

As this is a standalone server guided install with LVM is your bet option.

This is just confirming which disk to install to, and LVM is good to have for future changes.

This is tell you about what percentage of the HDD you can use, just hit ok.

90% is what it gives you by default and I use that just in case something happens and there needs to be something installed in that 10%.

This is the guided installers final report, if you are using a single disk drive bets are good it did everything perfectly. Hit yes.

This window is asking if it should install GRUB and yes you should.

Restart away and remove the USB thumb drive.

This is GRUB giving you options but it will auto start with the default selection in a few seconds.

Make a password for the root account, make a good one.

Make a password for the m account, this is for editing the minecraft servers, it should be different from the root password.

TurnKey Linux comes with a build in backup function called tklbam, you won't really need this so go ahead and skip it (sorry I'm highlighting apply here, just ignore that)

MineOS14.png

Install the updates!

Here is the final screen of the OS, write down all the IP numbers and their names you see above TKLBAM, you'll need this for later.

Firewall/Router setup

One thing I highly recommend to do within your router is to reserve an IP address for your server so you won't have to keep hunting down a new IP just in case your router needs to be restarted (or power loss).
You'll need to be able to make changes to your router, if you know the IP to that then you can skip this next bit. If you don't know your router IP, an easy way to check it on windows is to hit the windows key, then type on the keyboard:
cmd
Hit enter and a command prompt should come up, type in:
ipconfig
Hit enter and a list of numbers will show up, look for Default Gateway, this should be your router. For example the router is 192.168.1.1 (most common home routers use this), now go into your browser and type in the address of 192.168.1.1. At this point a dialog will ask for user name and password, if you haven't setup anything in your router it's a good bet that the user name will be admin and password could be either admin, 12345 or password. If you're having a hard time getting into your router go to the manufactures website and find a manual.
If you only have a modem from your ISP then there is a good chance it won't have more than one ethernet port anyway so you'll need a router.

Once in your router then look for DHCP Reservation list, here I can't really guide you as each router is always different but what you're doing is locking in the IP address with the MAC address of the server.

If you don't know the MAC address of your server check the box the motherboard came in, if it's not listed anywhere we will get the MAC address here in a bit.

If you never plan to let anyone access your server via the net you can ignore this part and head on to Minecraft setup.

To get payers from the net to access your local server you'll need to forward a port in your router so it knows internet traffic can directly look at the minecraft server. This is going to be different from router to router so I'll just direct you to PortForward.com about Minecraft. 25565 is the default port for the server but you'll have to open another port if you have more than one server.
If you plan on having another minecraft server you'll have to mess with the Iptables, here is the direct link to the page about how to do that.
http://minecraft.codeemo.com/mineoswiki/index.php?title=Iptables

Minecraft Setup

Nothing on fire yet? Good!

We first need to update the WebUI so it knows about the newest minecraft server version. Get the number listed as Web Shell from the server and direct your browser there, an example being

https://192.168.1.7:12320

Your browser might complain about it not being a safe site but you're safe to keep going, it's just using https without a proper certificate. Once there you'll be greeted with a black screen and the prompt "core login" type in root and then enter, then type in your password, enter

You should be logged in as root, now type in the following with every new line being an enter key stroke.

cd /usr/games/minecraft

git fetch

git merge origin/master

It should show something as it does below in the screenshot.

While we are here, type in ifconfig then enter. Look for eth0 and then the HWaddr listed to it, that is the MAC address if you were having problems finding it.

Now direct your browser to the MineOS Web-Ui address, example being

https://192.168.1.7:8080

Again the browser will warn you about it being insecure but you're fine. Enter mc as the user name and then your password and sign in. From here click Manage Profiles.

Click "Create Stock Profile" right now the most current is 1.8.4 but it could be newer for you.

It has made a listing for the 1.8.4 stock profile but it's now downloaded yet, hit the green update button and wait a moment (can take a bit if the hosting server is bogged).

Now lets make a minecraft server, click Create New Server. Give it a name and leave ownership to mc, click next.

I would reccomend entering in something in level-name as it helps in case you need to recover backups from the disk. level-seed is optional but if you know of a seed ahead of time here is your one and only chance. Everything else here is up to you, only thing to note is that if you're making more than one server running at a time give the server-port a different number (25566 for the second server, 25567 for the third, ect.)

Make sure the profile is the one newest one.
Both java_xmx and java_xms should be changed to something larger. To figure out how much, know ahead of time how many servers you're going to have. Lets say two and you have 8GB of ram remove 512MB for system stuff and then split that per server, so you'd have 3744MB of RAM to spare for the two servers and put the same number in both xmx and xms.
Enable Archive and Backup interval, I'm never that busy on the server so I only do 24hr but you can make it shorter.
Enable Start Server on Boot!

mcserversetup6.png

From here you can click each server and look at their settings and real-time log of what is going on. Go ahead and start your new server and log into it!

As you might of noticed my servers are still 1.8.3 and as time goes on I'll need to update the servers, this is really easy. Just do the same thing from when you logged into the Web Shell (https://192.168.1.7:12320) with the black screen and redo the three commands:

cd /usr/games/minecraft
git fetch
git merge origin/master

If you've had any windows/tabs open with the Web-UI close them and log back into it so it can refresh the changes. Click on Manage Profiles and click Create Stock Profile, select the newest version then the update button.
Click on the dashboard and select the name of the server you want to update and a new selection on the left should show up, click on server.config, it will be the first dialog box and in my case I'm rename it from vanilla183 to vanilla184 then hit enter. All done the server is now running the latest version of minecraft!
If you run into any problems trying to git fetch go here:
http://minecraft.codeemo.com/mineoswiki/index.php?title=Updating_the_Webui


This is about the only thing you'll have to manually do, other than that linux will keep itself up to date and the servers will back up (if you've told them too).

Power Consumption

Powering up it spikes at 35 to 40 watts but once it's done things settle to 25 watts even with people playing on it. Planning on leaving it on 24/7? Well here are some numbers for you its kWh of a day is 0.6 and the kWh year is 219.
To put that into a perspective a 60 watt incandescent light bulb kWh of a day is 1.44 and the kWh year 525.6.

I have my server on a UPS, again optional but if you know you're area is prone to black outs/brown outs I'd say it's worth getting one.

Hope this was all helpful, let me know if there is any glaring errors to fix.