The easiest way to do things for now is to use a linux machine or a bootable linux CD/DVD, or even a virtual machine running under Windows. Macintosh has most of these commands available too in a root window. Some things can be done on the Chumby hackerboard itself since dd (and fdisk) might be available.


The original image is available from a link off the forum:

An earlier message references windiskimager:

The image in the .zip file has the partition table overlap problem, but it should be the original boot image.

You can clone the 1G original microSD card if you have made modifications or otherwise don't want to use the image file. It can be written to any same or larger card. The standard way is to use "dd". Google "dd windows" for a version that works there, but basically you need to do a byte-for-byte image copy from the original device to the new one. You probably also want to make a backup of the card as well.

Cloning can be done on the hackerboard itself if you have a USB to microSD adapter. This will be something like:
dd if=/dev/mmcblk0 of=/dev/sda bs=64M
Since the board uses mmcblk0 for internal flash.

dd if=/dev/sdX of=/dev/sdY bs=64M
Windows will have something different for the /dev entries. /dev/sdX is the original card. Under linux, if you do "cat /proc/partitions" you will find a list - /dev/sda is typically your system drive. You can do this before inserting the original card, then look what appears after about 10 seconds - the new partitions will be from the new drive, which should be the chumby hacker image. You can also do it directly on the Chumby - in this case the values should be if=/dev/mmcblk0, and of=/dev/sda but I would still check /proc/partitions to see what was there.

If you can access your main hard drive, I would first back things up (if you have 1G of free space) by using dd, "dd if=/dev/sdX of=/media/c-drive/chb.img bs=64M". /media/cdrive is wherever the hard drive shows up under linux, or something like "C:\chb.img" under windows. This will create an image file of the uSD so it can be restored if anything goes wrong. The "bs=64M" copies 64 megabyte chunks which will be a lot faster as it normally copies bytes. Then you can remove the chumby SD and insert the clone target and just reverse "if" and "of": "dd if=/media/c-drive/chb.img of=/dev/sdX bs=64M". Then test the clone.

You can also do so with the rom image:
dd if=rom-falconwing.img of=/dev/sdX bs=64M

Fixing the partition table

Before you can change the partition sizes you need to fix the partition table.

The limited fdisk on the Chumby hacker board can't be used for this - you will need to boot into linux.

(note, it is probably easier to patch a few bytes with a hex editor, especially the original - I need to compare the original with the fixed MBR table and document the changed bytes in the first partition entry).

Reinsert the clone after the copy (remove and reinsert to get the updated disk structure). Run "fdisk /dev/sdX". This is a basic partition editor. It will complain because the structure is broken. Type "p" to print. You will see the first partition overlaps the next two. do "d" then "1" to delete the partition from the table (it isn't reformatted or anything), then "n", "p", it will default to partiton 1, then use the defaults for first and last. Do "t" then "1" then "53(return)" to reset the type, type "p" to see the changes (no overlaps!), then "w" to write it to the disk.

Resizing the partitions

I use gparted, available on some bootable fixit CDs or almost every bootable linux CD or USB stick.

Partition 4 is the extended container, and within, partition 6 is the "storage" partion". You will first need to move and/or resize partition 4 to make partition 6 larger. I would suggest also moving it on larger cards so you can make the other (root) partitions larger too.

Run gparted from the menu or "sudo gparted /dev/sdX" from the command line. Click on partition 4 and do move/resize, and slide it to give free space before if you want to expand the other partitions, but make sure it ends at the end of the disk. Then select the storage partition within and stretch it to the end of the new space. Tell it to apply changes.

I have a 16Gb image with plenty of room for everything.

(Note from BBotany on a different route to expanding the filesystem.) If you are working on a system that does not contain gparted, it is possible to use cfdisk to expand the final partition. Simply select the partition, and apply the "maximize" option. This will also extend the extended partition container (aka "partition 4") automatically. However, you will need to resize the filesystem that is on the partition separately; it is easy to use "resize2fs" to do this. If this is not on the machine you changed partition sizes on (or you forgot to expand the filesytem before reinserting the SD card in the hackerboard), it is present on the hackerboard by default. After the partition table has been modified, simply run resize2fs on the partition. If you are on your own linux host, you presumably know where this is. If you are on the hackerboard itself, then the commands are as follows: unmount the partition with "umount /mnt/storage/", run the resize as: "resize2fs /dev/mmcblk0p6", and then remount it with "mount /mnt/storage/". When I upgraded to an 8GB SD card, this gave me a /mnt/storage of 6.4GB.

This guide was first published on Dec 12, 2012. It was last updated on Dec 12, 2012.

This page (SD Card) was last updated on May 05, 2021.

Text editor powered by tinymce.