<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 31, 2023 at 10:39 AM <<a href="mailto:arnold@skeeve.com">arnold@skeeve.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The different overlapping partitions predates disk labels.<br>
Up to and including 4.3 BSD, to change the size of partitions<br>
on a particular disk, you had to recompile the kernel.<br></blockquote><div><br></div><div>Yes. Disk partitions were implemented in the disk driver dating back</div><div>at least to the 5th edition. Lack of sources makes it harder to know</div><div>for sure. The man pages for each of the disk drivers included the</div><div>partition layout (IIRC, I didn't cross verify).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
They were that way so that if you had multiple disks, you<br>
could use one for root + swap + some thing small and use another<br>
whole disk for a single filesystem.<br></blockquote><div><br></div><div>Yes. Unlike today, the partitions covered the disk in different, overlapping</div><div>ways. And allowed for some parts of the disk to be uncovered by a</div><div>partition. You could then patch the offset and length into the kernel with</div><div>adb and use that area of the disk for swap space.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
It was also helpful, if you had the drives, to nightly dd<br>
your real root to the "a" partition on another, identical<br>
drive, so that you could boot the backup root in an emergency.<br>
<br>
I don't remember for sure, but I think that Ultrix may have<br>
been the first BSD-style system to have disk labels, followed<br>
by some version of SunOS. All of that is way in the distant<br>
past though: mid- to late 80's.<br></blockquote><div><br></div><div>When I looked into it years ago, I convinced myself that SunOS</div><div>was the first to have it (since the very first version of SunOS 1.0</div><div>had disk labels) and that all the other vendors followed suit within</div><div>a couple of years. Ultrix-11 had the fixed labels through its EOL.</div><div>I didn't see any disklable stuff in the Ultrix-32M that we have, but</div><div>it was admittedly a quick look.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I am guessing that the original conventions date back to<br>
V7 or 32V, but one would have to go looking at code to be sure.<br></blockquote><div><br></div><div>Yes. The conventions are as old as Unix. And did change at least</div><div>between V5 and V6 and I think maybe again for some drivers between</div><div>V6 and V7 (though I'm less sure of this).</div><div><br></div><div>BSD4.3 Tahoe, the first release after BSD4.3, fixed the disklabel format.</div><div>Sun's vtoc format (aka sunlabel) was different from that, but quite</div><div>similar. This is why it's called 4.3BSD format in many places, even though</div><div>it wasn't in the original 4.3BSD release.</div><div><br></div><div>OpenBSD and FreeBSD's disklabels are the same format. However, OpenBSD's</div><div>have twice as many entries than FreeBSD's. And there's a number of other fussy</div><div>details about what different labels mean based on the shared history and divergent</div><div>evolution of the two systems. OpenBSD also supports both endians, while FreeBSD</div><div>only supports native endian. So these changes and different decisions lead to</div><div>the situation today where it's hard to read them on each-other's systems. Plus with</div><div>the new, larger disks FreeBSD has effectively abandoned them in lue of GPT partitioning.</div><div>There is a disklabel64 format too, but I'm unsure how widely that's deployed.</div><div><br></div><div>All the commercial Unixes also had their own format. AIX, HPUX, DG, etc. That's</div><div>a topic for another time...</div><div><br></div><div>Warner</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Grant Taylor via TUHS <<a href="mailto:tuhs@tuhs.org" target="_blank">tuhs@tuhs.org</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> I've found myself wondering about partitions inside of BSD disk labels.<br>
><br>
> Specifically, when and where was the convention that "a" is root, "b" is <br>
> swap, etc?<br>
><br>
> I also understand the "c" partition to be the entire disk, unless it <br>
> isn't, at which point it's the entire slice (BIOS / MBR partition) <br>
> containing the BSD disklabel and "d" is the entire disk.<br>
><br>
> I also found something last night that indicated that OpenBSD uses disk <br>
> labels somewhat differently than FreeBSD.<br>
><br>
> Aside:  This is one of the dangers of wondering how something curious <br>
> came to be and why it came to be when working on 10-15 year old FreeBSD <br>
> systems.<br>
><br>
><br>
><br>
> -- <br>
> Grant. . . .<br>
</blockquote></div></div>