Chadley wrote regarding 'Re: [SLE] sector sizes' on Thu, Sep 16 at 06:29:
Chadley Wilson wrote:
greetings friends
true or false 1024 sectors = 1MB
False. A sector is usually 512 bytes. Therefore 1024 sectors = 524288 bytes. So in actual fact 1024 sectors is half a meg? :-/ 1000bytes =1Kilobyte 1000KB=1MB So then how do you work out where to start and stop the partition resize with
On Wednesday 15 September 2004 18:33, James Knott wrote: parted?
The "resize" and "mkpart" commands both take the "end" argument in megabytes, and you can move with "resize". Therefore, you almost never need to know how big a sector is. Want to calculate it? Run "fdisk -lu" and the size of each partition will be given in sectors rather than blocks. Run df to see how big a partition is, then divide the two. Or just divide the total number of bytes by the total number of sectors to get bytes/sector: dsauer@danny-pc:~> /sbin/fdisk -lu Disk /dev/hda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors Units = sectors of 1 * 512 = 512 bytes [...snip partitions...] dsauer@danny-pc:~> echo '120034123776 / 234441648' | bc 512 Looks like 512 bytes/sector on that disk. :) Anyway, the fdisk thingie (yeah, real technical) will show you what sector each partition starts 'n stops on. I'm pretty sure that parted will do the same with "print"... --Danny, pointing to the man page for the difference in "df -h" and "df -H"