Drop all databases from mysql

Sometimes I need to clean a mysql server so I can re-import it clean from the backups. A DROP ALL DATABASES; would have been nice, but the following does the trick. It will drop all databases except for mysql, test and information_schema
mysql -uroot -pPASS  -e “show databases” | grep -v Database | grep -v mysql| grep -v information_schema| grep -v test | gawk ‘{print “drop database ” $1 “;”}’ | mysql -uroot -pPASS


It does what it says on the tin. It will DROP all your databases, no warnings, no confirmations!


XBMC and Windows 8 on older hardware

Just wanted to note that older hardware works well with the new Windows 8 consumer preview. Since I had to change the hdd in my xbmc mediacenter I decided to give Windows 8 a spin on real hardware (not just virtual).


  • Gigabyte GA-MA78GPM-DS2H motherboard (AMD 780G +SB700 chipset,
  • AMD 4850e dual core energy efficient cpu
  • 250Gb hdd (all media is stored on a NAS)
  • 6Gb RAM

When I moved to a Full HD tv I found that I have to move away from XP to windows 7 in order to get decent hardware acceleration out of my integrated graphics. Because of power and heat issues I didn’t want to use a dedicated card. Windows 7 ran full hd decent but only using the latest drivers for my IGP from AMD-ATI.

In Windows 8 everything including hd videos worked out of the box, without installing any drivers. Still after installing the Windows 7 graphics driver found on AMD-ATI website performance got even better.

The system boots fast, xbmc works wonderful. Also the darn metro tiles look pretty good on a big screen – actually I hated metro on the desktop but on a big screen they look at home.

Removed ntfs partition reappears

So, I was repartitioning a harddrive that used to be a windows disk. I removed the ntfs partition that was spanning the whole drive and created a linux layout instead (two linux partitions and one swap). After writing the partition table the first partition on the disk failed to format. Returning to fdisk I saw that the first partition was still of type NTFS. So I changed the type once more and wrote the partition table to disk. I exited and returned and the type was stubbornly set to ntfs.

The fix was to zero the first megabyte of the partition:
dd if=/dev/zero of=/dev/sdx1 bs=1024k count=1
If you don’t understand the above don’t run it ! You risk a lot if you mistake the target partition!

request_module: runaway loop modprobe binfmt-464c

I added a new disk to my HP N40L and moved the boot disk to another SATA port, which meant reconfiguring lilo. Strange enough after setting everything up I got:
request_module: runaway loop modprobe binfmt-464c
right after the kernel loading.

Long story short this message means you are trying to boot a 32bit system with a 64 bit kernel (maybe the other way around will spit something similar). I set the boot parameter wrong and I was actually trying to boot and old 32 bit linux install that was still around on one of the drives in the NAS