From owner-freebsd-questions@freebsd.org Sun Jul 8 01:18:49 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DC3410463E7 for ; Sun, 8 Jul 2018 01:18:49 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA5A3776F5 for ; Sun, 8 Jul 2018 01:18:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.195.57.160]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.183]) with ESMTPA (Nemesis) id 0M51UE-1g1ukz1BBG-00zJUF; Sun, 08 Jul 2018 03:05:43 +0200 Date: Sun, 8 Jul 2018 03:05:43 +0200 From: Polytropon To: RW Cc: RW via freebsd-questions Subject: Re: A request for unnested UFS implementation in MBR Message-Id: <20180708030543.39dc87b5.freebsd@edvax.de> In-Reply-To: <20180708014206.24a268a6@gumby.homeunix.com> References: <98201d37-2d65-34c6-969e-c9649f1a3ab1@yandex.com> <20180707224648.5187be22@gumby.homeunix.com> <0753eec0-674f-842f-2dae-c8405b004dc1@yandex.com> <20180708000437.2dd95933@gumby.homeunix.com> <20180708014204.57b34879.freebsd@edvax.de> <20180708014206.24a268a6@gumby.homeunix.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:5KJcrS48O3Sbwws9EgD6r35J9CwtyEWhZqJs3Mb4YghgxROSRzg CMIrQJn/hI+QynuCgxDEbsyLiOWf21fOnkCVGCofQB7qSuIR1Np8HLOBUnl11CBQ5Xt1Ota CteIyY7zrFZYFxgY+zQ0Q5LvgP1l2ej8g7nZ2GInPdh9h6pvhA+tgFmTr0YvnJOaG85fWXw wfh/wxNy5O+FZ4MJDBSCg== X-UI-Out-Filterresults: notjunk:1;V01:K0:hfUM5K7/xeA=:wmZJ5vhJlrf4q0GtdsLoal /JoeLFVDVHfoyJUb2x7Fk9rYClV5+x4Xq4WbTTlXr0J2ALgpoOChyuIKxiuldIjm75Q7vISro 3vPyfPj0oUXTXSXCLSuYNX/XW1Gy5iVim/t+vyZ9vcucc338AMHWJhP1yGLuvLqBRoml2yKEA nUlXoF1VHSL8WuSPCPWqgpSYcW/kq2QiM4yIineFvtk+I6pfkd00zi5OlxI/9FalVLvqpLNXO UxJxjAMXz8ASbex0kdRBmiFkFeAqPOpIVtiW3UAWUT1bPz2+KDRDUXHUFwkfbJxk71tABUUTC Ii4XimJNvya2zEPd+lQiaGfDG/Czm1/rqnLra8VyA93Sht2Ay+HoEnrf+6OfKYwaLk9Jm45Iu SfBOPx1BegNZh8MYEdINDY/znWlg+ka3PrlTgd2e61KF6DajUhvetTCNlQU2ZCVo0ls6+IPkA RBi4R8BdT0oomJyHXXkelrVmpnWVJw5IzGeopRO4/KAJh31PODmSm4cEHXFR+52Ee/IvirB06 8t2Ldoh/N07frr6Xk7n7ABa1CE7Z+qlD9Rx9ma/wNoQAXJWGMeSUTr67SCxgVDtVbjcPrp5H2 sWO37ecrMmym9xokYhXNtgyT4kDtuSARWK/kJ6Jd7mVL9c+gxm2kTHQsNJ7Z7oziHagBcDiJr Yjfxou10QxXZ+uOEtPZBNfRm7FRIcT9jgGGpTdndjckjpGEblO5vxPtTCFbn7H2XiQxiXoXur FMdQNpErygdgOPvD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2018 01:18:49 -0000 On Sun, 8 Jul 2018 01:42:06 +0100, RW via freebsd-questions wrote: > On Sun, 8 Jul 2018 01:42:04 +0200 > Polytropon wrote: > > > > From my understanding (and explained off-list), FreeBSD > > requires a 'a' BSD-labeled partition (inside a slice in > > case of MBR, or on a disk if "dedicated") to boot from. > > It doesn't seem to be possible to label a partition 'a' > > without using labels. > > > > The label 'c' for data partitions is implicit and will > > be synonymous for "the whole thing" (slice, disk), as > > it is generated by using newfs on a MBR slice directly > > (no matter if "DOS primary partition" or "logical volume > > inside DOS extended partition"). > > It's certainly possible to put UFS on a disk, or an MBR partition, > without labelling. Of course it is, I do it all the time for data disks. :-) If you have a disk da0 in your system and you "newfs /dev/da0", then you get a UFS filesystem /dev/da0c which is equivalent to /dev/da0, and you can "mount -t ufs /dev/da0 /mnt". This works the same for a slice ("DOS primary partition"), for example "newfs /dev/da0s1" and then "mount -t ufs /dev/da0s1 /mnt", where da0s1c equals da0s1. Again, 'c' means "the whole thing" (disk, slice). The other letters are usually reserved for use in this way: a boot partition b swap c "the whole thing" d user-defined (for example /tmp) e user-defined (for example /var) f user-defined (for example /usr) g user-defined (for example /opt) h user-defined (for example /home) There is a limit on letters. :-) Initially, this is how the BSDs partitioned a disk, and this existed long before MBR. That's why the requirement of a boot partition - where should the OS boot from? The logical conclusion is: If you want to use an 'a' partition for being able to boot from, you have to create labels. FreeBSD won't boot from a 'c' partition. >From "man 8 boot": The automatic boot will attempt to load /boot/loader from partition `a' of either the floppy or the hard disk. There is no word about this mechanism working with 'c', too. Of course, this would be subject to an interesting experiment: Create a slice and directly format it. Put /boot/loader on it, as well as a kernel and maybe the whole OS. Instruct the boot loader to boot from it (e. g., boot device = /dev/ada0s7). > I don't recall seeing a 'c' but I might be wrong. The 'c' isn't needed anymore as c == . As there is no actual BSD label, you can't see it even if you use the traditional disklabel / bsdlabel tool. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...