Category Archives: GNU/Linux

Bluetooth: Error in firmware loading

Bluetooth: Error in firmware loading err = -110

So this is my story. My new laptop comes with Atheros AR9565.
This one has integrated wifi and bluetooth which causes problems.
My BT mouse was working fine, but suddenly disconnected to never come back even after multiple reboots.
Thanks to Fahad the solution was to create a file e.g. bluetooth-coe-fix.conf in /etc/modprobe.d with this single line:
options ath9k btcoex_enable=1
Reboot and voila!
Related bug report.

Empty /var/log/secure

If you have encountered this problem, please
rm /var/lib/rsyslog/imjournal.state
service rsyslog restart

and see if it helps.
You should notice extensive work done by the rsyslogd daemon, but it will settle down.
Use gnome-system-log to quickly asses the system logs.
For any reports that goes to your mailbox please use mutt.

Shellshock bash bug

Test your vulnerability by executing this in your terminal
env x='() { :;}; echo vulnerable' bash -c 'echo hello'
and this
env X='() { (a)=>\' bash -c "echo echo vuln"; [[ "$(cat echo)" == "vuln" ]] && echo "still vulnerable :("
If you can see word “vulnerable” it means your system is vulnerable to this bug and you should update your system asap.

Long time ago I was encouraged by my friends to use ZSH instead. This shell is not affected by this bug, but still you will have a lot of scripts in your system that by default call for bash, so you should still update your system.

Directly plenty of webservers and DHCP servers were affected. Whatever was exposed to the Internet is potentially compromised, so please check your firewall logs and system logs.

Hah. When I turned on my Raspbmc I have noticed a notification “Patching bash vulnerability”. Auto update is enabled on it. :)

Raspbmc

Speeding up Raspbmc video.

Setting the default time
The Raspberry Pi automatically sets the date and time from the internet. However the timezone may be incorrect and the time may not take account of Daylight Savings Time (or British Summer Time). This can easily be fixed by selecting System settings / Appearance / International and changing the Timezone country from the default “Aaland Islands” to your local timezone.

If you look for UK please browse to Britain (UK). There is no England, Great Britain or United Kingdom.

FUSION.XBMCHUB.COM

Instructions 1
Instructions 2
Instructions 3

Backup Raspberry Pi Raspbmc

Standalone image installation of Raspbmc (I was having problems with a network installation, it takes long and it is a bit flaky)
sudo umount /dev/devicenode
sudo dd if=/path/to/downloaded.img of=/dev/devicenode bs=1M

Backup using dd
dd if=/dev/sdx of=/path/to/image bs=1M

Firefox is cool

I like Firefox. What I have noticed recently is that the browser is quite smart in terms of saving files from the web. Maybe it is not the web browser but the system itself or both.
If I visit the same websites even after a while it still remembers the old path so I don’t have to browse from the root directory anymore.
In rare occasions I have to change the directory. This is very useful as it saves me dozens of click every day.

GNU Linux autostart

No problem!

If you don’t change LXDE session manager, your session is handle by lxsession by default. lxsession will automatically search for and run applications it finds in ~/.config/autostart. Hence, to add an application to lxsession autostart list, you need to create a .desktop file in ~/.config/autostart with the following contents as minimum:

[Desktop Entry]
Type=Application
Name=My Application
Exec=/path/to/the/executable/file

Very useful!

Secure wipe

shred --verbose -n1 /dev/sdX
in my case 20GB per about 12min
for 500GB hard drive just one pass will take about 4.5h
by default shred runs 3 different passes
or
badblocks -c 10240 -wsv /dev/

Alternatives to TrueCrypt?

When it comes to security Linux again proves to be much better than proprietary alternatives especially in the time when trust to TrueCrypt has been compromised after recent development suspension.

First of all to work with TrueCrypt volumes you can use
tc-play
cryptsetup

and
zulucrypt as frontend GUI for tc-play and cyptsetup

Alternatively you can move to LUKS encrypted drives that perform better than eCryptfs.
FreeOTFE frontend is available for Windows systems so we can make use of that software on proprietary platform.

However I think TC is fine for now and even if the development has been suspended community is still able to publish information about any new bugs found only then there is a tangible reason to abandon TC.

Simple bash colouring

for root:
PS1=’\[\033[1;36m\][\A]\[\033[0;31m\]\u\[\033[0;32m\]@\[\033[1;34m\]\h\[\033[0m\]:\w \[\033[0;31m\]# \[\033[m\]’

for a regular user:
PS1=’\[\033[1;36m\][\A]\[\033[m\]\u@\[\033[1;34m\]\h\[\033[0m\]:\w \[\033[m\] $ ‘

Don’t ask about the details just use it.
More info here.

NFS easy way

Server:
yum install nfs-utils nfs-utils-lib

systemctl enable nfs-server.service

/etc/exports
/home/homebkp 192.168.0.20(rw,sync,no_root_squash)

exportfs -av
systemctl restart nfs.service
systemctl status nfs-server.service

iptables -L -n
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
iptables-save > backup.dump
iptables-restore < backup.dump

Client:
yum install nfs-utils nfs-utils-lib

mount -t nfs 192.168.0.10:/home/homebkp /mnt/server

Bootable USB Windows installer

This applies to Windows 7 as well as to Windows Server 2008, SBS 2011 or 2012.
Don’t bother using WUDT.
First format the drive with NTFS using Gparted.
Copy all the files manually from the iso to that drive.
Run on the target drive to install Windows mbr
make
make install
ms-sys -7 /dev/sdX

Then mark that partition as bootable with cfdisk.
Voila!