Montag, 1. November 2010

Use GIT on WebDAV (e.g HiDrive)

I have worked a long time with SVN and now for me was the time to switch to GIT, because GIT offers a lot of possibilibtys I have choose the option to but my remote Retro on WebDAV in this case the HiDrive from Strato.

1.) Install a GIT Client
For Windows I choose "Git for Windows (msysGit)" together with "TortoiseGit" for any other system install the simple GIT Envoriment and it should worked the same way.

Git for Windows (msysGit):


After you install "msysGit" a small Command Window will show up, you can leave this window open, because we need it or you can open it later manual.

2.) Create a WebDAV User
For HiDrive User, you need to create a new User give him a name like "test-git" and also use a email address, so you will get a notice when you a about to reach the limit.

The User should only has access to WebDAV over SSL, so make sure you check "Use only secure connections" like in the screenshot.

For any other system, make sure that the folder is only avalible over WebDAV and it has a Username and Password.

3.) Prepare a remote GIT folder
Because in most of the case we have no GIT Tools on the Server, we will prepare the remote GIT folder on the local maschine.

On Windows execute the Script "C:\msysgit\msysgit\msys.bat" and a command line should show up.

For other system you have already a shell like bash, sh or any other shell.
Here you go to the location where you want to create the remote GIT folder, please keep in mind you can remove it from your pc after all is working fine, so it could be a temp directory.

$ cd d:

$ cd TEMP/git-example/


When you are in the folder, simple create your remote GIT folder with .git at the end and go into this folder, for e.g:
$ mkdir myfirstGIT.git

$ cd myfirstGIT.git/


After this we need to init the GIT default files with the simple command "git --bare init" for e.g:
$ git --bare init
Initialized empty Git repository in d:/TEMP/git-example/myfirstGIT.git/

To make it clear that this is a remote folder, we need to use the additional command "git update-server-info" for e.g:
$ git update-server-info -f

4.) Upload the prepared folder to the WebDAV location
After you prepared the folder, you can simple copy it to the WebDAV location.
You can simple mount the WebDAV URL and move the folder to this location.

5.) Testing
After you do this, we will test this if all is working correct.

5.1 Create local Git repository
Simple create a local folder, select the folder and then use Git Create repository here from the "TortoiseGIT".

5.2 Copy example files and Commit
After this go into this folder and copy some small files in there.
Then click the right mouse button and select Git Commit > "master", it could be that the tools asked you for your Name and Email so that it is clear who submit the file.

As Message, simple use "My Git Test" and select all file and click on "OK".
5.3 Add the remote repository (WebDAV location)
Now we will add the remote repository, simple go to the TortoiseGit Config to Git -> Remote here you enter the following informations:

Remote: e.g. GITTest
URL: https://[WebDAV Username]:[WebDAV Password]
[WebDAV Username]/[GIT Path] e.g:
Putty Key:

After this simple click on "Add New" and it should be in the list now.

5.4 Submit files to the remote repository
Go back to the folder with the examples files and press the right mouse button and select "Git Sync...", here select your entry under Remote URL.
When it not show up, click on "Manage" and repeat the step 5.3 close the window and open it again.
Because we have no Putty Key, we will uncheck the option, after this click on the "Push" Button.

When all is working fine you should see a message like the following:

5.5 Check out the files on the same or another PC
After this we will check if all is working correct, got into empty folder on your PC and try to use "Git Clone" to check out the remote files.

For the URL, use your WebDAV URL for e.g:
https://[WebDAV Username]:[WebDAV Password][WebDAV Username]/[GIT Path]

5.6 Compare the files
After you have Check out the files, compare them with your orginal folder, when they matched then all is working fine.

6.) Security
For a better security you can use the URL without the [WebDAV Username] and [WebDAV Password] .

Donnerstag, 8. April 2010

Install nice Bootscreen for Debian

1.) Install Splashy

In Debian you can simple Install Splashy with the following commands:
apt-get install bootsplash
apt-get install bootsplash-theme-debian

2.) Update your Initrd Image
update-initramfs -u -k

