LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SD Card Partition and Formatting using Debian (https://www.linuxquestions.org/questions/linux-newbie-8/sd-card-partition-and-formatting-using-debian-894847/)

johnnybo 08-01-2011 02:38 AM

SD Card Partition and Formatting using Debian
 
Hi all,

I am new to linux ...and got stuck in the first stage of development.

I am trying to format and partition an SD card.
This are the steps I am using:

1. df
2. su
3. fdisk /dev/sdb1
4. after using "n" "p" size of the partition etc when i use the "w" command i get the following error -
"Re-reading the partition table failed with the error 22"

5. But when i use fdisk -l /dev/sdb1
I am able to see my partition.

6. When i try to format using the mkfs.ext2 /dev/sdb1p1 - i am getting this error - Could not stat /dev/sdb1p1 - No such file or directory ..

Any help would be appreciate.

Thanks in advance





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 ...

16pide 08-01-2011 03:58 AM

I would use this to know where you are at:
Code:

fdisk -l
and then probably, you want to work on /dev/sdb, not /dev/sdb1.
/dev/sdb is the whole disk, while /dev/sdb1 is just one partition.
creating a partition table and a partition inside /dev/sdb1 would make too many levels.
creating a partition inside /dev/sdb will create /dev/sdb1

then when you exit, check it worked with
Code:

fdisk -l
then you can use mkfx.xxxxx /dev/sdb1
and lastly, you can mount it

johnnybo 08-01-2011 10:41 PM

Thank you for your reply...It is /dev/sdb1 which was the problem ....once I changed it to dev/sdb ...things started working ....Thanks ...:p


All times are GMT -5. The time now is 10:27 PM.