Monday 30 July 2018

General update

Since last time I have been doing a lot of setup stuff with various computers.

Win10PC is gradually getting set up, the only stuff I really need it for is a handful of things like downloading gigabytes of maps or whatever, scanning, ripping DVDs and bulk Irfanview stuff so it isn't moving along very fast but it is what will get used when I want to view charts with the keyboard as the screen is set up vertically for that, and having VNC running on it means I can do just about everything from over here at my desk without having to change seats. At the moment I still have to get the scanner and printer hooked up to it (well probably only the scanner because the printer can go onto mainpc). Unfortunately the storage spaces thingy doesn't actually work the way the RAID mirroring used to work (it only works with full disks, not partitions) so RAID won't be possible but I can move the home drive to the second disk and that is how I will set it up. There won't actually be anything on it that matters anyhow because of the limited tasks it is used for.

serverpc is going very well after getting its disk capacity boosted last week as I had to restore the home volume after backing it up as that was the easiest way to restore it without having to leave one of the old disks inside it, putting the backup disk into the removable drive bay is easier. I took the opportunity to dump all the config files especially as some of them didn't get backed up properly and wouldn't restore, which hasn't really been a big problem for restoring. The main task at the moment is to get all the backups of the other computers working again as with the reinstallations they all need stuff put back on them to make the backups over the network function correctly.

mediapc has also been reinstalled. I had put Xubuntu on it because it has better stuff for working with phones and things, but the biggest issue is with Cosmic, maybe because it is a beta or maybe not, that I just could not get it to hibernate. In the past it didn't matter if it could hibernate or not, but with the different uses I am putting this computer to, I need to be able to save the session and come back to it. On Ubuntu hibernation is disabled by default and even when it was supposedly enabled and the hibernate button was present and did something when you clicked it, the computer was actually turning off instead of hibernating. So I decided the simple answer was to put Debian 9.5 on it, but I failed to notice that the second screen would turn itself off (just a little side effect of having a TV as a screen and it has a no signal turnoff timer that can't be disabled) and then the logon greeter (the Linux name for the logon screen, which in MS parlance is called the Winlogon) tried to come up on the TV because it was still detectable (soft off and hard off are different because in soft off the display can still be detected). So after a lot of installation attempts that were seemly failing I just moved the mouse accidentally at the end of yet another attempt and the mouse comes back onto the active display and there is the greeter. So I was able to install 9.5 out of the box after all. I configured the spare SSD partitition as /tmp and lost some stuff I had downloaded onto it, but I will be able to download that stuff again.

bedroompc is working well with the network cable in place to be used for VNC and other non-internet networking (so grsync can run real fast) so that it can work well for internet connectivity via a tethered phone when the normal internet I have is off. I have used it quite a lot for this purpose, but still have a lot of data left at the the moment.

pc4 (for want of a better name) has Buster Alpha 3 running on it and I synced down the entire copy of my media library from bedroompc while I was reinstalling mediapc, this happened very fast over the cable. So I played media on it while I was working on mediapc with the various install issues that had that meant what should have been a simple install took about three days to complete.

And of course mainpc just toodled along like usual but I am still finishing off setup having reinstalled it not so long ago. I will set up the spare SSD partition as /tmp on both this computer and serverpc. So that's coming to the end of the productive window of today, when I will soon break for tea and then move onto other things for the evening. 

Monday 23 July 2018

Windows sucks part 139 [2]

So I am changing my Windows 10 box from being inside a desktop chassis into the Antec Mini-ITX chassis with a Gigabyte GA-E350 WIN8 mainboard and as I have no real need of this computer chassis for any other purpose for the foreseeable future this is going back to being what the Windows 10 computer is going to run in, as it was some months ago. The location where it is at is about two metres from the scanner but that is the only device that will need a longer cable and there are not going to be any issues running the scanner's cable or any other cables. As is currently the case the computer will have its own speakers and screen. At present that desktop chassis, which is a mini tower Inwin chassis (smaller than the other three computers on this desk which have Inwin mid tower chassis), will remain connected to the two KVMs and therefore the two main keyboards and mice that I have on my dual stacked keyboard slides under the desk, but the Antec will not be connected to these KVMs, which means it will have its own independent keyboard and mouse, and instead it will be remote controlled using TightVNC server on the Windows 10 computer and Remmina on mainpc as the VNC client. VNC is needed because MS has omitted Remote Desktop from Windows 10 home edition. I have discovered that VNC can be connected as soon as Windows 10 is up to the lock screen so I can log the computer in remotely and there is almost no need to actually sit physically in front of the computer at all.

