Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jul 2018 03:05:43 +0200
From:      Polytropon <freebsd@edvax.de>
To:        RW <rwmaillists@googlemail.com>
Cc:        RW via freebsd-questions <freebsd-questions@freebsd.org>
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> <f57a5540-9736-53bf-5312-166a1b2e23b0@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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <dev>c == <dev>. 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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180708030543.39dc87b5.freebsd>