the concept of subpartition
the concept of subpartition
the MBR has a partition table of up to 4 partitions; at each partition there could be another MBR with 4 more partitions, this concept can nest many times... therefore I have to ask, what is the limit on how many sub-partition there could be from a device driver point of view? also there is extended partition, are those also considered sub-partition? Then how many minor device # there must be to account for all the complexity?
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: the concept of subpartition
Which OS recognizes a MBR inside a partition like that?
No.
Re: the concept of subpartition
This once worked, but I think Linux broke it all by using an incorrect concept.
It worked by linking the four entries to a special partition type (actually, there were more than one). In the new partition entry, there could be four more links. The correct usage of these extended partitions was that the disc address was relative, while Linux considered it as absolute (or if it was the other way around), which resulted in partition hell.
Since DOS/Windows connects partitions to a drive number, I think you can assume there can be no more than 25 partitions on a disc.
It worked by linking the four entries to a special partition type (actually, there were more than one). In the new partition entry, there could be four more links. The correct usage of these extended partitions was that the disc address was relative, while Linux considered it as absolute (or if it was the other way around), which resulted in partition hell.
Since DOS/Windows connects partitions to a drive number, I think you can assume there can be no more than 25 partitions on a disc.
Re: the concept of subpartition
GPT allows 128 partitions (in Windows) on a disk.
https://learn.microsoft.com/en-us/windo ... windows-11
https://learn.microsoft.com/en-us/windo ... windows-11
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: the concept of subpartition
when you load the OS with bootloader like lilo and grub, can the running os peek into the partitions with other OSes might resides? Or it is completely unaware of other partitions?
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: the concept of subpartition
Huh? Why does the bootloader matter?
As long as the running OS understands the partition table, it can see the partitions. Whether it understands the contents of the partitions is another matter.
Re: the concept of subpartition
minix3 allows sub partitions to have boot record. That is every drive has 4 partitions, every partition can be divided into 4 sub partitions... one of the partitions have a mbr
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: the concept of subpartition
Minix 3 subpartitions are not standard. I have no idea if anything other than Minix 3 supports them.
Re: the concept of subpartition
I think all FAT partitions will have a boot record, but it's not used. It's only the BIOS Parameter Block (BPB) that is used by filesystem drivers. Other filesystems don't have this. OTOH, it's up to the boot loader what it does with this. With MBR, I only support booting from the first partition, and the boot loader is directly after (on sector 1 to 12). Other OSes might boot other boot records too.
Re: the concept of subpartition
They probably fixed it now, as this was many years ago.Octocontrabass wrote: ↑Mon Oct 21, 2024 10:28 amAccording to whom? Last I checked, Linux agrees with Windows on how to handle MBR extended partitions.
Re: the concept of subpartition
I guess I'm wondering what the point of subpartitions is. In the end, the MBR offers an array of 4 partitions, and the simplified Extended Partition scheme used by Windows, Linux, and many other operating systems, allows it to be extended by a linked list. Having multiple extended partitions, each using more than one of its partition table fields, would turn this into a tree. But I know of no operating system that would do anything with this tree other than flatten it back into a list. You end up with a massively more complicated data structure that can't do anything more than what the current system can.
Carpe diem!
Re: the concept of subpartition
When you install some BSDs as one of multiple OSs on a disk it will partition one physical partition into several subpartitions.
Re: the concept of subpartition
I did a little research some time ago and found that a well-known OS documentation stated that if you use an Extended partition, there can only be one actual partition within that four-entry table, other than the Extended partition entry itself. This was to "protect" the partitions from MBRs that didn't understand Extended entries.
I wrote a little about it here.
Another thing within that post is that I wrote a small test utility. Place your MBR code in the first sector and see which partition is booted. This will test your MBR code to see if it correctly parses Extended partitions (which some may be nested). It includes source code so that you can modify the test to boot another partition to again test your MBR code.
It was a quick and dirty afternoon project to test my findings. It may or may not be useful to you.
Ben
I wrote a little about it here.
Another thing within that post is that I wrote a small test utility. Place your MBR code in the first sector and see which partition is booted. This will test your MBR code to see if it correctly parses Extended partitions (which some may be nested). It includes source code so that you can modify the test to boot another partition to again test your MBR code.
It was a quick and dirty afternoon project to test my findings. It may or may not be useful to you.
Ben