Another configuration issue is whether I can use a RAID-1 array in the Windows 10 Home computer as I have used in the past when Enterprise or Pro was the operating system of choice. It turns out the old mirrored option in Disk Management has been deprecated in Home edition, but is still available in Pro or Ent. However, MS is migrating to Storage Spaces to achieve the same thing as the mirrored option, and Storage Spaces is available on Home edition. Essentially I will create a 128 GB system partition onto one of the disks and the rest of the disk will be available for the storage pool. The second disk will also be in the storage pool and they will be mirrored. The existing home folder path will be moved into the storage pool by using a NTFS junction on the system volume in my profile path. This is basically the only supported way that you can move your home drive to another partition or disk because MS still won't support changing the registry key path that points to C:\Users. It is a limitation that you end up having to put in a junction for every user but is OK where there is only one user on the computer.

I looked back at my notes and saw I moved the Windows 10 computer last November or about 8 months ago from the mini tower to the Antec and then only five months ago I moved it from the Antec to the mini tower and now it goes back to the Antec which I have no further use for in the foreseeable future. I did enjoy building that Antec as a mini ITX chassis and did seriously look into upgrading it with a new Asrock board. However the only type of board that would be worthwhile is one that has a built in CPU because they are optimised for very low power and for various reasons the NUC won out as the preferred option and I got one of them instead. I have two of these Gigabyte E350 boards in case the one in the Antec chassis blows up so I can keep using the Windows computer with them. Many mini ITX boards these days are just small ATX boards that use a lot of power and aren't suitable for the likes of the Antec chassis which has only a 90 watt power supply so the upgrade route is one I have decided not to follow. Neither do I now have any need of any type of portable computer or server that I could use the Antec for so I am just sticking it with this Windows 10 home computer. 

Last time I changed formats I was able to use CloneZilla to move the Windows 10 installation between disks, unfortunately that was not possible this time. Although I have changed the Windows 10 computer 3 times, the first time I changed from Windows 10 enterprise on a no-longer-valid volume license to Windows 10 home and the second time I used Clonezilla to move the disk. This third time Clonezilla was not only unable to move the disk to another physical disk, it also somehow corrupted the existing disk so that it would not even boot and the main data partition was unreadable. It did not matter as there was no data on it that needed to be backed up so it just means a little more work setting it up from scratch. But that in itself is not much as I do not need to reinstall the camera download software, really it is just some multimedia software and the scanner software that I have to put back on it.

I wrote recently about the Vodem problems and how I would overcome them. Using the wireless bridge over a network cable has worked successfully but the issue is it will work on the whole of my network and I want to be able to limit to just one computer at a time to control how much data is going to be sucked off the cellular connection. So the alternative option is to add a wireless capability to one of the desktops to enable it to be used with the tethered phone or I can use the NUC with its built in wireless, but the NUC will need to have a cable connected to it so that I can remote to it with VNC at the same time as it is connecting to the phone.

I have completed moving things around and plugging things back in and now it is just the job of finishing the setup of everything and some of this is happening around other changes in the home environment so that is how things are going together at present.

Saturday 21 July 2018

Windows sucks part 139

Well I have written numerous times about how bad Windows is but Microsoft just keeps on proving me correct over and over. Windows 10 is probably the worst version of Windows ever released, and that's even without taking into account MS trying to force everyone to convert to it. I didn't get my edition of Windows 10 as a free upgrade, I purchased a retail edition and paid full price for it (well, a discounted wholesale price but still fully valid). And it's just so so obvious how MS has turned it into a big advertising and money grabbing platform and that is a huge shift from Windows 7 and even 8/8.1.

Now while Linux has its moments and is not totally perfect, compared to what MS has done with a huge paid team, the Linux community with its completely open source development process and hundreds or thousands of unpaid volumteers and a handful of paid developers has moved many mountains to produce something that in my view is every bit as good as Windows, in fact for many uses better, and all completely free of charge. And that is why it is the case that pretty soon, all four computers on my desk will be running Linux.

