- Download Fedora LXDE Spin
- Create a new VM and point it at the Fedora iso
- Run the VM and install Fedora to the hard drive
- Remove the iso from the VM
- 'visudo' and add the following: 'paul ALL=(ALL) NOPASSWD: ALL'
- 'sudo yum update'
- Ensure there is an optical disk attached to the VM: create if not
- Install Guest Additions Virtual Drive: Devices-> Install Guest Additions
- 'yum install dkms gcc kernel-devel'
- 'cd /run/media/paul/VBOXADDITIONS*'
- 'sudo ./VBoxLiuxAdditions'
- 'sudo usermod -g vboxsf paul'
- 'sudo mount -t vboxsf Temp ~/share'
Tuesday, December 26, 2017
Installing a Fedora Guest VM
Sunday, December 10, 2017
Installing Lego Mindstorms NXT 1.0 on Windows 10
See here for excellent instructions.
- From the installation CD search for all msi files and install:
- Mindstorms.msi
- MinstormsEng.msi
- Ensure English resource files are installed in the correct location (could be installed on D:) and move to C:\Program Files (x86)\LEGO Software\ if not
- Install driver from here. Note that cab file may have to be manually moved from zip file to temp file during the installation process
- Install updated driver from here. (not sure step 3 is also required. However...)
- Run...
Sunday, October 08, 2017
Installing OpenVPN
Based on OpenVPN 2.4.0. On a Raspberry Pi...
sudo apt-get install openvpn openssl easy-rsa
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 8.8.8.8"
user nobody
group nogroup
And the following firewall rule is required to ensure that all traffic initiated from clients will be masqueraded as traffic outgoing from wlan0 (change this to the appropriate interface!):
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o wlan0-j MASQUERADE
Installing iptables-persistent can make the firewall rules persistent:
sudo apt-get install iptables-persistent
They are configured with:
iptables-save >/etc/iptables/rules.v4
or better:
dpkg-reconfigure iptables-persistent
It is also necessary to enable IP forwarding by un-commenting net.ipv4.ip_forwarpv4.ip_forward=1 in /etc/sysctl.conf and running sudo sysctl -p
sudo apt-get install openvpn openssl easy-rsa
sudo cp -r /usr/share/easy-rsa /etc/openvpn
Update the file /etc/openvpn/easy-rsa/vars:
export EASY_RSA="/etc/openvpn/easy-rsa"
export KEY_SIZE=2048
Create Certificates
These should be built into the /etc/openvpn/easy-rsa/keys directory
cd /etc/openvpn/easy-rsa
sudo su
source vars
ln -s openssl-1.0.0.cnf openssl.conf
./clean-all
# build CA cert
./build-ca OpenVPN
# build server key files
./build-key-server server
# build client key files
./build-key client1
./build-key client2
# build Diffie-Hellman key exchange
./build-dh
# static Pre-Shared Key PSK
openvpn --genkey --secret ta.key
Create Server Configuration File
A default version can be found in /usr/share/doc/openvpn/examples/sample-config-files. Should be named /etc/openvpn/openvpn.conf. However, this is all that is required:
port 1194
proto udp
dev tun
ca /etc/openvpn/easy-rsa/keysca.crt
cert /etc/openvpn/easy-rsa/keysserver.crt
key /etc/openvpn/easy-rsa/keysserver.key
dh /etc/openvpn/easy-rsa/keysdh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
cipher AES-128-CBC
tls-auth /etc/openvpn/easy-rsa/keysta.key 0
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-status.log
log /var/log/openvpn
verb 3
explicit-exit-notify 1
Create Client Configuration File
This is all that is required:
client
dev tun
proto udp
remote 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 1
mute 20
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
...
-----END OpenVPN Static key V1-----
Routing all Client Traffic Through VPN
To route all traffic through the VPN, the following is added to /etc/openvpn/openvpn.conf:push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 8.8.8.8"
user nobody
group nogroup
And the following firewall rule is required to ensure that all traffic initiated from clients will be masqueraded as traffic outgoing from wlan0 (change this to the appropriate interface!):
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o wlan0-j MASQUERADE
Installing iptables-persistent can make the firewall rules persistent:
sudo apt-get install iptables-persistent
They are configured with:
iptables-save >/etc/iptables/rules.v4
or better:
dpkg-reconfigure iptables-persistent
To list the NAT tables:
iptables -t nat -vL
It is also necessary to enable IP forwarding by un-commenting net.ipv4.ip_forwarpv4.ip_forward=1 in /etc/sysctl.conf and running sudo sysctl -p
Sunday, April 03, 2016
VirtualBox access to SD card through Windows Host
The problem is how to set the wireless details for a headless Raspberry Pi, and so the challenge is how to change a file on an SD card formatted as Ext4 for Linux when Windows doesn't recognise it.
As I'm already running a Centos 7 image of Linux in VirtualBox, one solution is to access the whole, raw SD card direct from that VM.
And this post details exactly how to do this, whilst the VirtualBox man pages can be found here.
wmic diskdrive list brief
cd c:\Program Files\Oracle\VirtualBox
VBoxManage.exe internalcommands createrawvmdk -filename "%USERPROFILE%/Documents/sdcard.vmdk" -rawdisk "\\.\PHYSICALDRIVE1"
.
As I'm already running a Centos 7 image of Linux in VirtualBox, one solution is to access the whole, raw SD card direct from that VM.
And this post details exactly how to do this, whilst the VirtualBox man pages can be found here.
1. Get the DeviceID for your SD card reader
As administrator, open a command prompt and type:wmic diskdrive list brief
2. Create an image representing the SD card
As administrator, navigate create a link file to the SD card on the desktop:cd c:\Program Files\Oracle\VirtualBox
VBoxManage.exe internalcommands createrawvmdk -filename "%USERPROFILE%/Documents/sdcard.vmdk" -rawdisk "\\.\PHYSICALDRIVE1"
3. Connect the VM to the SD card using the link
Open VirtualBox as administrator, and open the Settings for the VM. Go to Storage -> Controller: SATA -> (right click) Add Hard Disk -> Choose Existing Disk and open the file that was created in Documents (note VM must be powered off)..
4. Access...
Start the VM and mount the card using the GUI. The card should now be accessible in native Ext4 format...Thursday, March 24, 2016
Setting up an SSH Git server on Windows...
I have a set of Raspberry Pis and I need to back up the stuff I do on them, and ideally add some version control as that is always good.
So the idea is to set up a git server on my Windows machine, giving me the ability to both version control the stuff I am doing, and back it up through the pre-existing Windows backup. And the assumption is that anything not in git can be recreated easily enough.
This and the follow up here are the best tutorials I've come across describing this, but full details here:
Install SSH
I'm using the new Microsoft supported OpenSSH.
- unzip the package at C:\Program Files\OpenSSH-Win64 and follow the installation instructions.
- Check the installation by connecting to the Windows machine through SSH.
Note that there OpenSSH isn't yet mature enough for this to work correctly. Worth instead using Bitvise SH Server which is free for limited use.
Install Git
- Download git for Windows and install. Suggest install either git bash, or git bash + cmd option.
- Update PATH to add C:\Program Files\Git\mingw64\libexec\git-core and C:\Program Files\Git\bin
- Create a new file in C:\Program Files\Git\bin named gup.sh. his removes additional single quotes that are added by ssh from Linux to windows:
- Create a second new file named grp.sh:
How to use:
To clone:
git clone -u 'sh gup.sh' user@laptop:C:/Temp/new-project.git
To push:
git push --exec 'sh grp.sh' user@laptop:C:/Temp/new-project.git master
To pull:
To pull:
git pull --upload-pack 'sh gup.sh' user@laptop:C:/Temp/new-project.git
Alternatively, update ~/.gitconfig using (see here):
git config --global remote.origin.uploadpack 'sh gup.sh'
git config --global remote.origin.receivepack 'sh grp.sh'
To create an empty project:
On remote server:
mkdir new-project.git
cd new-project.git
git init --bare
On local machine:
cd new-project
cd new-project
git init
git add *
git commit -m "Initial commit"
git remote add origin user@laptop:C:/Temp/new-project.git
git push origin master
git add *
git commit -m "Initial commit"
git remote add origin user@laptop:C:/Temp/new-project.git
git push origin master
To set up Public Key Authentication
On remote server (linux):ssh-keygen –t rsa
or (Windows):
ssh-keygen.exe -t rsa -f id_rsa(For OpenSSH) Copy the contents of ~/.ssh/rsa_id.pub and add to %systemdrive%\users\user\\.ssh\authorized_keys on host.
Alternatively...
Use Bitvise SSH Server as it is better...
Monday, October 05, 2015
X11 forwarding...
Easiest way is to use Putty and Xming.
Have tried Cygwin/X, but seems overly complex: Xming appears to be the simpler answer.
Just need to make sure X11 forwarding is set on Putty, and everything else should just work...
Have tried Cygwin/X, but seems overly complex: Xming appears to be the simpler answer.
Just need to make sure X11 forwarding is set on Putty, and everything else should just work...
Monday, August 03, 2015
Windows 10 and MS Money...
...don't seem to work together: Money fails with an error stating it expects IE6.
The initial solution appears to be to update the registry with the following, which seems to work:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer]
"Version"="9.11.10240.0"
The full thread can be found here.
The initial solution appears to be to update the registry with the following, which seems to work:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer]
"Version"="9.11.10240.0"
The full thread can be found here.
Monday, April 21, 2014
Getting the new Dell Working...
Lovely computer, but would prefer if it had worked out of the box!!
Flickering screen on batteries is fixed by switching off Display Power Saving Technology on Intel HD Graphics Control Panel (see thread here).
Then the laptop not coming out of sleep is ironically, the Intel Rapid Start Technology. This needs to be switched off...!
Flickering screen on batteries is fixed by switching off Display Power Saving Technology on Intel HD Graphics Control Panel (see thread here).
Then the laptop not coming out of sleep is ironically, the Intel Rapid Start Technology. This needs to be switched off...!
Sunday, April 20, 2014
Wednesday, August 07, 2013
Setting up the Slide Scanner
Always manage to struggle with this one, but you need to:
- Connect scanner and power on before powering on PC
- Install Hamrick Vuescan (free update period has ended, so stick with version 8.4.60) including the provided drivers
- Unpack SCSI drivers (aic78xx_aic78u2_vista_x86_v605456.exe)
- Through Device Manager, locate the SCSI card, and install the unpacked drivers
- Register Vuescan, using the details in .\Assorted Stuff\Vuescan Account Details.pdf
And it should all work well, although the SCSI card appears to conflict with the sound card for some reason...
Subscribe to:
Posts (Atom)