greetings friends true or false 1024 sectors = 1MB Thanks -- -- Chadley Wilson Production Line Supervisor Pinnacle Micro Manufacturers of Proline Computers ==================================== Exercise freedom, Use LINUX =====================================
On Wed, 15 Sep 2004 15:34:05 +0200
Chadley Wilson
greetings friends
true or false 1024 sectors = 1MB True and false. Linux and Unix use the terminology "block". A block is logical. A sector is related to the hard disk and its format. A block is generally defined as 1K, where 1024 blocks == 1MB.
--
Jerry Feldman
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? -- -- Chadley Wilson Production Line Supervisor Pinnacle Micro Manufacturers of Proline Computers ==================================== Exercise freedom, Use LINUX =====================================
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"
participants (4)
-
Chadley Wilson
-
Danny Sauer
-
James Knott
-
Jerry Feldman