Rescue system for use with USB sticks and TFTP

I've made a few small changes to the buildroot configuration to produce a rescue system which runs in RAM and can be loaded from USB or the network. The zip file contains the kernel "uImage-rescue" and the root filesystem "uInitrd-rescue". It also contains the modified buildroot configuration and corresponding md5 hashes for file integrity verification.

Booting the rescue system is accomplished by using uBoot to load the kernel and the root filesystem into RAM and calling bootm with the two addresses. For example, the following sequence will load the rescue system from the root directory of an ext2 (or ext3) formatted USB stick (in position 1):

Another option is to simply rename the files to uImage and uInitrd and place them in the root directory of an ext2 (or ext3) formatted USB stick. Jeff's boot loader configuration will then load the rescue system like a normal USB-installed system.

where 10.0.0.3 is the IP address of the Dockstar, 10.0.0.2 is the IP address of the machine which displays the console output and 12:23:34:45:56:67 is the MAC address corresponding to that machine. Replace these values with the ones which are right for your network.

Since the system runs completely in RAM, all changes are lost after a reboot. This includes password changes and the autogenerated SSH host keys. The result is that the only user "root" always uses the password "root" and the host keys are always different, which triggers a security breach warning in the SSH client. Under these circumstances, SSH can not prevent man-in-the-middle attacks and anyone who can guess the root/root login can get full control over your Dockstar. You should therefore not use this system when TCP port 22 on the Dockstar can be reached from a public network (the internet, open wireless LAN, etc.).

Permission granted to download the file and host it here. It's all open source anyway. I only changed a few configuration options to get Initrd support and a cpio.gz of the root filesystem. I also removed two unneeded gettys and a useless tail process from inittab and /usr/sbin/debootstrap and /usr/share/debootstrap because they didn't work. Your debian installation script reinstalls working versions on demand. The modified buildroot configuration is in the archive.

The buildroot configuration now comes with a patch which must be applied to the buildroot environment to prevent it from overriding the initial ramdisk support in the kernel configuration. The only other change is that I added microperl to the selection of packages.

How to use Knoppix 6.2 and buildroot-dockstar-rescue_2010-10-29.tgz to compile your own kernel/initrd: (some Unix knowledge required)

You'll need about 4GB of hard disk space and the computer will be busy for hours.

Knoppix 6.2 is based on Debian and comes with package management tools, but since it's tuned for live-CD usage, there's a little tweaking to be done beforehand.

First become root:

su

Then use your favorite editor to edit /etc/apt/apt.conf.d/00knoppix and add this "APT::Cache-Limit 40000000;" (without the quotes).
Then:

apt-get update
apt-get install flex bison uboot-mkimage

Now you'll need to mount a filesystem with at least 4GB of free space. For example, mkdir /buildroot ; mount /dev/sda1 /buildroot ; cd /buildroot. If you're using a fresh virtual hard disk in a VM, you'll have to use fdisk and mkfs with appropriate parameters first.

Get the ZIP linked at the top of this comment and unpack it: unzip dockstar-rescue-system_2010-10-29.zip
Get the buildroot distribution from http://buildroot.uclibc.org/downloads/buildroot-2010.08.tar.gz
and unpack it: tar xzf buildroot-2010.08.tar.gz
cd buildroot-2010.08
Unpack the buildroot configuration: tar -xzf ../buildroot-dockstar-rescue_2010-10-29.tgz. That will give you a subfolder called "custom". Apply the patch: patch -p1 -i custom/buildroot-patch
Copy the configuration: cp custom/buildroot-config .config

The next step (literally) takes hours and fills 4GB of hard disk space: make

When it's all done, the kernel is in output/images/uImage (in ready-to-use uboot kernel image format) and the other files in output/images are the root file system in various forms. The rootfs.cpio.gz one is almost ready to be used as ramdisk. To use it with uboot, add the necessary header:
mkimage -A arm -O linux -T ramdisk -C gzip -a 0 -e 0 -n initramfs -d output/images/rootfs.cpio.gz output/images/uInitrd

I have installed openwrt (with their bootloader) but can't get it to work the way I wanted so I decided to switch to debian, however I can't seem to install your uboot that uses usb so I'm trying to do this restore so that I can run dockstar.debian-squeeze.sh

I have transferred the rescue files to an ext3 usb drive but it doesn't seem to be able to access the files, though it does show that it can see the partition so I tried doing wget from dropbox but I just get all these errors, my goal is to just get the correct bootloader and get squeeze on so I can run usbip on my dockstar.

I solved my issues by installing mtd-utils in my openwrt installation which finally allowed the uboot sh script script to change things inside of openwrt, then went in with a serial connection and got the rescue system running in memory and then got debian installed with the sh script.

I received a refurbed (and not properly booting) dockstar off ebay, got it hooked up to serial and want to load the rescue system in memory so that I can then install it onto the flash but I am receiving this error when the ram rescue image boots

(I assume this is the best method to eventually get to the point that I can run debian from a flash drive, the dockstar currently won't get past the original uboot, but stops with some crc error when it tries to boot pogoplug, this is how I received it.)

Those 3 arc numbers are respectively the "Generic Pogoplug ID", which doesn't support the dockstar led, the "Dockstar ID" and the "Goflex Net ID". The last two only works with newer kernels that now have support for those arcNumbers.

It should normally always work using the first one. The latter can only be used if you can provide a recent kernel.

I know this is old but there might be some others with the same problem. I was having a weird time getting an updated uboot on my dockstar. I could only get the original -- everything else failed to run. Until I tftp'd Davys uboot from uboot. This got me a usb bootable device where I loaded this rescue disk.

I want to report that prior to that I had tried to load the ram version via the above tftp instructions and was hitting the same error regarding "unsupported" hardware. That's when it dawned on me that I should try tftp instead of jtag to update the uboot.

I had no fs on the unit so everything had to be done via the available channels.

I thought there was something wrong with the files because when I untarred the uboot it didn't match the description. But it still worked!

I have really tried hard to get my dockstar work again, but i'm a linux newbie. I'm sorry. I messed up pogoplug FW, I couldn't find the dockstar via Ethernet, but I'm lucky that I can login via serial TTL cable to the newly flashed and working uboot.

I stumbled to this thread after some very serious Googling about "How to UnBrick Dockstar".

Happened so far:

I got this Seagate DockStar from friend, who tried to install Debian into it but failed and was not any more interested to try again - so he gave this little gadget to me. I have no idea what he has done, but it seems that the DS is very dead :-(

I read this forum "from cover to cover" to learn what's going on with the box.

As you can see, after the initial power on the system does not boot in any way, just sit's in the uboot prompt flashing the green led (initializing phase?). I do not know if my friend destroyed the original firmware (done something with the NAND) or has he altered the environment parameters.

Anyway, I then found this forum post about rescue system than can be run from TFTP! Great, as I do have serial connection, TFTP server and all needed files downloaded from the link in the original post.

I do have the ID set to "2097" as can be seen in the environment print out.

While trying to understand what went wrong I noticed there are updated files available also for this TFTP rescue, or not "File not foud" when trying to download.

I'm stuck - so, are there newer post somewhere deep inside this forum that I just not haven't found that could help me more? Or is there another way to restore full original DockStar firmware, environment setting, kernel and all nand partition so that I could start over without trying to figure out what the heck has this little gadget done.

Please, enter the code that you see below in the input field.
This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right.
If you enter the wrong code, a new image is created and you get
another chance to enter it right.