Mounting from ufs:/dev/ad2s1a failed with error 19.
freebsd at edvax.de
Fri May 1 03:29:59 UTC 2020
On Thu, 30 Apr 2020 22:06:04 +0200 (CEST), Trond Endrestøl wrote:
> On Thu, 30 Apr 2020 21:47+0200, Christoph Kukulies wrote:
> > Fine, but where in the installation process would I have had a chance to decide for that option?
> > Can I define UUID labels (is that GPT?) in the hindsight?
> Your system uses MBR, hence the ad0s prefix.
> UFS labels can be set while in singleuser mode, this is particular
> important for the root filesystem.
Technically, they are to be set while the partition in question
is _not mounted_ (i. e., this would also work in multi-user mode
if you can unmount the partitions you're going to label in that
particular mode). The restriction of / is that it usually will
work when / is mounted read-only. To be fully safe, you could
always boot from a USB stick or a FreeBSD installation CD or
DVD, and use that environment for the labeling operation. Of
course the single-user mode still is a convenient solution for
this specific requirement.
> 1. Reboot to singleuser mode.
> 2. Hit the enter key when asked about which shell to launch.
> 3. tunefs -L root /dev/ad0s1a
> 4. Ditto for the other *UFS* partitions. Consult your /etc/fstab.
> 5. Verify the labels using dumpfs /dev/ad0s1a
> 6. Reboot to multiuser mode.
> 7. Duplicate the necessary lines in /etc/fstab.
> 8. Comment out the original lines, in case you must revert.
> 9. Change the duplicate lines to refer to /dev/ufs/root, etc.
> 10. Reboot to see if you have succeeded.
> 11. Remove the original lines in /etc/fstab, if desired.
Correct - this will be the UFS labels, one out of three methods
of labeling (glabel and ufsid being the other two). Note that
those relate to UFS filesystems, not to the partitioning scheme
they have been created in; it also works for "dedicated" (i. e.,
when you don't have any partitioning at all).
Documentation and further inspiration can be found here:
However, on modern system you should probably use GPT and add
GPT labels. Use MBR (or dedicated) only if you have a good reason
to do so. :-)
Note that the different labeling mechanisms result in specific
naming conventions in /etc/fstab (/dev/ufs/..., /dev/label/...,
/dev/gpt/..., ufsid/... and so on).
> I recall issues in the past using glabel(8) which stores the label in
> the last disk block (sector) of the partition. Hence the labeled
> device file should present a device which is one disk block shorter to
> avoid the label being overwritten. Maybe someone else can chime in on
Yes, this is something you will have to pay attention to,
especially when you want to re-use a disk for something else.
If I remember correctly, dealing with them also requires the
setting of a debug flag (sysctl) for proper label destruction.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions