CF card

From RobotinoWiki
Revision as of 15:29, 4 April 2012 by Indorewala (talk | contribs) (Prerequisites)

Download

Cfcard 64.png Go to the CF card images section on the download page.

Setup Robotino's BIOS to boot from USB stick

Prerequisites

You will need the following for updating/installing RobotinoOS on the CF card using a USB

  1. A USB Flash Drive. Minimum size 512 MB.
  2. Windows machine to build a bootable USB

Creating a bootable USB Flash Drive

  1. First download this ZIP file
  2. Unzip the contents of the ZIP archive in your USB

Robotino V1: BIOS Setup for USB Boot

Robotino V2: BIOS Setup for USB Boot

Post install

When getting a new CF card with an installed Robotino OS or after writing an OS image to a CF card

  • After power on Robotino the first time it might switch off automatically. This is due to a filesystem check. Simply power on again and everything works fine.
  • From Robotinos Display select Network->WLan->Search AP. If an Allnet-AP is found (the AP in all newer Robotinos) then /etc/robotino/ALLNET_AP is written and WLan channel and SSID are shown correctly in the startup screen.

Set the fixed bit on consumer CF cards

Most consumer CF cards are detected as removable media and not as harddisk, i.e. you can not boot from these cards. For SanDisk cards there is a tool to set the fixed bit on the CF cards so that they are detected as harddisks (this only works for SanDisk cards with Firmware Version HDX < 5.00).

  1. Get a USB stick
  2. Use UNetbootin to install FreeDOS to the USB stick
  3. Download SanDisks ATCFWCHG.com from the internet
  4. Copy ATCFWCHG.com to the USB stick
  5. Tell Robotinos BIOS to boot from USB stick
  6. Execute ATCFWCHG.COM /S /F

Write images to CF cards

Windows

Tested with Windows XP 32bit

Download the latest stable binary of dd-for-windows (this was 0.6beta3 when last updating this pacge). Unzip the package. Rename dd.exe to dd-removable.exe. This will prevent dd from messing up anything else than removable drives. Start a command prompt and go to the directory you unzip dd-for-windows to.

Invoke dd-removable.exe --list to get a list of removable drives.

dd-removable --list output

My CF card is visible as \\?\Device\Harddisk3\Partition0. I know this from the fact that if I remove the CF card from the USB card reader and invoke the --list command again the entry is gone. Another indication is the size is 1048190976 bytes which fits my 1GB CF card.

To write the dd-image from above you download the image, use 7zip to uncompress the gzipped image and then invoke

dd-removable.exe if=image.dd of=\\?\Device\Harddisk3\Partition0 --progress

Linux

On Linux you can either use dd or partimage. With partimage you are able to write images to CF cards that differ in size from the original cards. You might write the 1GB image to any card bigger than 1GB. You are also able to partition the CF card fitting your needs.

Get partimage. Get the image file.

cfdisk

Use cfdisk to partition your CF card. The first partition must be at least the size of the uncompressed image. Mark the partition as bootable.

In the following /dev/sdx1 is the first partition of you CF card. You have to replace the x with what you find on your system.

Set the max mount count to 1 and the check interval to 0.

tune2fs -c 1 -i 0 /dev/sdx1

Give the partition the label root.

tune2fs -L root /dev/sdx1

Use partimage to write the image to the CF card.

partimage restore -b /dev/sdx1 Robotino*.img

Mount the just written partition.

mount /dev/sdx1 /mnt

Save the menu.lst. It will be overwritten in the next step.

cp /mnt/boot/grub/menu.lst /tmp

Use grub to install the bootloader.

grub-install --root-directory=/mnt --recheck /dev/sdx1

Restore the menu.lst.

cp /tmp/menu.lst /mnt/boot/grub/

Unmount the partition.

umount /mnt

Do a filesystem check.

fsck.ext3 -y /dev/sdx1

Where to buy CF cards