Difference between revisions of "CF card"

From RobotinoWiki
(Creating a bootable USB Flash Drive)
 
(19 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
[[Image:cfcard_64.png]] Go to the [[downloads#CF card images|CF card images]] section on the [[downloads|download]] page.
 
[[Image:cfcard_64.png]] Go to the [[downloads#CF card images|CF card images]] section on the [[downloads|download]] page.
  
== Creating a bootable USB Flash Drive ==
+
==Write images to CF cards using Windows==
=== Prerequisites ===
+
'''Tested with Windows XP 32bit and Windows 7 64bit'''
You will need the following for updating/installing RobotinoOS on the CF card using a USB
 
# A USB Flash Drive. Minimum size 512 MB
 
# Windows machine to build a bootable USB
 
  
=== Required downloads ===
+
Download the latest stable binary of [http://www.chrysocome.net/dd 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 with Administrator rights (use Ctrl+Shift+Enter when executing cmd) and go to the directory you unzip dd-for-windows to.
# [http://sourceforge.net/projects/core2usb/ Core2USB] - For creating a USB bootable device.
 
# CorePlus-remastered.iso - A very small (64MB) linux distro for the USB.
 
# robotino.zip - Which contains required scripts and executables.
 
# Robotino CF Image - If you have a 1GB CF Card, then download this image or if you have a 4GB CF Card, then download this image.
 
  
=== Procedure ===
+
Invoke '''dd-removable.exe --list''' to get a list of removable drives.
==== Step 1 ====
+
[[Image:Dd-for-windows-list.png|right|thumb|200px|dd-removable --list output]]
Format your USB flash drive with a FAT32 filesystem
 
==== Step 2 ====
 
Run core2usb.exe. Browse and select the CorePlus-remastered.iso. Select your USB flash drive in the second box. When done, click Install.
 
==== Step 3 ====
 
Now navigate to your newly created bootable USB Flash Drive and unzip the robotino.zip in the root directory. If done correctly, your USB should have a new folder at F:\robotino (F on our computer, this could be different for you)
 
==== Step 4 ====
 
Copy the downloaded Robotino CF image file to the robotino folder. If done correctly, your Robotino CF image file should be at F:\robotino\Robotino_CF_Image_V30RC1_20120402_4GB.dd.gz. Your bootable USB Flash drive for updating/installing the latest Robotino CF image is now ready.
 
==== Step 5 ====
 
If you have an older version of Robotino i.e. Robotino V1, then skip to Step 6.
 
  
<gallery>
+
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.
VIA_bios_boot.jpg|Robotino v1 - Select "Boot device prority"
 
VIA_bios_boot_priority.jpg|Robotino v1 - Configure boot devices
 
</gallery>
 
  
==== Step 6 ====
+
To write the dd-image from above you download the image, use [http://www.7-zip.org/ 7zip] to uncompress the gzipped image and then invoke
If you have a newer version of Robotino i.e. Robotino V2, then go to Step 5.
 
  
<gallery>
+
'''dd-removable.exe bs=16M if=image.dd of=\\?\Device\Harddisk3\Partition0 --progress'''
AMD_bios.jpg|Robotino v2 - Select "Advanced BIOS Features"
 
AMD_bios_advanced.jpg|Robotino v2 - Configure boot devices
 
</gallery>
 
  
 
==Post install==
 
==Post install==
Line 52: Line 29:
 
# Tell Robotinos BIOS to boot from USB stick
 
# Tell Robotinos BIOS to boot from USB stick
 
# Execute ATCFWCHG.COM /S /F
 
# Execute ATCFWCHG.COM /S /F
 
==Write images to CF cards==
 
===Windows===
 
'''Tested with Windows XP 32bit'''
 
 
Download the latest stable binary of [http://www.chrysocome.net/dd 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.
 
[[Image:Dd-for-windows-list.png|right|thumb|200px|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 [http://www.7-zip.org/ 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.
 
 
[[Image:cf_card_partimage.png|right|thumb|200px|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.
 
 
<pre>tune2fs -c 1 -i 0 /dev/sdx1</pre>
 
 
Give the partition the label root.
 
 
<pre>tune2fs -L root /dev/sdx1</pre>
 
 
Use partimage to write the image to the CF card.
 
 
<pre>partimage restore -b /dev/sdx1 Robotino*.img</pre>
 
 
Mount the just written partition.
 
 
<pre>mount /dev/sdx1 /mnt</pre>
 
 
Save the menu.lst. It will be overwritten in the next step.
 
 
<pre>cp /mnt/boot/grub/menu.lst /tmp</pre>
 
 
Use grub to install the bootloader.
 
 
<pre>grub-install --root-directory=/mnt --recheck /dev/sdx1</pre>
 
 
Restore the menu.lst.
 
 
<pre>cp /tmp/menu.lst /mnt/boot/grub/</pre>
 
 
Unmount the partition.
 
 
<pre>umount /mnt</pre>
 
 
Do a filesystem check.
 
 
<pre>fsck.ext3 -y /dev/sdx1</pre>
 
  
 
==Where to buy CF cards==
 
==Where to buy CF cards==

Latest revision as of 16:09, 2 May 2013

Download

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

Write images to CF cards using Windows

Tested with Windows XP 32bit and Windows 7 64bit

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 with Administrator rights (use Ctrl+Shift+Enter when executing cmd) 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 bs=16M if=image.dd of=\\?\Device\Harddisk3\Partition0 --progress

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

Where to buy CF cards