User Tools

Site Tools


chumbyhackerboard:microsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
chumbyhackerboard:microsd [2010/09/16 11:26]
tz
chumbyhackerboard:microsd [2016/01/28 18:05] (current)
Line 1: Line 1:
-==== MicroSD HowTo ==== +====== ​Moved! ======
- +
-(in process - feel free to clean and edit) +
- +
-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. +
- +
-=== Cloning / Copying === +
- +
-You can clone the iG original microSD card to any same or larger card.  The easiest 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. +
- +
-NOTE: DD IS DANGEROUS SINCE IT ACCESSES THE HARDWARE DIRECTLY - YOU CAN END UP OVERWRITING YOUR WINDOWS DRIVE IF YOU AREN'T CAREFUL. ​ Make sure everything is backed up or you know exactly what you are doing. +
- +
-Usage: 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 if=/​dev/​sda,​ and of=/dev/sdb but I would still check /​proc/​partitions +
- +
-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. +
- +
-=== 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. +
- +
-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 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.+
  
 +This tutorial has moved to [[http://​learn.adafruit.com/​chumby-hacker-board/​sd-card|http://​learn.adafruit.com/​chumby-hacker-board/​sd-card]]
/home/ladyada/public_html/wiki/data/attic/chumbyhackerboard/microsd.1284636396.txt.gz · Last modified: 2016/01/28 18:05 (external edit)