3.) Add Bootparameters to your grub configuration

You need to add theParameters "vga=791 splash" to the grub menu.lst that the Bootscreen show up.

Example Entry:
title Debian GNU/Linux, kernel
root (hd0,0)
kernel /vmlinuz- root=/dev/mapper/System-Aron--Root ro vga=791 splash quiet
initrd /initrd.img-

Reboot and try if it is working ;)

4.) Additional Information

Slashy Wiki:

Freitag, 2. April 2010

Install Debian on a ASUS Eee Box (EB1012)

The ASUS Eee Box is the ideal small home Server it needs less power and have a lot of features
  • Atom N330 1.60GHz
  • 2GB RAM
  • 250GB HDD
  • WLAN b/g/n
  • GB-LAN
  • HDMI
  • VGA
  • eSATA
  • 5x USB2.0
  • Cardreader
  • Windows 7 Home Premium

1.) Prepear System
You should first connect the keyboard, mouse and a monitor and start the System normal and wait until it performs all of the needed setup of Windows 7.

When the System is ready, run all updates, install a antivirus programm and then download and install DriveImage XML (Free Version) from .

With DriveImage XML you can make a Backup of your C: Partion, please choose the D: Parition as Destination for the Backup file.

You can compress the finished Backup with 7zip or other Packers to get a smaller file.
After this copy the file to a USB Stick and burn it to a DVD or save it on a Backupplace of you choice.

Because the ASUS Eee Box comes with no optical CD/DVD/Bluray Drive you can connect a USB CD/DVD/Bluray Drive or you need to use a USB Stick for the Installation.

2.) Get Debian and Install Debian
After this you need to download Debian (stable Version) for the USB CD/DVD/Bluray Drive or for the USB Stick.

I have use the DVD Version of Debian which you can download under the following location:

You only need to use the first DVD file debian-504-i386-DVD-1.iso.

For the USB Stick there a lot of Guides in the Internet even to prepare the USB Stick on Windows.

When you plan to use the ASUS Eee Box as DSL Router you need to use a additional USB Network Card, you need a USB Network Card for USB 2.0 because the USB 1.x versions are to low and will provide you only a max. 400 kb transfare rate (worse DSL 6000).

When you install the System, plugin all needed USB Device which you want to use on the System this includes the USB Network Card.

You can install the System as usally or with the standart features.
When the System is installed and the Debian is booting then you can go to the next step.

3.) Adjust the APT Sources
To get the lasted software and security updates we will add the APT Sources and choose the fasted one. You need to run the following commands:
apt-get install netselect-apt
cd /etc/apt
netselect-apt -n
apt-get update && apt-get upgrade

4.) Get the needed Informations for the right Kernel for the ASUS Eee Box
Normaly the current Kernel of the Debian Installation of to low for the Asus Eee Box and so we need to compile your own Kernel.

So we execute the following command:
# uname -a
Linux xxx 2.6.26-2-686 #1 SMP Tue Mar 9 17:35:51 UTC 2010 i686 GNU/Linux

2.6.26-2.686 is our current Kernel version, when your version is below 2.6.32.x or you want the best kernel for the ASUS Eee Box then you need to install your own kernel.

Check for needed Modules, run the following commands and copy the output of the "lspci -n" to the clipboard :
apt-get install pciutils
lspci -n

Past the results into the webpage to get a overview of the needed drivers.

You should get the following Informations:
PCI IDFunktioniert?HerstellerGerätTreiberkernel
nVidia CorporationMCP79 Host Bridge

nVidia CorporationMCP79 Memory Controller

nVidia CorporationMCP79 LPC Bridge

nVidia CorporationMCP79 Memory Controller

10de0aa2YesnVidia CorporationMCP79 SMBusi2c-nforce2v2.6.30-
nVidia CorporationMCP79 Memory Controller

nVidia CorporationMCP79 Co-processor

nVidia CorporationMCP79 OHCI USB 1.1 Controller

nVidia CorporationMCP79 EHCI USB 2.0 Controller

nVidia CorporationMCP79 OHCI USB 1.1 Controller

