Categories
Linux Open Source Technology Ubuntu

Raspberry PI4 upgrade to bullseye and LXC notes

So whilst guides like this one: https://www.tomshardware.com/how-to/upgrade-raspberry-pi-os-to-bullseye-from-buster are very useful there were a couple of extra things that I needed to fix.

  1. I needed to update /etc/apt/sources.list.d/raspi.list in addition to /etc/apt/sources.list – changing buster to bullseye
  2. LXC config for networking caused issues to the networking

Point 1 is explained above but point 2 took me a while to figure out what was wrong. And this is only really relevant if you are using LXC (Linux Containers – a lightweight precursor to Docker / K8s). I am documenting this for anyone else who might be seeing issues (or my forgetful future self!). Also note that trying to define the static IP via dhcpcd.conf didn’t work (although perhaps as I was trying to configure eth0 rather than lxcbr0?!)

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# attempting to configuring eth0 here 
# like the below will cause multiple errors!
auto eth0
iface eth0 static
    address 192.168.x.y
    netmask 255.255.255.0
    gateway 192.168.a.b
 
auto lxcbr0
iface lxcbr0 inet dhcp
    bridge_ports eth0
    bridge_fd 0
    bridge_maxwait 0
    
# wifi
allow-hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid SSID
        wpa-psk KEY

What it needs to look like (the static IP part is configured within the LXC definition).

# interfaces(5) file used by ifup(8) and ifdown(8)



# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

#eth0 - built in ethernet is configured via the LXC bridge
# DO NOT CONFIGURE IT SEPERATELY OR networking and LXC will give errors

auto lxcbr0
iface lxcbr0 inet static
    bridge_ports eth0
    bridge_fd 0
    bridge_maxwait 0
    address 192.168.x.y
    netmask 255.255.255.0
    gateway 192.168.a.b

x.y and a.b are replaced by your actual addresses of course. Hope this helps someone (and I remember it if I need it again!)

Categories
Gadgets Linux Open Source Technology Web Development Wireless

Blog back online and now running on a Raspberry Pi 0 W

