<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reformat SD Card from petaLinux</title><link>https://community.element14.com/products/devtools/avnetboardscommunity/avnetboard-forums/f/general/37350/reformat-sd-card-from-petalinux</link><description>Hello. I believe an SD card has become corrupt, as the Microzed doesn&amp;#39;t boot up properly anymore. Normally, I&amp;#39;d just take it out, stick it into a card reader on windows or linux machine, and reformat it, but I cannot do that (I&amp;#39;m in a very controlled</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><lastBuildDate>Wed, 03 Dec 2014 06:09:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://community.element14.com/products/devtools/avnetboardscommunity/avnetboard-forums/f/general/37350/reformat-sd-card-from-petalinux" /><item><title>RE: Reformat SD Card from petaLinux</title><link>https://community.element14.com/thread/133719?ContentTypeID=1</link><pubDate>Wed, 03 Dec 2014 06:09:23 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a9540e31-78eb-4e2b-add5-1d0ae5383603</guid><dc:creator>Former Member</dc:creator><description>&lt;p style="margin:0;"&gt;Hi,&lt;/p&gt;&lt;p style="margin:0;"&gt;I haven&amp;#39;t tried this specifically, but if you can get PetaLinux (or any Linux) running from memory on the board, you should be able to repartition and format the microSD card using the same procedure we use to format eMMC memory.&amp;nbsp; Here&amp;#39;s the process:&lt;/p&gt;&lt;p style="margin:0;"&gt;1. Log into (Peta)Linux as root&lt;/p&gt;&lt;p style="margin:0;"&gt;2. Check that the microSD card is registered with the controller:&amp;nbsp; ls /dev/mmc*&lt;/p&gt;&lt;p style="margin:0;"&gt;You should see /dev/mmcblk0 at least, and possibly /dev/mmcblk0p1 if your card is not too badly damaged.&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;3. Use the Linux fdisk facility to create a new partition:&amp;nbsp; fdisk /dev/mmcblk0&lt;/p&gt;&lt;p style="margin:0;"&gt;This should give you a command prompt for fdisk.&lt;/p&gt;&lt;p style="margin:0;"&gt;4. At the fdisk command prompt, create a new partition:&amp;nbsp; n&lt;/p&gt;&lt;p style="margin:0;"&gt;5. Create a primary partition:&amp;nbsp; p&lt;/p&gt;&lt;p style="margin:0;"&gt;6. Partition number:&amp;nbsp; 1&lt;/p&gt;&lt;p style="margin:0;"&gt;7:&amp;nbsp; First cylinder:&amp;nbsp; 1&lt;/p&gt;&lt;p style="margin:0;"&gt;8:&amp;nbsp; Last cylinder:&amp;nbsp; Response here depends on the card.&amp;nbsp; You can take the default, or look at the information that comes on the command line to specify a size.&amp;nbsp; For example, for an eMMC on the PicoZed, we say +128M to set up 128 MB of memory.&amp;nbsp; You probably want something much larger on your microSD card, but you can play around here to find something that works for you.&lt;/p&gt;&lt;p style="margin:0;"&gt;9. Write the partition:&amp;nbsp; w&lt;/p&gt;&lt;p style="margin:0;"&gt;If this works, fdisk should tell you the partition table has been altered.&amp;nbsp; you should now have a new partition 1 on the blk0 device that we will reference in the&amp;nbsp;final command.&amp;nbsp; &amp;nbsp;The last thing you need to do is format the partition as FAT32, which you can also do from the Linux command line:&lt;/p&gt;&lt;p style="margin:0;"&gt;mkdosfs -F 32&amp;nbsp; /dev/mmcblk0p1&lt;/p&gt;&lt;p style="margin:0;"&gt;Give that a try and see how that works for you.&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Ron&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>