LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



Reply
 
Search this Thread
Old 11-07-2006, 03:50 AM   #1
lbdgwgt
Member
 
Registered: Aug 2006
Distribution: Open Suse 10.1, Ubuntu (Feisty Fawn)
Posts: 87

Rep: Reputation: 15
determine size of a CF card partition


Hi all,

i have a doubt about determine the size of my partition in CF card.

so i make a single primary partition using the command
Code:
fdisk /dev/sdb
then format it
Code:
mkreiserfs -b 512 /dev/sdb
the result is:

Code:
#fdisk -l /dev/sdb

Disk /dev/sdb: 523 MB, 523321344 bytes
255 heads, 63 sectore/track,63 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device  Boot Start  End  Blocks     Id   System
/dev/sdb1           1   63  506016     83   Linux


# df -T /dev/sdb1

Filesystem    Type 1K-blocks   Used Available Use% Mounted on
/dev/sdb1 reiserfs    505860   2048    503812   1% /mnt/cf
why the results show different size?
actually i am doing project for making a small system linux system on it. So i want to make a image file first then work on it before copying to the CF card for the final step.

I also have a doubt how big should I make the image file? should it be as big as the whole CF card or only the primary partition?
and to where later on i should copy the image file? to /dev/sdb or /dev/sdb1? any suggestion? i am little bit confused about partitioning? or it is not necessary also to make a partition?

thanks for the help for the newbie
 
Old 11-07-2006, 09:26 AM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
I'm curious what steps you took to create your /dev/sdb1 partition. You can't create the partition by simply issuing the command:

fdisk /dev/sdb

That will just get you into the fdisk user interface and then you have to issue other commands to create your partition. Perhaps you could list the steps you went through while in fdisk to creat your partition?

Also /dev/sdb is your drive /dev/sdb1 is the first partition on that drive.
 
Old 11-09-2006, 06:44 AM   #3
lbdgwgt
Member
 
Registered: Aug 2006
Distribution: Open Suse 10.1, Ubuntu (Feisty Fawn)
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by fordeck
I'm curious what steps you took to create your /dev/sdb1 partition. You can't create the partition by simply issuing the command:

fdisk /dev/sdb

That will just get you into the fdisk user interface and then you have to issue other commands to create your partition. Perhaps you could list the steps you went through while in fdisk to creat your partition?

Also /dev/sdb is your drive /dev/sdb1 is the first partition on that drive.
i did the sdb1 partitioin by:
Code:
fdisk /dev/sdb
d (delete pertition)
n (new partition)
p (primary) 
1 (partition number 1)
(the size of partition)
anyway, my problem is already solved. I wanted to determine the card size since i want to make an image file for working in my computer first with the image file. i used to do like this:

Code:
dd if=/dev/zero of=my_cf.img bs=... count=...
losetup /dev/loop0 my_cf.img
mkreiserfs /dev/loop0
but my frined suggest my this way:
Code:
mkreiserfs /dev/sdb1
dd if=/dev/sdb1 of=my_cf.img
so i get an image file with the same size of my CF card easily.
 
  


Reply


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
Determine Physical RAM size skistner Linux - Hardware 18 02-22-2010 01:57 PM
Determine physical disk size Kristijan Linux - General 4 01-23-2005 06:56 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 01:55 PM
fdisk partition size differs from mounted partition size jimieee Linux - General 3 10-15-2003 04:10 AM
trying to determine the size of all files in a directory riddlebox80 Programming 7 06-11-2003 08:27 PM


All times are GMT -5. The time now is 03:12 PM.

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