Installing Debian Squeeze on the Dockstar

One of the neatest things about the Dockstar (besides that it’s a really cheap, embedded Linux box), is that you can install a build of Linux onto a USB stick or MicroSD card and have the Dockstar boot from that.  With this full-blown Linux distro, you can essentially make the Dockstar do whatever you want!  Plus, installing Debian Squeeze onto the Dockstar is incredibly easy.  It does have two prerequisites though, you need to have a new U-Boot installed (see Dockstar U-Boot Replacement) and you need to have a serial header added to the Dockstar (see Adding a Serial Header to the Dockstar) as the whole Debian Squeeze installation is performed via the console (ttyS0).  Oh yeah, you also need an ethernet connection that has access to the internet.

Grab a 2GB or larger USB stick (or microSD card if the microSD slot mod has been performed) and insert it into the Dockstar.  You can get away with a 1GB card, but it’s barely big enough to fit the base system. Attach the SuperDroid serial cable and set up your terminal for 115200, 8-N-1.

We’ll be using TFTP for grabbing the boot image (uImage) and the ram disk image (uInitrd), so you’ll need to have a TFTP server up and running.  I use Tftpd32 for Windows.  Download those images by clinking the links above and save those to the Tftfp32 directory it’s serving up.  Alternatively, you can download newer installer images from a Debian Squeeze mirror in a directory similar to this one: Debian Squeeze Netboot Images for Marvell Kirkwood SheevaPlug.

Now, plug the Dockstar in.  U-Boot will display a message on the serial console saying to press a key to interrupt booting, so press a key to stop the normal boot.  We just need to set up some environment variables and then start the install.

At the “Dockstar >” prompt, type in the following:

setenv bootargs 'console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most'

That needs to be all on a single line.

Now, type in the following:
setenv mainlineLinux yes

and

setenv arcNumber 2097

Save everything by typing in

saveenv

Now it’s time to start the installer. Setup TFTP booting with the following commands:
setenv ipaddr x.x.x.x
setenv serverip x.x.x.x
tftpboot 0x800000 uImage
tftpboot 0x1100000 uInitrd

where the argument for ipaddr is the ipaddress you want to assign to the Dockstar (make sure no other device has the IP address you assign to the Dockstar), serverip is the IP address of the computer tftpd32 is running on, and the other two commands load the linux installer images into RAM.

Once the images are loaded via TFTP, start the installer by typing in
bootm 0x800000 0x1100000

The installer will detect the USB stick or microSD card and then you can partition it however you like, however, I’d suggest choosing the “all files in one place” option unless you have a much larger card/stick. Choosing the default option will create an ext2 boot partition (since U-Boot doesn’t deal w/ ext3), an ext3 root partition, and a swap partition. Most of the installer is automated, but at some point you’ll need to interact with it. Depending on the speed of your internet connection and USB stick/microSD card, the install could take an hour or more.

When the installer is finished, it will ask to reboot. Allow it to reboot, and then stop U-Boot from booting as the boot command needs to be modified in U-Boot. U-Boot’s default boot command is expecting a /boot folder on the first partition. However, this is not how the default partitioning sets up the boot image. The boot image and the ram disk image are both located in the root directory on the 1st partition in the filesystem.

For the USB stick, type in the following to fix the usb_scan variable:

setenv usb_scan 'usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; fi; done'

That should all be a “single line” when pasted into the Dockstar terminal. Copy/paste that block of stuff into a text editor to make sure it is all in one, single line.

The next variable we need to fix is the usb_boot variable. Fix that by typing in the following (again all in one line):
setenv usb_boot 'mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /uImage; if ext2load usb $usb_device 0x1100000 /uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'

The usb_root variable needs to be modified with the following so that the correct partition is mounted as the root partition:

setenv usb_root '/dev/sda2'

And finally, modify the root_fs variable and then save the environment:

setenv usb_rootfstype 'ext3'
saveenv

Reboot the Dockstar and it should boot into your new Debian Squeeze system!

This entry was posted in Wifi Webcam. Bookmark the permalink.

3 Responses to Installing Debian Squeeze on the Dockstar

  1. nicole says:

    Just wanted to say thanks for posting this. These detailed instructions helped me save my dockstar!

    Really appreciate it!
    Nicole

  2. harold says:

    too many args max 16

    I can’t finish the loader

    • Andy says:

      Soo…..I have no idea as to which step you’re referring to, but I’d guess you’re missing a single quote somewhere in whatever you’re trying to do. Providing some background information on your setup, what you’re trying to do, and what step is actually failing for you would be more helpful.

      – Andy

Leave a Reply to harold Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.