nVidia CorporationMCP79 EHCI USB 2.0 Controller

10de0ac0YesnVidia CorporationMCP79 High Definition Audiosnd-hda-intelv2.6.24-
nVidia CorporationMCP79 PCI Bridge

10de0ab8YesnVidia CorporationMCP79 AHCI Controllerahciv2.6.24-
nVidia CorporationMCP79 PCI Express Bridge

nVidia CorporationMCP79 PCI Express Bridge

nVidia CorporationMCP79 PCI Express Bridge

nVidia CorporationION VGA

10ec8168YesRealtek Semiconductor Co., Ltd.RTL8111/8168B PCI Express Gigabit Ethernet controllerr8169v2.6.25-
168c002bYesAtheros Communications Inc.AR9285 Wireless Network Adapter (PCI-Express)ath9kv2.6.29

Here you see that we need the following driver in the kernel to use all the features of the ASUS Eee Box:
  • i2c-nforce2 - SMBus
  • snd-hda-intel - Soundcard
  • ahci - Serial ATA Controller
  • r8169 - Gigabit Ethernet Controller
  • ath9k - For the Wireless Network Adapter
5.) Download and unpack the Kernel for the ASUS Eee Box

I choose the Kernel for this, but you can use the current stable version from as well.

To download the Kernel we execute the following commands:
cd /usr/src/
apt-get install bzip2
tar xfvj linux-

6.) Copy the current Kernel config as basis for the new one

To save some work, we use the current Kernel config as basis for the new one, this can be done with the following commands:
apt-get install build-essential libncurses5-dev libncurses5
cp /boot/config-$(uname -r) /usr/src/linux-
cd /usr/src/linux-
make oldconfig

It will asked some question, but simple press Return to all of this question.
But when you want to answer all of this you can also answer most of them.

After this we will run the command "make menuconfig" to enter the kernel config menu and adjust the needed parts.

In the menu go to "Load an Alternate Configuration File" and click "ok".
After this we adjust the following Parts:
Processor type and features - Processor family - Intel Atom - MATOM [=y]
Processor type and features - Maximum number of CPUs - NR_CPUS [=4]
Device Drivers - Network device support - Ethernet (1000 Mbit) - Realtek 8169 gigabit ethernet support - R8169 [=y]
Device Drivers - Network device support - Wireless LAN - Atheros Wireless Cards - ATH_COMMON [=m]
Device Drivers - Network device support - Wireless LAN - Atheros Wireless Cards - Atheros 802.11n wireless cards support - ATH9K [=m]
Device Drivers - Serial ATA and Parallel ATA drivers - AHCI SATA support - SATA_AHCI [=m]
Device Drivers - I2C support - I2C Hardware Bus support - Nvidia nForce2, nForce3 and nForce4 - I2C_NFORCE2 [=m]
Device Drivers - Connector - unified userspace <-> kernelspace linker - CONNECTOR [=y]
Device Drivers - SCSI device support - SCSI device support - SCSI [=y]
Device Drivers - SCSI device support - SCSI low-level drivers - iSCSI Initiator over TCP/IP - ISCSI_TCP [=y]
Kernel hacking - Kernel debugging - DEBUG_KERNEL [=n]
Cryptographic API - CRC32c CRC algorithm - CRYPTO_CRC32C [=y]

This are the needed driver for the Asus Eee Box after this save the new configuration.

7.) Compile the kernel

To compile the kernel run the following commands:
make -j4
make -j4 modules
make -j4 modules_install
make install
update-initramfs -c -k
ln -s /usr/src/linux- /usr/src/linux

The "-j4" switch is that "make" will use all 4 CPU cores instead of one.
But it will take about 1 hour until the "make" command is finished, so take a break. ;)

8.) Edit grub menu.lst
Edit the file "/boot/grub/menu.lst" and copy the existing entry and adjust the entry so that it fit to your new kernel for e.g:

## ## End Default Options ##

title Debian GNU/Linux, kernel
root (hd0,0)
kernel /vmlinuz- root=/dev/mapper/System-Aron--Root ro quiet
initrd /initrd.img-