In the last year or so I went from having a brand new computer with 8 GB of RAM dedicated to Windows 10, to having the Antec E350 dedicated to Windows 10, to another desktop chassis with an E350 motherboard dedicated to Windows 10, and now Win10PC is about to go back onto that Antec E350  again and it will be the 5th computer and the only one that is not connected to the KVMs and actually sitting on this desk because I can remote control it via VNC from mainpc. So the computer will soon be off to one side and mounted under the side table that the musical keyboard sits on. It will still be used for a few things like software that I can't be bothered trying to replace at the moment like Irfanview that is hard to run under WINE. 

But we are getting so so so close to the point now that I could almost run Windows in a virtual machine because all of the hardware reasons I needed a Windows computer have largely fallen by the wayside.The single issue that has most torpedoed my faith in Windows 10 in the last few months has been over USB connection issues. I have several digital cameras and phones that I try to connect to the Windows 10 computer to upload music or download photos. The problem with downloading in particular is endless and nonsensical interruptions and error messages that we just never used to see in Windows 7. So the latest indignity was trying to download photos from my Galaxy J2 and the messages about data being in the wrong format or the device attached to the system has stopped functioning and so forth. When it was my EOS M100 camera it woud keep interrupting downloads especially large videos that would never complete, they would stop after 5 minutes.

If I plug these devices into mainpc I can get the stuff straight off them, not only is it a lot faster to download but there are no silly errors. There is still however one puzzle that is the Nexus 5X that I have not been able to get to connect to anything however. About the best I can possibly hope for is that it might be possible to download a few files at a time using Bluetooth. So that is where I stand at the moment with the Windows 10 computer, that its boot disk will soon be ghosted back onto the Antec with its laptop hard drives and become something that really only gets switched on quite occasionally.

At the same time as having all this trouble with the Windows box I have been having a lot of trouble with my Vodem, which has been a backup device I have used during internet outages and at times when I needed to work around the filtering on the internet connection I have. Working around isn't something I actually do a lot of and normally it is only happening when I need to use FTP as its port is blocked by filtering. The only time I use FTP these days is to maintain the NZ Rail Maps website at nzrailmaps.nz, which has an update backlog at present but is a low maintenance site in general. The vodem has basically stopped working properly. I don't know why this is but when I took the SIM out of it and put that SIM into a spare phone there was no limitation on internet access. I have concluded therefore for being able to use this as a backup internet connection which is hopefully not too often but as I have a large data allowance on my mobile plan, is not too much of a struggle for occasional use. This will have to be achieved by tethering to the phone that has the SIM in it, and in practice either I use a plug in wireless adapter on a computer or a wireless bridge to connect to this new wireless network. Linux has this great advantage over Windows that there won't be heaps of things running in the background that will suck up all your data when running on a metered connection that in this case looks like just another wireless network.

Thursday 19 July 2018

NFS on Linux

When it comes to file sharing on Linux, you have two main choices. NFS is the one that is intrinsic to Unix environments, that have been carried down into Linux by convention. It has been around for a long time and is quite stable and reliable. Since the development of Samba, you also have SMB as an option both for Windows and Linux clients. I have used Samba quite a lot because I still have one Windows client in my network, but I am interested in experimenting with NFS because I have seen some issues on my Linux desktops with Samba and I want to know if NFS is more reliable.

So I will try to sum up the process of installing NFS and making it work on a Debian 9 system. As with Samba, mainpc will be both a client and a server for NFS, sharing the maps share.

There is a guide on the Debian wiki which I accessed here:
I also referenced this guide on the HowToForge website:
Here is another site I also read:
So the first step is to install the NFS server (kernel mode version)
apt install nfs-kernel-server

Note that you may see errors about the nfs-server services. This seems to be a common issue with systemd. I checked with systemctl and found that nfs-server.service had the status code active (exited). This seems to be indicating there were no issues with this as a service. However, the (exited) bit means the service is not running at present because it is not fully configured, mainly there are no exports (another name for shares) set up. When you have fully configured it, then restarting the service is necessary to get the exports available for clients to connect to.

The next step is to install the rpcbind package (this replaces portmap which may be referred to in older documentation). In my case this was already installed as part of the install of the server package.

I didn't initially config rpcbind to anything even though the instructions for portmap specify some configuration settings for it. 

