formatting SD card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

formatting SD card

1,443 Views
MickeyMouse
Contributor I

Hi all,

 

I am new to linux ...and got stuck in the first stage of using the imx development board. I have an imx 233 eval board. I have followed the steps in AN3875 to install debian linux on a vmware virtual machine. Now i am following the "i.MX23 EVK Linux User’s Guide" to format my SD card. I am using a 2gb micro SD card from kingston.

 

As per the tutorial, I am using "fdisk /dev/sdb1" for disk partition, when i use the "w" i am getting the error - "partition table failed with error - 22" , but when i use the command "fdisk -l /dev/sdb1" i could see the partition table.

So i proceed to the next step of using the "mkfs.ext2 /dev/sdb1p3" command to format the ext2 file type. But I am getting this error"Could not stat /dev/sdb1p3 -- No such file or directory" ....

 

 

Any help or suggestion would be appreciated.

 

Thanks in advance ...

Tags (1)
5 Replies

1,003 Views
MickeyMouse
Contributor I

Thank to everyone for all the suggestion ...the issue was using /dev/sdb1 ...once I changed it to /dev/sdb  I got the SD card formatted properly .. :-) ...

 

Michael ..Thanks for the document and the suggestion ...I liked the suggestion of using a linux system ...also vmware is little painful ...

 

keep the good work going :-)

 

Thanks,

0 Kudos

1,003 Views
myke_predko
Senior Contributor III

Hi Mickey,

 

AN3875 is a good place to start but I found it took a lot of massaging to get right.  Attached are the instructions that I use for first loading the SD card followed by the NAND image.  Once you have the SD card image set up, you can update it with the NAND image as you play with ltib. 

 

A few things first:

1.  Don't use VMware.  It takes a lot of work to configure it right and you will have to manage resources used by both systems (the Linux image in VMware and the PC Windows) which is a pain in the bum.  I spent $200 getting a refurbished PC, loaded Linux on it and never looked back. 

2.  When transferring files between your Linux and Windows system, I recommend that you get a USB key drive and implement a "sneakernet" system.  Otherwise, you are going to have to set up a Samba drive on your Linux system that can be accessed by Windows (which is a pain with Windows 7, if you are using it).  NOTE: you would have to do this with VMware as well. 

3.  Ubuntu seems to work better than Debian right from the start (I have tried both).  I'm using 10.10. 

4.  Create TWO versions of the ltib directories for the i.MX233 (I called mine i.MX233_SD_ltib (for the image put on the SD card) and i.MX233_NAND_ltib (for the image put on the NAND Flash of the EVK)).  The NAND kernel and rootfs is put on the SD card version in the "/home" directory and is loaded from here into the EVK's Flash.

5.  Once I have set up the NAND Flash, I download application code via tftp and debug it via gdb/ethernet using the process described in AN3870.  Note that App Notes seems to imply that you reload the NAND Flash image each time you update your application, this seems like overkill which is why I use tftp to download the application code (and other files) from my Linux system. 

6.  Talking to other people, it seems like when somebody is first getting started with the i.MX processors, they don't create an new Linux image.  Instead they use the one already burned into the EVK and use NFS to debug their code and familiarize themselves with Linux.  If you don't know what you are selecting, you could end up with a system that is bricked (and you will have to use the Mfg. Tool). 

7.  When updating files on the EVK remember to ALWAYS execute "sync" afterwards.  There are quite a few times where the RAM image is different from the Flash and restarting without synching the contents of RAM with Flash could cause some problems. 

8.  When setting up your NAND Flash image, I recommend that you make the primary boot statement the NAND Flash and the secondary (on Button "1" or S37) boots from the SD Card.  This way you don't have to play with the boot switches when you are reloading the Kernel. 

9.  Don't follow my process blindly.  It took several weeks for me to get it right for my set up.  While I don't see any way you can dick up your PC, you can brick your EVK.  Spend some time reviewing the steps below and ask questions if it doesn't seem right. 

10.  I'm not a FSL FAE and I am not paid to support you or your set up.  Despite the fact that the procedures outlined below have been reviewed by FSL FAEs, I cannot promise that it will work with your set up, will not cause problems with your PC(s) or brick your EVK. 

 

If something bad happens, please do not hesitate to ask on this forum, but I cannot spend a significant amount of time helping you. 

 

Good luck,

 

myke 

1,003 Views
daiane_angolini
NXP Employee
NXP Employee
You can use gparted instead fdisk
0 Kudos

1,003 Views
Philip_FSL
Contributor IV

Make sure that /dev/sdb is the correct device node for your SD card.   You can do this by checking dmesg after you insert the card.  

Make sure the card is not write protected.  

You might need to run fdisk as root.  "sudo fdisk /dev/sdb"

0 Kudos

1,003 Views
PrabhuSundarara
NXP Employee
NXP Employee

At first you can run following command to identify the device node assigned to the SD card:

$ cat /proc/partitions

 

I assume, in your case, the device node assigned by kernel is /dev/sdb.

 

Then use the following fdisk command

sudo fdisk /dev/sdb

Following the fdisk process.

0 Kudos