Reboot the System and when all is working fine be happy. ;)

9.) Setup ASUS Eee Box as Access Point for WLAN

Unforently the current packet of hostapd is not compatible with the ASUS Eee Box and so we need to compile our own version.

So we need to download the lasted version from with the following commands:
cd /usr/src/
tar xfvz hostapd-0.7.1.tar.gz
cd /usr/src/hostapd-0.7.1/hostapd
cp defconfig .config

The Version 0.6.10 has a BUG and so we use the Version 0.7. 1 instead !
Then edit the .config file and remove the # before "CONFIG_DRIVER_NL80211=y".
After this you need to run the following commands:
apt-get install libnl-dev libcurl4-openssl-dev hostapd wireless-tools
make -j4
make install
mv /usr/local/bin/hostapd /usr/sbin/hostapd

We install the Debian hostapd packet first to get a default init.d script and a configuration file.

After this we edit the file "/etc/default/hostapd" and set remove the # before ...RUN_DAEMON="yes"...

Then you need to adjust the Configuration file /etc/hostapd/hostapd.conf with some parameters:

Adjust the Network Config file for the Interface "wlan0" and add the following entry:
# Wlan Interface
auto wlan0
iface wlan0 inet static

Then you can try to start the Access Point with the following Command:
ifconfig wlan0 up
iwlist wlan0 scan
hostapd -dd /etc/hostapd/hostapd.conf

It will display you all Error Messages or error which are needs to be fixed before the Access Point can be running.
With "iwlist wlan0 scan" you scan for current WLANs, so don't worry if it doesn't return any result.
When you can see your wlan and all ist working correct, restart the System to check if the automatic configuration is working complet.

10.) Some Security advise before you connect the Box to the Internet

- Set up a firewall with iptables
- Change the standard port of ssh to a Port above 4096 (/etc/ssh/sshd_config)
- Install harden tools for e.g: "apt-get install harden-servers"
- Remove unneeded Tools and Services

11.) iSCSI Support for the Box
When you need iSCSI for the Box you need to compile this package as well from the source.

To do this you can use the following steps:
apt-get install subversion
cd /usr/src/
svn co iscsitarget
cd iscsitarget/trunk/

Edit Makefile and remove the # before ...export KSRC := /usr/src/linux... and then run the follwing commands:

make -j4

mv /lib/modules/extra /lib/modules/
modprobe iscsi_trgt

Then you can configure the iSCSI Configuration and it should worked without any problems with your new kernel.

Sonntag, 10. Januar 2010

Dokan SSHFS under Windows 7 (Run Applications in 32bit mode under Windows 7 64bit)

Yes it is also possible to run Dokan under Windows 7, there are only some hurdles.

When you have Windows 7 32Bit, you only need to install it the common way and set the comapility mode to "Windows Vista SP2".

But when you have Windows 7 64Bit you need to force the application to run in 32Bit mode.
For this you need to do the following steps.

1.) Download the Windows 7 SDK Installer:
2.) Run the Installer and uncheck everything except ".NET Development Tools" (Developer Tools -> Windows Development Tools -> .NET Development Tools)

3.) Open a Windows Shell as Admin ([Start] -> execute -> cmd.exe (rightclick - execute as administrator)) and open a Windows Explorer Window (Windows + E).

Now go in the Windows Explorer to the Location C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin and draw the CorFlags.exe into the Windows Shell.

Add a space after the line and go to the Dokan SSHFS directory (C:\Program Files (x86)\Dokan\DokanSSHFS) and draw it on the same DOS Box.

Add the following command " /32BIT+" and your DOS Box should now look like the following:

C:\Windows\system32>"C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\CorFlags.exe" "C:\Program Files (x86)\Dokan\DokanSSHFS\DokanSSHFS.exe" /32BIT+

When you now press enter the SDK change the Core Flags that this Application run in 32Bit Mode.

Now you can start Dokan SSHFS also under Windows 7 without any Problems.

This little trick will also worked for other Applications and Tools, so it is a good Idea to keep the SDK installed when you have Problems with other Applications or Games.