I also installed the client on another computer and created a mount point for mounting the maps share to. This re-used /mnt/share/mainpc/maps because this is the common network access path for software, even though this one has been used for Samba, I need to keep it as a common path for file access from Qgis. Therefore I edited the fstab to remove the Samba mount using this same location. To install the nfs client you just need this command:
apt install nfs-client

Next is to set up the exports on the server, by using nano to edit the exports file. To allow my local subnet to access the maps share on the NFS server I need this line in the file:
/home/xxx/yyy 192.168.1.0/24(rw,sync)
Note there is not a space between the IP address specification and the options in brackets.

After entering that I need to run a command called exportfs to refresh the exports. 
exportfs -a

On the client the entry in /etc/fstab looks like
192.168.x.y:home/xxx/yyy /mnt/share/mainpc/maps    nfs    defaults     0    0

In this case I did a manual mount first, then on finding it has worked, I used mount-a to test further. This also worked.

The main restriction I have noted at the moment is in creating directories and files at the root of the share. There may well be some sort of configuration option I need to set up to allow this because there hasn't been a problem up until now with this option. However, it's not a deal breaker. At the moment there is no problem at all caused by this issue.

The main issue has been with virtualbox VM clients that are using different IP address ranges by default and have to be configured to use the same IP address range so the server will allow client connections from the virtual machines. I could either address this by allowing extra address ranges in the server, or, as I chose to do, configuring the virtual machines to use a bridged adapter instead of a NAT adapter, so that it gets an address from the DHCP server in my network and is in the right address range.

This was going to be a multipart series but it hasn't turned that way, because NFS just works, and there have been no issues. Obviously there is no password by default, but that isn't an issue on my network.

Monday 16 July 2018

Computing resources optimisation [1C]

Since last considering this issue it has been decided to stick with just four computers on the desk. Email and some web browsing can be continued on mainpc as long as there is not too much memory used. Some of the browser stuff will get moved to mediapc as well as image viewing for maps. But I also plan to keep mediapc as the media player and it will have two 32" screens to perform both functions to its best ability. And there will be no need for the fifth computer whether it's a Pi or Antec or whatever because the extra keyboard is hard to use for a 5th computer.

What will be done is to optimise disk use so serverpc gets some disk space freed up to deal with the problems of it constantly running out of disk space.

serverpc has also got its one and only screen rotated to portrait view and although the window space usage is not quite so efficient, the arrangement is very good. Windows 10 pc also has its screen in portrait view.

The satellite TV receiver now plays back on a spare computer screen rather than a TV as I don't watch so much TV now, live streams are more my thing and so mediapc has the TV as its primary playback screen.

Due to some issues with the shared internet feed which I have access to here, I had a look at a cheap 4G wireless broadband plan. Both Vodafone and Skinny have these plans, which typically cost around $1/GB (cheapest around $39/month) and have virtually no setup or joining fees as effectively you just put the modem somewhere it can get a good signal, plug it in and go. However there is currently not 4G coverage available near home at the moment so that isn't presently achievable. It is a much cheaper option than casual cellular data which costs $20/GB at present.

The Antec is going to be used to test new distros as a media player (syncing off mediapc) as there is enough disk space for its RAID array to have all mediapc's media share full synced and I will be putting Lubuntu Cosmic onto it today for testing.

Mediapc is getting reinstalled with Xubuntu rather than Debian as Ubuntu is more suited to media player computers with more compatibility with phones and stuff than is built into Debian where you have to muck around and install extra packages.

Wednesday 11 July 2018

Computing resources optimisation [1B]

Since yesterday a few issues have cropped up so I am rethinking some stuff.

  • The Raspberry Pi has proved unable to cope with a particular feed I gave it, so reluctantly I am going to have to stop using it as a media player. It can cope with standalone playback but live playback in a browser can give it a lot of problems. I'm not sure what I will use it for at the moment.
  • The Antec will get reinstated in the Pi's place and I will look at giving it enough disk space to store all of the video and audio that I have played from mediapc up till now, so it will be equipped for both tasks.
  • mediapc may well end up as a day to day computer for email, word processing and the like. I'm not really sure. It may end up storing my photo collection that is currently on mainpc, to give mainpc more disk space. It may also end up being used as a third screen to display map resources on, such as aerial photos, that at the moment just end up using too much space on main pc.
  • serverpc will probably end up just storing VMs, map sources and what have you, stuff that doesn't need to be backed up. It will act as the backup server, but not itself be backed up for the most part.
