random findings by wt8008
RSS icon Home icon
  • Dockstar Running Debian

    Posted on November 13th, 2010 wt8008 No comments

    The Dockstar is a plug computer runs a Marvell 1.2GHz ARM processor with 128 MB RAM and 256 MB flash which stores it’s own variant of Linux. The boot loader on the device can be modified to boot off a USB stick, leaving the original Linux on the flash unmodified. Using Jeff’s guide it was possible to put Debian on a USB stick and boot from it easily.

    Before starting, since the device will phone-home, the hbwb process needs to be killed before connecting to the internet. Using the guide from ahsoftware.de, the process was disabled. The dockstar can be connected to an offline router with a DHCP server so that you can get its IP address. Otherwise without a DHCP server, it will asign itself an IP address of 169.254.x.y, where x, y are the last two bytes of the device’s MAC address. With the IP address, ssh into the device as root with the default password of stxadmin. The next step is to kill the hbwb process, remount / as writable, chmod go+w /dev/null, and modify the rcS init.d script to prevent hbmgr.sh from running. Remount / as read-only, and the device can then be restarted/halt.

    Next follow the instructions on Jeff’s site to partition a flash drive using fdisk(8). Then download and run his script to install Debian on the flash drive. After it is completed, if the Dockstar does not boot into Debian, reboot the device by using a pen/paper clip by pressing the reset button on the dockstar for a warm boot. Some flash drives such as Kingston’s have issues with cold booting.

    Cold Boot

    If you setup netconsole, you can see the boot messages from the dockstar and see where the cold boot fails with the usb drive. The first run of “usb start” causes the issue, so Mike on the fourms changed the uBoot options to re-start the USB every time the dockstar boots, essentially making every boot a warm boot to the USB thumb drive. Use fw_setenv to modify the variables.

    Applications

    Now with the armel version of Debian installed, the dockstar can run almost anything Debian can. (Ubuntu does not have armel repositories.) The exception is of course is the hardware. Speed of the flash drive can be come an issue, especially when writing many small files. There is no video output, but there is a serial console if you want to so some soldering. The current application for my dockstar is for running CUPS as a print server. Future applications I have in mind is a NAS type server. For now, I am using it to store my tomato CIFS bandwidth logs. It can also be a useful SSH server. Any applications which require 24/7 uptime can use the device, as it is also low power compared with a normal computer system. More applications and usages will come as I think of some as they are needed.

    References

    http://ahsoftware.de/dockstar/
    http://jeff.doozan.com/debian/

  • Tomato CIFS Bandwidth Logs Backup

    Posted on August 4th, 2009 wt8008 No comments

    As seen from my previous post, I have moved to Tomato firmware for my router. A feature that caught my eye was the ability to save bandwidth logs to CIFS (Samba shares). My ISP does not have any monthly bandwidth limitations, but I know some others in my area does, and this feature would be a must have for them. By default the bandwidth history is saved in RAM, and if the power goes out, then all the logs will be lost.

    On my Linux server, I created a new user (adduser(1)) with a default shell of /bin/false (/etc/passwd), and also a corresponding samba user (smbpasswd(1)). I configured the Samba share for that user with

    [tomato]
    path = /home/tomato
    public = no
    writeable = yes
    also, the server's global setting requires a security level of user
    [global]
    ...
    security = user

    On the router in Administration->CIFS Client, enable cifs1, for the UNC enter in the IP address, and share name. Do not use the hostname of the system.

    \\192.168.1.5\shared_example

    also enter in the username and password of the samba account that was created above. Hit save to mount the share, and after the 10 second countdown, you’ll see the total size of the mount, and the free space left.

    Now to enable the remote log saving. In Administration->Bandwidth Monitoring, change the save location to CIFS. I used the Create New File for the first time running it, but I am not sure if that option is necessary. Hit Save, and go to your share and see the backup log. The monthly start date can also be adjusted, for those who need to monitor monthly usage based upon an arbitrary day.

    Reference: http://www.wi-fiplanet.com/tutorials/article.php/3794171