From owner-freebsd-questions@freebsd.org Fri Aug 27 14:45:35 2021 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 A9C496612C8 for ; Fri, 27 Aug 2021 14:45:35 +0000 (UTC) (envelope-from chris@groessler.org) Received: from vigilia.groessler.org (vigilia.groessler.org [79.143.177.135]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (1024 bits) client-digest SHA256) (Client CN "vigilia.groessler.org", Issuer "vigilia.groessler.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gx2ZQ3cYSz4v8n for ; Fri, 27 Aug 2021 14:45:34 +0000 (UTC) (envelope-from chris@groessler.org) Received: from blasi.groessler.org (gaga.groessler.org [212.168.189.235]) by vigilia.groessler.org (8.16.0.45/8.14.6) with ESMTPS id 17REjVLQ044412 (version=TLSv1.3 cipher=AEAD-AES128-GCM-SHA256 bits=128 verify=OK) for ; Fri, 27 Aug 2021 16:45:31 +0200 (CEST) Subject: Re: Paritioning scheme on MBR disk doubts To: freebsd-questions@freebsd.org References: <8ab9716c-fdc3-ad09-1883-8210b37ef520@groessler.org> <20210827064821.0678b4da@archlinux> From: Christian Groessler Message-ID: Date: Fri, 27 Aug 2021 16:45:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210827064821.0678b4da@archlinux> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4Gx2ZQ3cYSz4v8n X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of chris@groessler.org has no SPF policy when checking 79.143.177.135) smtp.mailfrom=chris@groessler.org X-Spamd-Result: default: False [-0.07 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[chris]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_SPAM_MEDIUM(1.00)[0.996]; DMARC_NA(0.00)[groessler.org]; NEURAL_HAM_SHORT(-0.97)[-0.970]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:51167, ipnet:79.143.176.0/23, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2021 14:45:35 -0000 On 8/27/21 6:48 AM, Ralf Mardorf wrote: > On Thu, 26 Aug 2021 20:53:25 +0200, Christian Groessler wrote: >> If I remember correctly, an extended partition can also only hold 4 >> partitions. Of which one in turn can again be an extended partition >> which can hold 4 partitions. Of which one in turn can again be an >> extended partition... etc > That's incorrect. > > "Master Boot Record (partition table) > > In the MBR partition table (also known as DOS or MS-DOS partition > table) there are 3 types of partitions: > > Primary > Extended > Logical > > Primary partitions can be bootable and are limited to four partitions > per disk or RAID volume. If the MBR partition table requires more than > four partitions, then one of the primary partitions needs to be > replaced by an extended partition containing logical partitions within > it. > > Extended partitions can be thought of as containers for logical > partitions. A hard disk can contain no more than one extended > partition. The extended partition is also counted as a primary > partition so if the disk has an extended partition, only three > additional primary partitions are possible (i.e. three primary > partitions and one extended partition). The number of logical > partitions residing in an extended partition is unlimited. A system > that dual boots with Windows will require for Windows to reside in a > primary partition. > > The customary numbering scheme is to create primary partitions sda1 > through sda3 followed by an extended partition sda4. The logical > partitions on sda4 are numbered sda5, sda6, etc. Tip: When partitioning > a MBR disk consider leaving at least 33 512-byte sectors (16.5 KiB) of > free unpartitioned space at the end of the disk in case you ever decide > to convert it to GPT. The space will be required for the backup GPT > header." - > https://wiki.archlinux.org/title/partitioning#Master_Boot_Record_(partition_table) The first sector of an extended partition has the same layout as the MBR. Means that it has 4 slots for partition information. If one of the slots has the "extended partition" ID it can in turn define more partitions. That this is only supported 1 level deep is an artificial restriction. regards, chris