Prevent Rpi from blanking screen
2016-11-23
So, I got some new 5" HDMI monitors in for my Raspberry Pi's. What can I say, they are awesome!
Some modifications are needed to make sure that it works in /boot/config.txt
uncomment if hdmi display is not detected and composite is being output and force 800x480 resolution
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
However, not everything was working as I wanted it.. Screen blanking.. what an god awfull thing! So the hunt began and I've tried many solutions but none worked and mostly depended on you running X11.. Which I dont on these..
So for me the solution was to stick the following into term.sh:
setterm --blank 0 &&
setterm --powersave off
And then adding sh /home/pi/term.sh at the end of .bashrc.
gara
KVM/QEMU Preparing for moving hosts.
2016-10-02
In this day and age we are running everything virtualized and that comes with it's own set of challenges.
Now I'm working on kvm and must say I'm liking how far it's gotten the last couple of years to be completely viable. There are some challenges though if you want proper performance while running Windows, namely you need the VirtIO drivers from the fedoraproject. When creating the VM it's important that you change the virtual hdd to Virtio and the NIC as well. Next step is then to add a CDROM with the virtio iso image for driver installation during the Operating System installation.
After OS is installed you have to install the missing drivers.
Once all this is done you can then download SDelete to zero out the rest of the free space to allow for spacereclaimation.
sdelete -z C:
Beware that this process can take quite some time so be patient and put the kettle on.
Once that is done it's time to migrate the vm to a new host:
root@kvmhost:~# virsh shutdown vm-name
root@kvmhost:~# virsh dumpxml vm-name > /tmp/vm-name.xml
root@kvmhost:~# scp /tmp/vm-name.xml new-kvm-host:/tmp/vm-name.xml
root@kvmhost:~# scp /var/lib/libvirt/images/vm-name.qcow2 new-kvm-host:/var/lib/libvirt/images/vm-name.qcow2
root@kvmhost:~# virsh undefine vm-name
root@kvmhost:~# rm /var/lib/libvirt/images/vm-name.qcow2
With the above actions you have copied the xml definitions and the image file to a new host and removed it from the current host. However it might be smart to verify that the new host can spin the VM up before removing it.
On the new host, perform the following to make use of the VM:
root@new-kvm-host:~# virsh define /tmp/vm-name.xml
root@new-kvm-host:~# virsh start vm-name
Now you should have the VM running on the new host!
gara
ElementaryOS, what a nice surprise
2016-09-27
So I decided to take the leap and try ElementaryOS again. Last time I did so it was not as polished and sleek as now, and boy did I get surprised.
Everything on the HP Stream 13 worked out of the box, no configuration needed. The temperature on the CPU dropped 2-3 degrees celcius compared to Ubuntu 16.04 running i3-wm. And I really must praise the prepackaged setup, it's just ready to run as soon as you reboot after the installation is done.
With time we'll see if this becomes the distro I will go to for new installations or not. However I do know that I will recommend this for people who havent encountered any Linux distro before and want to give it a try.
Now however it's time to hunker down and keep working on virtualhacker.net with all the services and such. More on the adventure that is ElementaryOS in a future post.
gara
Virtualhacker.net's public CJDNS node
2016-09-17
So virtualhacker.net is aligning to open for CJDNS communication. More info can be found below with links to the needed tools and connection info.
"cjdns-public.virtualhacker.net:64281":
{
"login": "cjdns-public",
"password":"3fb34v5t03jj1xtwx96bj1t5t69x12x",
"publicKey":"pk12lx76mld8smjhu9hkqkdcjjb51nk4192b4lk4y6dxwr3qj0c0.k",
"peerName":"virtualhacker"
}
Go to github.com/cjdelisle/cjdns for the tools and follow the instructions.
If however you feel lazy you can always run the lines below (must be executed as root, remove Seccomp_NO=1 if on x86):
#!/bin/bash
echo -e "Starting installation and configuration of cjdns" &&
apt-get install nodejs build-essential git -y &&
cd /opt &&
git clone https://github.com/cjdelisle/cjdns.git cjdns &&
cd /opt/cjdns &&
NO_TEST=1 Seccomp_NO=1 ./do &&
ln -s /opt/cjdns/cjdroute /usr/bin &&
umask 077 && ./cjdroute --genconf > /etc/cjdroute.conf &&
cp contrib/systemd/cjdns.service /etc/systemd/system/ &&
systemctl enable cjdns &&
systemctl start cjdns &&
echo -e "Setup of CJDNS completed"
echo -e "\033[31mRpi needs to reboot before it works!"
gara
Unrelated.info on cjdns
2016-08-26
So, I've finally gotten my arse in gear and gotten cjdns running.
Now I got h.unrelated.info up and running on cjdns and I've added my mail server as well.
It was a bit of a challenge to get it running on the Rpi though but in the end I came over the solution and disabled SECCOMP which allowed it to complete the compile.
More to come later o/
-gara
Flushing cache
2016-05-17
echo 1 > /proc/sys/vm/drop_caches
echo 2 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches
Values:
- 1 Freeing Pagecache
- 2 Freeing dentries and inodes
- 3 Freeing Pagecache, dentries and inodes
Do not use unless 100% certain of what you are doing!!!!
gara
Running bash scripts from Windows via cygwin/babun:
2016-03-28
The syntax is like this:
<windows path to bash in cygwin> -l -c "<cygwin/linux path to the script1>"
Example:
Lets say I want to start a script called script1.sh
I usually call it like:
Script1-Windows-Starter.Bat C:\cygwin\bin\bash.exe -l -c "/cygdrive/e/scripts/start.sh"
Note that windows is not case sensitive but linux is...
So these would work
C:\cygwin\bin\bash.exe -l -c "/cygdrive/e/scripts/start.sh"
C:\CYGWIN\bin\bash.exe -l -c "/cygdrive/e/scripts/start.sh"
C:\cyGWin\BIN\baSH.exe -l -c "/cygdrive/e/scripts/start.sh"
But these will not work - because the /cygdrive.. part doesnt match the case of the folders from cygwins/linuxes point of view:
C:\cygwin\bin\bash.exe -l -c "/cygdrive/e/SCRIPT/start.sh"
C:\CYGWIN\bin\bash.exe -l -c "/cygdrive/E/scripts/start.sh"
C:\cyGWin\BIN\baSH.exe -l -c "/cygdrive/e/scripts/START.sh"
mpsyt running in Windows
2016-03-24
So, I wanted to have less hassle with streaming music from youtube and be able to search playlists without having to resort to the web browser. That's when I remembered a tool mujo from an irc channel I linger on came up, mpsyt.
It should be fairly straight forward to get things running but it requires python3 and some other goodies like mpv and youtube-dl.
mpv and youtube-dl can be downloaded from https://mpv.srsfckn.biz/
mpsyt can be downloaded from https://github.com/np1/mps-youtube/releases/
(rename mpsyt-VERSION.exe to mpsyt.exe)
These exe files needs to be placed in C:\Users\
After that I was fiddling around with cmd prompt and found it greatly annoying to use so I've opted for using Console2. This can be downloaded from Softwareok
Once all the steps above are complete and Python3 added to PATH you are good to go and can type "mpsyt" in the command prompt.
gara
garandil@unrelated.info