Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-01-2011, 02:38 AM   #1
LQ Newbie
Registered: Aug 2011
Posts: 2

Rep: Reputation: Disabled
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 ...
Old 08-01-2011, 03:58 AM   #2
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
I would use this to know where you are at:
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
fdisk -l
then you can use mkfx.xxxxx /dev/sdb1
and lastly, you can mount it
Old 08-01-2011, 10:41 PM   #3
LQ Newbie
Registered: Aug 2011
Posts: 2

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition formatting TurboChicken Linux - Hardware 3 03-07-2006 10:16 AM
Formatting Existing Partition? aquiferous Linux - Newbie 1 01-27-2005 05:29 PM
help with partition formatting and reisferFS debloxie Linux - Newbie 11 05-11-2004 10:24 AM
Formatting a FAT32 partition... SamH Linux - General 3 12-23-2003 10:51 AM
Slackware 9.1 partition/Formatting deceasedcomrade Slackware 10 11-16-2003 06:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration