Setting up a GIT repository on DD-WRT with USB storage

August 9, 2012 6 comments

I have an Asus WL-500G Premium v2 router that is underused 😉 I mainly used it for having my private network at work and to enable VPN access to it. I have been using GIT locally for version control on my projects. Yes I know I should put them on GitHub or similar repositories, but none all of then a open source.

The other day I was thinking (once in a while doesn’t hurt) and realized that I could use the USB ports on my router to store my coding projects. So, next you will find a howto install a GIT server on a DD-WRT based router. I don’t know if it is the more secure way of installing it, but at least it works and as my working place has a inbound firewall that only allows inbound connections though the VPN, then I don’t mind my colleagues access it and touch something.

Read more…

Categories: Linux Tags: , ,

Recover data after running “dd if=/dev/zero …” for a few seconds

May 11, 2012 4 comments

Friday morning working on installing OpenWrt pivot overlay on an USB pendrive. I need to format the USB and as I was doing it quite so many times I wasn’t paying too much attention. Don’t do that at home 😉

The USB was recognized as /dev/sdb1 on my laptop but on the router it was on /dev/sda1. As you have probably already guessed my main laptop hardrive was /dev/sda1.

I didn’t notice I wasn’t in the router console (f….. tabs) and after having successfully formatted the USB I decided to make it zero:

# dd if=/dev/zero of=/dev/sda1

I continue working on the laptop but when in typed ‘ls’ nothing is shown and even I got unknown command. Uppps… something is going wrong. I just realized I was formatting my hard drive in stead of the USB.

Advice (take it if you want): In case this happens to you, press Ctrl+C as soon as you can to minimize the overwritten and lost data.

Most of my work for the last few years was there, programs, repositories, configurations, … I thought I was not going to be able to recover anything. Luckyly I pressed Ctrl+C quite quickly and only 1Gb was set to zero. Not everything was lost 😉

So if you ever come to that, don’t panic. You can at least recover what was not overwritten with 0, and even part of that I think it can also be recovered.

Next I’m explaining how I did it. It is quite short and easy procedure.

Read more…

Categories: Linux Tags: , ,

Customize Voyage Linux image

November 14, 2011 2 comments

As of my later post, you get the Voyage SDK or default distribution installed on a hard disk, compact flash, etc. However, many times is it required to perform some customizations. These can be done once the system is installed and then creating an image of the whole system using dd for instance. But you might want to customize it and have an iso image created from scratch and without having to deal with a real system.

This tutorial is a mixture of both approaches, as at the beginning it is explained who to compile and install new applications or kernel, to end with the building of a Live CD, a tar.bz2 distro, etc. using Debian Live.

Read more…

Categories: Linux Tags: , , , ,

Installing Voyage Linux SDK

November 14, 2011 1 comment

Voyage Linux is Debian derived distribution that is best run on a x86 embedded platforms such as PC Engines ALIX/WRAP, Soekris 45xx/48xx and Atom-based boards. You can also run it on ordinary computers, but for that environments there are other more powerful distributions which you probably already know.

This tutorial tries to show how to install this environment on a board or PC environment. It is starting with the installation of the SDK as the basic environment for the latter customization that is done on the system.

Some of information is available on the Voyage Linux site. Part of it, mainly some installation procedures, is replicated in this howto (for the shake of my own order). However for the customization no information is included on the main site, so I hope the information included here will help you out.

Read more…

Categories: Linux Tags: , ,

How to recover grub in Ubuntu

September 16, 2011 Leave a comment

Sometimes after a kernel upgrade, I don’t know why, the grub is not updated properly and then it is not possible to boot the system. Here it comes the way to solve this problem quite easily.

Use a LiveCD or a Rescue Mode to have access to the hard drive that holds the OS you are not able to boot.

Once logged in, chroot your former system.

$ sudo -i
# mkdir /mnt/chroot
# mount /dev/sda1 /mnt/chroot                <--- replace sda1 for your system partition
# mount -o bind /dev /mnt/chroot/dev
# mount -o bind /sys /mnt/chroot/sys
# mount -o bind /proc /mnt/chroot/proc
# chroot /mnt/chroot
# grub-install --recheck /dev/sda1
# update-grub

Then reboot and cross-fingers.

Categories: Linux Tags: , ,

Mobile IPv6 user space daemons for Android

September 12, 2011 36 comments

This tutorial shows how to build the MIPv6 implementation for an Android phone. I recommend to read a previous post on the issue, where it is explained how to compile and configure the for an ordinary (Ubuntu) Linux environment.

Initially I have tried to use the prebuilt Android toolchain and after a lot of time spent trying to patch the code to fit the Bionic and other libraries requirements, I started looking for alternatives.

Thanks to Christian Graffe, who in his post on the Nautilus6 forum, give me the hints on how to go on. The solution to almost all my problems was using the CodeSourcery ARM GNU/Linux toolchain, which I’ve already used in my initial steps but I didn’t realize to use for compiling UMIP.

Read more…

Categories: Android Tags: , ,

Mobile IPv6 user space daemons in Linux (Ubuntu)

September 11, 2011 7 comments

There are two mostly up to date distributions of MIPv6 userspace daemons based on MIPL 2.0.2.

  • UMIP supported by USAGI project [1][2]
  • version, which includes some patches on the UMIP v0.4 from USAGI project

Next it is described how to compile, install and perfom a basic configuration of both versions. It’s up to you to choose one or the other, but only one distribution can be installed on the system. version has more recent updates.

Read more…

Categories: Linux Tags: , , ,