Since I finally got Gigaclear Fibre to the Premises (FTTP – which took over 18 months from when I placed my order) my blog has been offline. This was due to the fact that my static IP is associated with the FTTC (regular Fibre to the Cabinet) Broadband – which I am keeping as a backup/ secondary WAN as its only costing me a couple of quid more than land line rental. Getting FTTP mean’t getting a new router and I decided it was a good time to rethink my home network and implement VLANs to segregate different uses of my home network. Bought a very flexible little Dual WAN router/switch that I am super pleased with that allows me to seperate IoT from my main network (which is security best practise as IoT can have some horrible security holes). Now need to upgrade my main switch to a managed switch so I can implement VLANs throughout the network (and I am still wondering what to do about WiFi (without an expensive upgrade to VLAN aware Access points – as Gigaclear threw in a pretty decent Wifi Mesh system) At the moment I am running 2 Wifi networks – but that probably needs a rethink at some point.

As for the Raspberry PI Zero W – amazing that something so small (and powered off a router USB port!) can power a WordPress blog. Sure its not going to handle loads of requests (but then my blog never gets that!). I’ve also switched from Apache2 to Nginx. Now my web server is totally separate and decoupled from the rest of my Home Lab and virtual servers etc (which have become more experimental over the last few months with the new job).

I’ve also enabled HTTPS using a properly signed cert from LetsEncrypt. CertBot is amazingly easy to use – highly recommended.

Blog is still pretty broken in places, might get around to fixing that at some point!!!

Categories
Linux Open Source Ubuntu

Upgraded to Ubuntu Server 18.04 LTS

Was remarkably easy to upgrade over SSH (which is good as I am not in the Linux command line world as often these days!) https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes

Have also applied many of the hardening steps at:

https://blog.ubuntu.com/2018/07/30/national-cyber-security-centre-publish-ubuntu-18-04-lts-security-guide

Well worth a read if you are running Ubuntu and want to improve security. Not mentioned on there (probably as its more about using Ubuntu as an end user device rather than a server) is to review the SSH config and harden the SSH service.

Categories
Linux MS Windows Vista 7, 8 etc Open Source Technology

Windows 8 will drop the start menu – is this the beginning of the end for MS OS dominance?

So Microsoft is dropping the start button from Windows in v8

I think this is a silly move – surely one of the things that keep people tied to Windows is the fact that they know how to use it. If they (badly) copy Mac / Linux and force people to re-learn how to navigate the OS won’t more people just switch to Mac/iPad and Linux? Especially given Android’s recent successes, and the continuing Apple obsession?

Just need Google to ditch the cloud obsession from their Chromebook / Chrome OS or create an Android for PCs to accelerate it…

I hope for MS sakes they keep an option in to make the OS look like Windows 7 – eg a basic theme?

Categories
Linux Open Source Sony Stuff Ubuntu

Streaming HD content to your TV via a PS3 from a Linux Server (or Windows PC)

Quick post – caveat haven’t had a chance to proof read this one and its late so it will have to do for now!

You may not be aware that you can use a Playstation 3 to act as a media streaming/playback client using a system called DNLA (also known as uPNP). This allows you to view content on your computer on your main TV in HD. Windows Media Player can act as the “Server” portion but its not ideal for connecting to the Playstation.

Crude diagram here, might expand this with my full setup when I get a chance:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I have been trying to get this working for a while. Essentially the plan is to get access to downloaded videos, videos from my camcorder (now HD) to save burning it to DVD or Blu-Ray and also access my photos and music collection from my Ubuntu Linux server that holds all my content (on a RAID 1 mirrored disk setup) to my TV and home cinema/HiFi setup.

Last time I tried to use a small command line utility and my PS3 was only connected via Wireless to the Server – the result was stuttering music let alone videos. So its something I gave up on for the time being.

Recently I have been able to overcome this as I have discovered flat gigabit ethernet cables that I can run out of my double glazed windows (even when shut!) so I have hacked a gigabit backbone that connects my TV and AV kit (including PS3) to my Linux Server (in fact the very one that served this blog page to you) that hold gigabytes of multimedia (now there’s a word you don’t hear much these days!)

Also discovered http://code.google.com/p/ps3mediaserver/ which is a great Java based server component for PNP based streaming – as the name suggests its specifically designed for connecting the PS3 up to content…

Screenshot of ps3mediaserver

 

 

 

 

 

 

 

 

Hey presto excellent quality video (including 1080p video) and music on the TV / HiFi!

Next to work out how to get my iTunes (stuff that only plays on iTunes rather than MP3s) music across and available to the PS3. I have moved and shared the my iTunes media folder (as have that on the network too – as per these instructions – http://lifehacker.com/230605/hack-attack-share-your-itunes-music-library-over-your-home-network - so I can re-use iTunes across different machines – and keep it backed up).

Categories
Linux Open Source Technology Ubuntu

This blog is now running on new hardware & software!

Recently changed the server this blog runs on to a low power Dual Core Intel Atom in a smaller form factor case (mini ITX). In an attempt to reduce my environmental and electricity footprint. Took the opportunity to upgrade Ubuntu Server to 10.04 LTS which comes with MySQL 5.1 and WordPress is now 3.0.1 ( which was a very easy upgrade – one click from within the web based admin – well done WordPress team for that!).

The Dual Core Opteron box this blog used to run on will now only be powered up when I am experimenting with Server Operating systems (will be re-built as VMware ESX host).

Getting in some IT geekery before my life gets turned upside down!

Categories
Linux Ubuntu

Adventures to fix Ubuntu & RAID boot up

Yeah finally fixed an annoying issue with my Linux Server at home (nice to flex my Linux admin skills!) documenting it here in case I ever need the commands again or its useful to others:

Problem:

Ubuntu 9.04 no longer booted after a minor update (from .15 to .16) with my Software RAID setup as described in these reported bugs:

https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/330298

https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/158918

Fix:

Following the instructions on https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/136252/comments/5 fixed the problem but you need to run update-initfs -u so it updates.

Amazing what you learn when having to fix this kind of stuff – for one I now understand the memory based file system that linux uses during boot better.

Categories
MS Windows Vista 7, 8 etc Open Source Samba

Fix for Windows 7 offline files and Samba

Further to my blog posts involving vista (and the tweaks that can help make Vista/Windows 7 compatible with Samba) I came across a registry setting that needs to be changed to get offline files to work correctly:

“Set the following registry key on the Windows Vista client to prevent files from getting pulled down to the client again right after synchronizing changes to the server (due to Linux file systems having coarser timestamp resolution than Windows):

Create a DWORD value named RoundUpWriteTimeOnSync under the HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache key (create the key if it does not exist) and set it to 1.” from the Storage Team at Microsoft’s Blog: http://blogs.technet.com/filecab/archive/2007/03/16/using-offline-files-with-samba-emc-servers-nas-devices.aspx

Categories
Linux Open Source Ubuntu

Running Windows via Linux to improve performance (fixing VirtualBox on Ubuntu 9.04)

Screenshot of VirtualBox running XP under Ubuntu
Recently I’ve started using Virtualisation – for those who don’t know this is running an Operating System or OS for short (such as Windows) as an application (so you could think of it as running a computer within a computer). I’ve started doing this as I’ve got frustrated with Windows slowing down after being installed for a few months. This way I can run Linux which is very stable and performs consistantly as the main Operating System (or the “Host”) and then run various “Guest” OS installations – such as Windows. You can take snapshots or save the state of the Guest machines – which is ideal if you want to go back to how your Windows install used to be (but unlike reinstalling all your applications and settings are as they were).

Generally Windows runs at the same speed as it does normally – so long as you don’t run too much stuff on the Host OS at the same time – but of course there are limitation – eg Games or software that needs access to devices that can’t be provided via VirtualBox. And of course you could run the reverse setup – if you fancy trying Linux as a Guest OS but keeping the safety net of Windows as your main Operating System.

Anyway I’m posting this as I’ve been using VirtualBox on Ubuntu Linux to run Windows XP. On a recent upgrade from Ubuntu 8.10 to the latest version 9.04 VirtualBox failed to run. This was fixed by running the command given in the error message (its nice to get a very useful error message in software!)

The command I had to run was sudo /etc/init.d/vboxdrv setup

Once VirtualBox was working again I noticed that the Host key (which is the key used in different combinations to switch between the Host and the Guest OS) was not working. Instead it was flashing the Ubuntu desktop and pulsed some circles – like radar – from the cursor. At first I didn’t twig that it was simply the new mouse settings in the latest version of Ubuntu. By default it now seems the tickbox below in System->Preferences->Mouse for “Show position of pointer when the Control key is pressed” :

Mouse Settings in Ubuntu
Mouse Settings in Ubuntu

Hey presto – the host key works again! Hopefully this is helpful for anyone else confused by this one!

Also note the position of the sliders in the above screenshot for acceleration and sensitivity – I find these settings make the touchpad on my Vaio behave in a similar way to Windows (previously my mouse felt too sluggish).

I’m now actually using Windows less and less now at home (Evolution is a decent email client and of course Firefox offer pretty much the same browsing experience – apart from some differences with fonts, and OpenOffice allows for opening the odd Office attachment). The true acid test though is how much the wife moans as previously she’s never been happy without the familarity of Windows…! (But then it is still available in a couple of clicks).

I’m sure there will be more on my adventures of using Ubuntu on the desktop in due course – if I find time I’ll share anything I think others might find useful…

Categories
Technology Ubuntu Web Development

Fix for Firefox Addons error…

If your not having any joy when installing addons in Firefox 3 (sorry can’t remember the specific error message) – but nothing seem to fix it – even re-installing) we managed to confirm the fix today at work. Note that involves completely clearing all Firefox related info (so settings, bookmarks etc will be gone)…

* Uninstall Firefox
* Then make sure that the C:\Program Files\Mozilla Firefox is completely gone
* Also clear out the C:\Documents and Settings\<<username>>\Application Data\Mozilla folder (it will probably still contain Firefox and Extensions directories)
* Re-install

Voila – you can install extensions again (like the brilliant FireBug)

This also works for Linux (had a similar issue at home with the Latest version of Ubuntu).