Anyway those are the thoughts right now. The stuff I did yesterday moving screens around and so forth has been worthwhile. There are still a few cables to reconnect.

All those ideas, I don't know which are the most worthwhile ones and what will actually be implemented, it is just interesting to try them out. 

Trying to configure Gimp to use SSD swap was generally a waste of time unfortunately. Not only is it nearly impossible to get it to use a different swap path, it also gobbles a ton of disk space. I was working on one mosaic yesterday where it ended up using over 100 GB of disk swap space in addition to the memory space. In other words a separate SSD of 250 GB would be a better bet to ensure it has enough working space. One in either 2.5" HDD or M2 formfactor would be around $100 but is not a priority for now because that is a lot of money for me at present. So we just live with the slowness of disk based caching, you can always go and do something else for a while as Gimp does its thing, not really too big a deal.

Tuesday 10 July 2018

Computing resources optimisation [1A]

After looking at the best use of the computing resources I have the following changes are being implemented:
  • Mediapc taken down from 12 GB RAM to 4 GB RAM
  • The 8 GB from mediapc put into mainpc as they have similar memory specs, this gives mainpc a total of 32 GB. Mediapc manages just fine with only 4 GB because Linux is so resource efficient (Debian - XFCE).
  • I plan to shift the low resource day to day stuff such as blogging, emails, facebook etc onto possibly the Windows 10 computer. Another option may be to set up the Windows 10 computer as a dual boot Windows and Linux and use it on Linux for stuff as well as Windows when required.
  • So then mainpc and serverpc will handle the high resource stuff (Gimp etc) without wasting resources on email and stuff I don't need running on them. 
  • The connections and arrangement of screens is the key question. I have three screens in the lowest position on the desk and probably they will stick with the two on mainpc and the third on serverpc. The Windows 10 computer screen would be moved to the secondary desk which holds the music keyboard at present and its role would also be displaying chart PDFs on its screen. I will consider mounting that screen on an adjustable arm to allow for the multiple use requirements. In the second row of screens we have mediapc's 32" playback monitor and probably its second screen and the 22" screen I now use with the satellite receiver. The third (highest) row is limited to the 32" TV that can be used to watch Freeview on very rare occasions, its main function is Raspberry Pi playback.
So there we have it - how to be able to use the resources to the best use - I don't need a good computer with 32 GB of RAM that can be editing big Gimp projects wasted on email and FB stuff - I still want to use them but putting them onto another PC specifically is a better use of my resources.

Mainpc is not fully optimised for Gimp the way I have optimised serverpc so I will look at that as well. This involves changing the swap configuration so Gimp can have dedicated space on the SSD for its own swap. This may well dictate a reinstall of Debian as the SSD partititions are best resized but this is a relatively straightforward step however I will check if it is possible to resize with Gparted as I do wish to be able to get this set up without reinstalling where possible.

I did try the resize of the partitions but ended up with an unbootable system so have reinstalled Debian 9.4 which I have done so many times it is down to a fine art now. The SSD originally was partitioned into 2x 56 GiB partitions but it now has 24 GiB for the root partition of the operating system, 48 GiB for the swap partition and 40 GiB for application use (Gimp swap). However I have not yet got Gimp working optimally because with Flatpak it uses different config files than the default ones. This also means I have not been getting it optimally working on serverpc either so there is work to be done there as well. As far as shifting lower priority tasks onto another PC goes, it will be a trial to see if that is really necessary but there is no doubt that I can make better use of the Windows 10 PC than just for downloading photos off my camera, running a download manager off websites or running a Powershell script every so often.

Sunday 1 July 2018

Raspberry Pi [3]

Well after a bit more experimentation I found this thing called TboPlayer which is a GUI that is a frontend for OmxPlayer so it enables the Pi to do more user friendly media playback stuff.

So Pi as media player looks even more feasible. 

Storage costs also vary, and if you can get by with 128 GB then this will cost about $60 and this is roughly the same price for either a microSD card of that size or a pen drive that plugs into one of the USB ports. 

There is still a lot of thought to go into how best to utilise this thing but as a media player it looks like it does have a surprising amount of capability for such a tiny and cheap device.