Wired Ethernet on android tablet

Submitted by DenRaf on Sat, 12/07/2013 - 17:54

For a project I needed to work with an android tablet, but it had as restriction wireless was not allowed.

Typically a tablet is not foreseen to be physically connected to the network, so I had to find a solution. Luckily the tablet in question was a Nexus 10 with Android 4.4 kitkat. The tablet has a micro usb and a pogo docking port. As the local fry's had nothing with pogo I did go for the USB approach. This is also more universal. Has they had no micro USB to Ethernet, I had to buy a USB OTG and USB to Ethernet adapter. The Ethernet adaptor is the Linksys USB300M. This works out of the box. Enable airplane mode and you are working fully wired.

UPDATE: there is no need to enable airplane mode, android automatically disables the wireless.

EFI dualboot with Windows 7 and Fedora 16

Submitted by DenRaf on Sun, 02/26/2012 - 20:09

As I did a new hardware upgrade on my desktop I ended up with a EFI BIOS on my new mainboard. With installing Fedora 16 first it formatted my disk as a GPT disk, this replaces the formatting with MBR and 4 main partitions. I need a dualboot system to play a game so now and then. I decided I wanted one OS disk (SSD) and my other disks to be used as storage.

I always create my own partition layout, but this time it failed saying I did not have a correct partitioning for booting. Looking into this I found that I not only needed a /boot partition but a /boot/efi partition as well. The /boot/efi has also the EFI specific paritioning ( in the dropdown ). With applying this to the layout, the installation went on without any problems.

Then I installed my windows, everything seemed fine, but the windows could not be installed on my GPT disk. I verified that windows could be installed on a GPT disk with an EFI BIOS, checked the boot entries of bios to see everything was fine. Then when I listed my boot options menu, I saw I had an entry with my DVD rom and an entry UEFI with my DVD rom. When I selected the latter one, windows could see all partitions and could be installed just fine on my disk.

Now I the windows was installed as well and when rebooting into windows, I immediatly had an entry for windows and for Fedora. All nice and well, but I prefer grub to be my bootloader.

When I check my bootorder settings in the BIOS, I saw two additional options, Fedora and Windows. I tested both and could boot both, so my grub was not overwritten by the windows bootloader. So I could chose what I wanted to boot from the bios and from the windows bootloader, but not yet from grub.

A normal windows grub item looks like:
title windows
rootnoverify (hd0,3)
chainloader +1

When trying to boot this, this ended up in a, "File not Found" error. When I searched for it on the net, I only found some options for grub2, but the default grub installed was grub-efi, which is still grub 1. Then I found that windows also added it's efi manager to the efi parition I first created for my linux. So I had:

/boot/efi/EFI/redhat
/boot/efi/EFI/Microsoft

and I noticed in my grub console I was in /boot/efi since listing did immediatly showed the EFI folder. So I changed the windows grub entry into:

title windows
chainloader /EFI/Microsoft/Boot/bootmgfw.efi

Now I also can boot into windows from my grub bootloader.

OSD2010: Day 2

Submitted by DenRaf on Mon, 03/08/2010 - 09:09

Day 2 at the conference was much more interesting then day 1, cause it the talks way more technical.

Only on the lego talk I had some comments: java on embedded devices --> WTF.

Sejo had some issues with his server while doing his presentation on djagios, but nevertheless it was like the best talk I saw.

For both lunch and dinner we ended up in Haiku sushi which was VERY good. For dinner we took a bunch of people with us, cause the lunch was so good. So if you're in Copenhagen and like sushi, that's the place to be!

OSD2010: Day 1

Submitted by DenRaf on Sat, 03/06/2010 - 09:42

I have to say we didn't see that much talks at day 1. First of all day 1 is the commercial day and second we had some things to do.

As we, Sejo and I, are now members of the exherbo infra team, we had to introduce us to all exherbo people here and start our contribution to it.
So we ended up in the cafeteria ( best place for wifi access ) setting up some virtual machines for the infrastructure we want to setup and debugging some issues with bind for delegated subdomains.

The only talk we did see, was the nokia talk about QT. After that one we left with a bunch of guys to eat something downtown. We called it a day after some more drinks in the hotel with a few people of the dinner.

OSD2010: Pre notes

Submitted by DenRaf on Fri, 03/05/2010 - 12:01

Because of the injury of my colleague Sejo I had to go with him to OpenSourceDays. One of the Exhebo developers, Ingmar, joined us.

As Sejo doesn't like to take a plane, we drove all the way up here. After some detour and two border controls we arrived at Copenhagen after a 13 hour drive. ( Me likes! ) Was a very nice roadtrip!

We did meetup with some people of the organisation and after checking it at the very fine hotel ( A big thanks to the OpenSourceDays organisation ) we went out to dinner. ( First food of the day ). After that we called it a day.

Howto: Android 2.1 on G1/ADP1/Dream

Submitted by DenRaf on Sun, 02/14/2010 - 16:17

This is a short howto for installing an Android 2.1 rom (e.g. OpenEclair) on the HTC G1/ADP1/Dream.

First of all you the Amon Ra recovery tool.
A howto on installing this can be found here

Notice: To be able to continue this howto you need at least amon ra 1.3.2.
I used the recovery-RA-dream-v1.5.2.img. You can find more information on the xda-forum

Then you need to format your SD card. ( Backup your SD card to your computer as you will format your SD! )
A video howto can be found here

