From owner-freebsd-questions@freebsd.org Sun Aug 30 05:34:06 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45C833CBB23 for ; Sun, 30 Aug 2020 05:34:06 +0000 (UTC) (envelope-from mueller6722@twc.com) Received: from p-impout001.msg.pkvw.co.charter.net (p-impout001aa.msg.pkvw.co.charter.net [47.43.26.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BfMT93HcSz4bcR for ; Sun, 30 Aug 2020 05:34:04 +0000 (UTC) (envelope-from mueller6722@twc.com) Received: from localhost ([96.28.177.163]) by cmsmtp with ESMTP id CFyYk2vEi9GgiCFyYktgC1; Sun, 30 Aug 2020 05:33:58 +0000 X-Authority-Analysis: v=2.3 cv=Cb52G4jl c=1 sm=1 tr=0 a=xqrt2BZAGHte7XHhrxJgbA==:117 a=xqrt2BZAGHte7XHhrxJgbA==:17 a=HpEJnUlJZJkA:10 a=kDE-tZP9w5REByJhpcwA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=a91rRdoBwgp5LorH:21 a=-RIkaU_dz4ca8fPp:21 Date: Sun, 30 Aug 2020 05:33:21 +0000 From: "Thomas Mueller" To: freebsd-questions@freebsd.org Subject: Re: (very OT) Ideal partition schemes (history of partitioning) References: <20200829154417.8dd5f83d.freebsd@edvax.de> X-CMAE-Envelope: MS4wfKvAKFwvixypXUPZJoZ8RdTRHVjqTP1Vo78x4rbMwEVTJYSPIXT/8PdjFJ5hoTeCGzyrGFqg7qjz92L4AKYt6/i1CMIVTLbGm3nfwojUFwNfhcrgR+wL xV/VD1/DBknHCXayqxIUxB4ckzxTTTYvwYR7J/HpM1hhvlC/nqnX98u/xO+fYMyfu72Ee06M+pnMLQ== X-Rspamd-Queue-Id: 4BfMT93HcSz4bcR X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mueller6722@twc.com designates 47.43.26.132 as permitted sender) smtp.mailfrom=mueller6722@twc.com X-Spamd-Result: default: False [4.02 / 15.00]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[twc.com]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[twc.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[twc.com]; NEURAL_SPAM_MEDIUM(0.70)[0.701]; RCPT_COUNT_ONE(0.00)[1]; MISSING_MID(2.50)[]; R_SPF_ALLOW(-0.20)[+ip4:47.43.26.0/24]; NEURAL_SPAM_LONG(0.95)[0.955]; NEURAL_SPAM_SHORT(0.17)[0.166]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:40294, ipnet:47.43.24.0/21, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions]; RECEIVED_SPAMHAUS_PBL(0.00)[96.28.177.163:received] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2020 05:34:06 -0000 from Polytropon (excerpt): > Most multi-OS settings seem to work best with BIOS + MBR. > Boot selection can either happen using a PF key at system > startup, if it's more than one disk, or you have a separate > software solution, like GRUB or FreeBSD's boot manager, if > all systems are on one and the same disk. How is that? It seems to me that GPT would be practically the only way for multi-OS. Grub 2 can be used to select the partition to boot. Some or many OSes can not run on a logical partition, only a primary partition, using MBR scheme. And what if hard disk > 2 TB, or would that be 16 TB in the case of 4096-byte sectors? > With MBR, you can have up to 4 "DOS primary partitions", > i. e., slices. FreeBSD needs only one, other systems may > need one or more. If 4 isn't enough, you need to remove > one, and put an "DOS extended partition" in the free slot, > which then can hold "logical volumes inside a DOS extended > partition". This is typically called EBR. > The limitations of MBR are no longer valid with GPT: Any > new partition gets a new number, and if you want to have > 20 partitions, that's no problem - it's natively possible. > The problem could be systems not properly understanding > GPT layout, and if I remember correctly, FreeBSD's boot > manager does not support multiboot from GPT. > On systems that do not have BIOS or "legacy mode", if I > did understand everything correctly, MBR is not supported > unless a EFI partition has been prepared beforehand. > And in case of ... I won't name it to avoid trouble, > even that won't work - you need to enable a Compatibility > Support Module (if present!) and so on...; all this > because you "should" use UEFI + GPT. > It's actually quite complicated... ;-) > You can avoid all this for FreeBSD-only systems by not > using any partitioning at all - you just add labels (using > the disklabel / bsdlabel command). Note that only letters > 'a' to 'h' are possible (with exception of 'c'). > To summarize, you have the following usable (!) options: > a) BIOS + dedicated > b) BIOS + MBR > c) BIOS + GPT > d) UEFI + GPT > In case of MBR, FreeBSD gets one slice; in case of > GPT, FreeBSD gets as many partitions as it needs. > The partition types are also different for GPT and MBR, > and depending on the desired layout, the partitions you > need can change. > Within a slide*, you can create multiple partitions. The > common approach today is to have one big / and some swap. > The idea of "functional partitioning" typically suggests > a layout like this: slide? Did you mean slice? > ------------ device in /dev ----------- > dedicated MBR GPT > /boot - - ada0p1 > / ada0a ada0s1a ada0p2 > swap ada0b ada0s1b ada0p3 > /tmp ada0d ada0s1d ada0p4 > /var ada0e ada0s1e ada0p5 > /usr ada0f ada0s1f ada0p6 > /opt ada0g ada0s1g ada0p7 > /home ada0h ada0s1h ada0p8 > This is just a very simplified example. > Also remember that most other systems fail to understand > dedicated partitioning. The idea of "partitions within a > slice" comes from BSD coming from non-PC systems to the PC, > where MBR was required for multi-boot interoperability (to > a certain, often quite limited degree). With GPT, there are > plenty of types, so this is no longer needed. I run several versions of FreeBSD and NetBSD, also need to save partitions for Linux and Haiku. FreeBSD and NetBSD can't read each other's disklabel or bsdlabel-type subpartitions, and sub-partitioning a NetBSD slice with disklabel is very tricky, drives me crazy. GPT means I never have to deal with traditional BSD disklabels any more; I don't run OpenBSD or DragonFlyBSD. Tom