Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Mar 1998 18:49:34 -0800
From:      Mike Smith <mike@smith.net.au>
To:        stable@FreeBSD.ORG
Subject:   *HEADS UP*  Important change warning. (long version)
Message-ID:  <199803090249.SAA12529@dingo.cdrom.com>

next in thread | raw e-mail | index | archive | help

There is a subtle but significant change coming to the 2.2.5-STABLE 
branch which may cause problems under some circumstances.  Please read 
the following carefully, to ensure that the transition does not cause
you any problems.

This change only affects systems which are booted from a sliced disk, 
that is, a disk where the FreeBSD partitions are contained within a 
DOS-style partition (and possibly share the disk with other operating 
systems).  It has no impact for systems which boot from dedicated
disks.

Explanation:  (You can skip this if you're not interested in 'why')
------------
When FreeBSD boots from a partition within a BSD slice, it makes use of
a feature known as the "compatability slice".  Slices are typically
identified with the nomenclature xdNsM, where N and M are numbers
representing the disk and slice number respectively.  The "compatability
slice" provides a shorthand naming scheme where the first BSD slice, ie.
the lowest M for a given N also appears as xdN.

For example, consider an IDE disk with a DOS slice first, and with
FreeBSD occupying the remainter of the disk.  The slice 'wd0s1' is the
DOS slice, and 'wd0s2' is the FreeBSD slice, with 'wd0s2a' being the 'a'
partition in the FreeBSD slice.  The "compatability slice" feature means
that you can refer to this 'a' partition as 'wd0a'.

The "compatability slice" feature is a historic leftover, and it will be
phased out in the next major release of FreeBSD.  Currently, the only
use of the compatability slice is when booting, where the root
filesystem is mounted from the 'a' partition via the compatability slice
rather than the correct slice.

This leads to an entry in /etc/fstab which is inconsistent with the 
remainder of the filesystems listed there.  Eg., persisiting with our
example from above, one might have an /etc/fstab reading:

/dev/wd0a	/	ufs...
/dev/wd0s2e	/usr	ufs...
/dev/wd0s2f	/var	ufs...

You cannot correct the root filesystem entry to read /dev/wd0s2a,
because the system believes that wd0a and wd0s2a are different, and it
has mounted wd0a on / already (in order to boot from it).

Nature of the Change:
---------------------
The kernel will correctly mount the appropriate slice device on / when 
booting.  This means that when the filesystems are remounted later in 
the boot process, the entry for / in /etc/fstab must be correct.

This results in a backwards-compatability issue, where a system which
has just been updated has an /etc/fstab with the old compatability slice
entry cannot be booted.

In order to address this change, the mount utility has been updated to 
locate and use the correct slice entry if asked to mount the root 
filesystem from what appears to be a compatability slice device.

This allows the system administrator to leave the old, compatability
slice syntax in /etc/fstab until such time as it is no longer required.
The mount utility will emit a warning diagnostic to provide a reminder 
that the change has not been made.

Potential for Problems:
-----------------------
If an updated kernel is used without also updating the mount utility, 
a system booting from a sliced disk will fail to boot correctly.

Following the standard upgrade procedure:

 - Update sources (eg. CVSup, CTM)
 - 'make world'
 - build new kernel
 - reboot

will result in the mount utility being correctly updated.

The mount utility may also be manually updated, in the case where 'make 
world' is too time-consuming.

Recovering from Boot Failure:
-----------------------------
In the case where the kernel has been updated inadvertently and the 
boot process has failed due to a mismatch when attepting to mount the 
root filesystem, the recommended recovery procedure is to boot from the 
backup kernel 'kernel.old' and rebuild the mount utility.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message



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