But here you have the written one:

  • Boot in to recovery mode ( HOME + END )
  • Select "Partition SDcard"
  • Select "Partition SD"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
    • Then you will be able to select the swap-size. Use the trackball to change.
      Select the preferred value ( I selected 128MB ) and hit HOME.
    • Then you will be able to select the ext2-size. Use the trackball to change.
      Select the preferred value ( I selected 640MB ) and hit HOME.
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
      Now the formatting starts and will show you some progress - dots.
  • Select "SD: ext2 to ext3"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
      Now the convertion starts and will show you some progress - dots.
  • Select "SD: ext3 to ext4"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
      Now the convertion starts and will show you some progress - dots.
  • Hit BACK
  • Select "Go to console"
    • Hit Enter
    • Type "reboot recovery" and hit Enter
      This will reboot your device directly in recovery mode.

Now you can start the installation of your new Android 2.1 rom. Here I will use the OpenEclair 1.2.1.

A video howto can be found here

On your PC

Get all files you need:

Connect your phone to your computer.

On your phone

  • Select "USB-MS toggle"
    This will mount your SD card to your computer.

On your PC

  • Put all 3 files you just downloaded on the root of your SD card.
  • Unmount/eject the SD card.

On your phone

  • Hit HOME.
  • Select "Wipe"
  • Select "Wipe data/factory reset"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
  • Hit BACK
  • Select "Flash zip from sdcard"
  • Select "ota-radio-2_22_19_26I.zip"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
    • It will ask you to reboot by pressing HOME + BACK. ( So hit HOME + BACK )
      This will reboot your phone and will bring you back to the recovery mode.
  • Select "Wipe"
  • Select "Wipe data/factory reset"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
  • Hit BACK
  • Select "Flash zip from sdcard"
  • Select "spl-signed.zip"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
    • It will ask you to reboot by pressing HOME + BACK. ( So hit HOME + BACK )
      This will reboot your phone and will bring you back to the recovery mode.
  • Select "Wipe"
  • Select "Wipe data/factory reset"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
  • Hit BACK
  • Select "Flash zip from sdcard"
  • Select "OpenEclair-v1.2.1.zip"
    • It will ask you to confirm by pressing HOME. ( So hit HOME )
    • It will ask you to reboot by pressing HOME + BACK. ( So hit HOME + BACK )
      This will reboot your phone and will bring you back to the recovery mode.
  • Tab the android.
  • Select "Skip"
  • Select "Skip"
  • Select "Next"

You're now at the home screen of your new image. If want to setup your google account, do this by the marker.

P.S: Try this at own risk. It is possible that you brick your phone!

Updated look

Submitted by DenRaf on Sun, 02/14/2010 - 13:23

Since the first day of my blog running on drupal I always used the garland layout and now time has come to finally change that.

After seeing the fervens theme at my colleagues Lefred blog and the display suite demo site, I liked it that much that I'm also using it now.

Zimbra monitoring with zabbix

Submitted by DenRaf on Fri, 12/04/2009 - 17:37

At our company we run zimbra as our collaboration tool and we use zabbix as our monitoring solution. Almost every service we have is monitored nicely, but unfortunately our zimbra was not. Because zimbra exists out of several services you want to know the status of every service. For that I wrote a little script.

First of all the zabbix agent configuration:

UserParameter=zimbra.clamav,/etc/zabbix/check_zimbra.sh antivirus
UserParameter=zimbra.spam,/etc/zabbix/check_zimbra.sh antispam
UserParameter=zimbra.logger,/etc/zabbix/check_zimbra.sh logger
UserParameter=zimbra.mailbox,/etc/zabbix/check_zimbra.sh mailbox
UserParameter=zimbra.mta,/etc/zabbix/check_zimbra.sh mta
UserParameter=zimbra.snmp,/etc/zabbix/check_zimbra.sh snmp
UserParameter=zimbra.spell,/etc/zabbix/check_zimbra.sh spell
UserParameter=zimbra.stats,/etc/zabbix/check_zimbra.sh stats

This use the custom check_zimbra:

#!/bin/bash

check=$1
maxage=30
file='/tmp/zimbra_status'

#check if file exists
if [[ -e $file ]]
then
OLD=`stat -c %Z $file`
NOW=`date +%s`

export PATH=$PATH:/opt/zimbra/bin
# if older then maxage, update file
if [[ `expr $NOW - $OLD` -gt $maxage ]]
then
sudo -u zimbra zmcontrol status > $file
fi

else

export PATH=$PATH:/opt/zimbra/bin
sudo -u zimbra zmcontrol status > $file
fi

AVSTATUS=`cat $file |grep $check|awk '{ print $2 }'`

if [[ $AVSTATUS != "Running" ]]; then
echo 0
fi

echo 1

As you can see we store the output of the slow zmcontrol in a file for a configurable amount of time. This way you can cache that output and win some time.
For this to run you need to add the next rule to the /etc/sudoers file:

zabbix ALL=(zimbra) NOPASSWD:/opt/zimbra/bin/zmcontrol

New module: Node Page Template

Submitted by DenRaf on Thu, 09/03/2009 - 21:44

Last Monday I released a first version of Node Page Template.
This little module makes it possible to configure a page template per content type and per node. It also makes a node template suggestions based upon that page template.

Default theme function makes an Node template suggestion per content type and per node, and this adds a Page template suggestion. When 'Default' is selected, there is no additional suggestion.

More information can be found at http://drupal.org/project/node_page

Happy theming.

AutomaticMenu module for drupal 6

Submitted by DenRaf on Thu, 09/03/2009 - 21:39

Last Monday I released a patch for AutomaticMenu to make it Drupal 6 compatible. While I was at it, I included i18n support, with the possibility to select a different parent menu item per language per content type. I use it at a customers site and no problems reported so far. You can find more information about the patch and the port in total at http://drupal.org/node/275889