Category Archives: GNU Debian

Moving to a new hard drive

Lets say you want to migrate your system to a new hard drive.
Of course the best practice is to buy a hard drive with the exact same size. This will save you problems.

I think instead of changing the files where disk UUIDs reside just swap UUIDs between the old and new disk.

invalid partition -- table wrong signature 0
This means something went wrong with the partition table and you want to use fdisk to write a valid partition table.


There is an extensive discussion about benefits and disadvantages of this features.
I have decided to disable it.

1. open “/etc/sysconfig/prelink” in a text editir (such as vi)
2. you should see this line: PRELINKING=yes
3. change ‘yes’ to ‘no’
4. save the change you just made & exit the text editor
5. manually run “/etc/cron.daily/prelink” as root.
6. prelinking is now disabled and will not reactivate the next time you reboot.

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.

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. :)

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.


Unfortunately k3b is not smart enough to tell you what is the actual problem.
It will say “Please insert an empty medium” even if there is actually an empty medium inside, but of wrong size e.g. CD instead of DVD.

It is much easier to troubleshoot similar dummy problems with Xfburn.

Who has root permissions?

grep 'x:0:' /etc/passwd
Again, you shouldn’t do this but to check if the user is a member of the root group:
grep root /etc/group
To see if anyone can execute commands as root, check sudoers:
cat /etc/sudoers
To check for SUID bit, which allows programs to be executed with root privileges:
find / -perm -04000

Not able to connect via SSH

skx@lappy:~$ ssh -l root
ssh_exchange_identification: Connection closed by remote host

Most likely someone has messed up the permissions. Do this:
chmod 600 /var/run/sshd
chmod 600 /etc/ssh/ssh_host_*

RedHat, CentOS
/etc/init.d/sshd restart
service sshd restart
/etc/init.d/ssh restart
service ssh restart

Syndicate – Freesynd

If you wish to install Syndicate on Linux please follow these steps first then steps from INSTALL text file in Syndicate port directory.
yum install SDL*
When you get this error:
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

apt-get install gcc-c++
yum install gcc-c++
Continue reading Syndicate – Freesynd

Yubikey for Fedora and Debian

apt-get install libpam-yubico
yum install pam_yubico

add before @include common-auth:
auth required mode=client id=X key=N

add “try_first_pass”
auth [success=1 default=ignore] try_first_pass nullok_secure


if you want one file you need to specify the path in the /etc/pam.d/gdm-password or /etc/pam.d/login
auth sufficient id=16 authfile=/etc/yubikey_mappings

Arch and Debian anatomy

I would like to speak more about runlevels. Unlike in Arch Linux in Debian initscripts are located in different place.
In Arch we have /etc/rc.d/[script] In Debian /etc/init.d/[script] and symlinks to these scripts located in /etc/rc[runlevel].d/ directory respectively. Instead of just one file rc.conf in Arch in Debian we have multiple that specify parameters for various initial things located in /etc/defaults.