Page 1 of 1
A question about disk partition layouts..
Posted: Sat Mar 15, 2008 1:51 pm
by Brynet-Inc
I'm wondering, Why is their a 6
3 LBA gap between partitions?
Is there any historical significance to it? Why all the wasted space?
I haven't created many topics lately.. So I thought, "What the heck, I'll ask."
EDIT: 32256/512 = 63 - Apologies.
Posted: Sat Mar 15, 2008 11:35 pm
by elderK
Aye, I wonder about this too.
On the bright side, it means I can install my Kernel and all of it's userspace onto a Filesystem, without actually taking any space up in the Filesystem.
(Yay for living in no-mans land!
)
~Z
Re: A question about disk partition layouts..
Posted: Sun Mar 16, 2008 1:13 am
by Ready4Dis
Brynet-Inc wrote:I'm wondering, Why is their a 64 LBA(32k) gap between partitions?
Is there any historical significance to it? Why all the wasted space?
I haven't created many topics lately.. So I thought, "What the heck, I'll ask."
It possibly just got aligned on a boundary of sorts. Or possibly the boot manager in use requires the space for booting, so it reserves it outside of a partition so that it won't be written to.
Posted: Sun Mar 16, 2008 7:36 am
by Brynet-Inc
Whoops, s/their/there - apologies for my illiteracy.
As for Ready4Dis, I wasn't asking about a specific instance, all disk partitioning utilities put a gap between partitions.
Layout of a DOS formatted disk is:
Code: Select all
ID type 0x06
Start CHS = 0/1/1
End CHS = 406/15/63
LBA Start 63, size 410193
ID type 0x05
Start CHS = 406/0/1
End CHS = 1013/15/63
LBA Start 410256, size 611856
As you can see, there is a gap between partitions.. and it's entirely full of zeros - is it a legacy CH
S limit of some sort?
EDIT: It seems I was wrong, it's only a 32256 byte gap.. 63 LBA - Whoops * 2.
Posted: Sun Mar 16, 2008 7:41 am
by bewing
It all depends on your partitioning software. I have seen the gap you are talking about on m$ FDISK partitioned stuff. And yes, the software is trying to keep 1980's era disks partitioned on head/sector boundaries. The technique is utterly obsolete.
And I strongly suspect a typo in your CHS numbers. You are showing a 63 sector OVERLAP between the two partitions -- not a gap. I think you mean "End CHS = 405/15/63"
Posted: Sun Mar 16, 2008 8:49 am
by Brynet-Inc
bewing wrote:And I strongly suspect a typo in your CHS numbers. You are showing a 63 sector OVERLAP between the two partitions -- not a gap. I think you mean "End CHS = 405/15/63"
Apologies:
Brynet-Inc wrote:ID type 0x05
Start CHS = 407/0/1
End CHS = 1013/15/63
The starting cylinder was 407, not 406 or 405.
So I believe the gap remains, and there is no partition overlapping bewing.
No big deal I guess, was simply curious.
Posted: Mon Mar 17, 2008 12:07 pm
by JAAman
bewing is correct:
in the old days, it was common practice to start a partition on a cyl boundary (the first sector in the partition was always sector 1), some of the reasons, included easy calculating of disk offsets, and improved performance, partitions started simply aligning on a 63 sector boundary (the maximum sectors/cyl in the traditional CHS scheme)
however:
this space (at least the one at the beginning of the disk) should always be maintained for compatibility reasons, as a lot of disk managers and virus scanners use it (boot managers are often loaded from the 'in-between' space between the MBR and the first partition, some virus scanners also load themselves here, as do certain disk compression programs)
Posted: Mon Mar 17, 2008 1:45 pm
by bewing
If the first partition ends at:
End CHS = 406/15/63
And the next partition starts at:
Start CHS = 407/0/1
Then they are contiguous. There is no gap. Those are sequential CHS addresses. (Sectors go from 1 to 63, Heads go from 0 to 15.)
Posted: Tue Mar 18, 2008 2:28 am
by Brynet-Inc
bewing wrote:If the first partition ends at:
End CHS = 406/15/63
And the next partition starts at:
Start CHS = 407/0/1
Then they are contiguous. There is no gap. Those are sequential CHS addresses. (Sectors go from 1 to 63, Heads go from 0 to 15.)
Look, There is a gap between partitions..
Heck - check your own drive if you don't believe me..
Posted: Tue Mar 18, 2008 2:54 am
by egos
Brynet-Inc wrote:Look, There is a gap between partitions..
Heck - check your own drive if you don't believe me..
Where's gap? I don't see it!
..., 406/15(last logical surface number: 0...15)/63, 407/0/1(first logical sector number on the surface track: 1...63), ...
Posted: Tue Mar 18, 2008 12:02 pm
by Brynet-Inc
It seems obvious the reason for the gap is legacy CHS related, regardless of that.. a physical gap exists between partitions if you'll take the time to look.
I believe JAAman's explanation clears things up, I was only curious about the gap - I'm not very used to MBR-style partitioning.