Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can you please tell me how much cylinder size is equal to 1 MB. Below is the /dev/sda5 size.. What is the size of this parttion (in MB or GB) what this block signifies and ID means ?????
Device Boot Start End Blocks Id System
/dev/sda5 8756 8856 610407 82 Linux
and sometimes + is marked after block ..what is this ??
/dev/sda1 1 4854 38989723+
Blocks on disk are 512 bytes.
Two blocks = 1 KB. (1024 bytes)
1 MB = 1024 bytes times 1024 bytes = 1,048,576 bytes.
610,407 blocks times 512 bytes = 312,528,384 bytes.
312,528,384 bytes divided by 1 MB = 298.05029296875 MB.
Note that hard drive manufacturers will often calculate 1 MB = 1000 x 1000 and they will calculate 1 GB as 1000 x 1000 x 1000. This obviously makes it look like they have more capacity than they actually do have since they are dividing the total number of bytes on the disk by a smaller number than if they used 1024 x 1024 for 1 MB and 1024 x 1024 x 1024 for 1 GB.
If we used those misleading values then your partition would falsely appear to be 312.5 MB. It's about exactly what the words mean. A megabyte is a power of two rounded down to the nearest million while a million bytes is an exact measurement. This is why it is possible to purchase a 200 GB hard drive and your computer will say that it is only 186 GB.
200,000,000,000 divided by (1024 x 1024 x 1024) equals 186.2645149230957031
Last edited by stress_junkie; 03-10-2007 at 09:15 AM.
don't tell people that hardware manufacturers take after Politicians and Microsoft and lie to everyone.
people have to have something they can trust. ~eg~
You should take a look at README.fdisk found in utils-linux package for a full expalanation. Anyway, blocks is the size of the partition in kbytes and id is the hex value of the type of the partition. Hence in your case sda5 is 610,4M swap (id=82) partition.
The + flag means that the partition has an odd number of sectors which will be wasted.
You should take a look at README.fdisk found in utils-linux package for a full explanation. Anyway, blocks is the size of the partition in kbytes and id is the hex value of the type of the partition.
I couldn't find the README.fdisk on my computer.
A quick experiment proved you to be correct. The fdisk utility does report blocks as 1K units or something like that.
Code:
root> fdisk -l /dev/hda
...
/dev/hda3 * 1156 2249 8787555 83 Linux
...
root> df -h /dev/hda3
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 8.3G 2.2G 5.8G 28% /mnt/hda3
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.