LinuxQuestions.org
Visit Jeremy's Blog.
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 01-21-2008, 11:41 PM   #1
mokku
Member
 
Registered: Feb 2007
Posts: 197

Rep: Reputation: 30
fdisk question


fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1275 10241406 83 Linux


How many bytes are in /dev/hda1 ? How do we calculate?
 
Old 01-22-2008, 12:00 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 165Reputation: 165
You can use the following to get the size in 1024 byte sectors:
Code:
fdisk -b 1024 -s /dev/hda1
 
Old 01-22-2008, 12:05 AM   #3
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,575

Rep: Reputation: 220Reputation: 220Reputation: 220
I believe it's 512 times number of blocks(512 bytes/block is the unix standard). That comes to 5,243,599,872 bytes for hda1 or a little under 5GB.
 
Old 01-22-2008, 12:31 AM   #4
peart
Member
 
Registered: Nov 2003
Distribution: Arch
Posts: 31

Rep: Reputation: 16
There are 9729 cylinders of size (16065 * 512). 9729 * 16065 * 512 = 80 gigabytes (roughly).
Your partition covers cylinders 1 through 1275.
(1275 - 1) * 16065 * 512 = 10 gigabytes exactly.
 
Old 01-22-2008, 09:31 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,892
Blog Entries: 27

Rep: Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183
Hi,
Quote:
Originally Posted by kilgoretrout View Post
I believe it's 512 times number of blocks(512 bytes/block is the unix standard). That comes to 5,243,599,872 bytes for hda1 or a little under 5GB.
The OP's is using a 512 byte block. Other Valid block size values are 1024, 2048 and 4096 bytes per block.
 
  


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
fdisk question kaplan71 Fedora 1 04-03-2006 03:46 PM
Fdisk question satimis Linux - General 3 12-24-2005 08:51 AM
FDISK Question lennysokol Linux - Software 2 04-03-2005 03:22 PM
fdisk question digsby0007 Linux - Software 1 05-02-2004 03:09 PM
fdisk question yee007 Linux - General 0 04-09-2001 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration