Project

General

Profile

Actions

Bug #7937

closed

FreeBSD 11 removed legacy ada aliases, some older installs will fail to mount root post-upgrade

Added by Jim Pingle about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Category:
Operating System
Target version:
Start date:
10/13/2017
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.x
Affected Architecture:
All

Description

Some upgrade attempts are failing to mount root after the kernel is upgraded to FreeBSD 11.x due to ada disk driver changes.

In the past, ATA disks used ad device names but later switched to ada. In FreeBSD 10.x, the ada driver still allowed the old names to work via legacy aliases. FreeBSD 11.1 no longer provides legacy aliases like it did on 10.x; The kern.cam.ada.legacy_aliases sysctl tunable and related code are gone (See /usr/src/UPDATING entry 20151011). Thus, if an installation still references ad disks in /etc/fstab, it will now fail to mount with a current kernel

We have code to switch drives to UFS labels in /usr/local/sbin/ufslabels.sh but nothing in pfSense-upgrade automatically calls it or checks for the conditions when it may be required. It also has to be run pre-upgrade since it requires /etc/fstab to be accurate.

Users encountering this issue have a few options:
1. Reinstall and use 'rescue config.xml' in the installer to recover with a fresh install
-or:
2. Enter the new disk slice name at the mountroot> prompt, ufs:/dev/ada0s1a and then adjust /etc/fstab to the new ada0 device names
-or:
3. After performing 2, run /usr/local/sbin/ufslabels.sh to use disk labels instead
-or:
4. Inspect /etc/fstab before upgrading and run /usr/local/sbin/ufslabels.sh if the disks are using adX names.

Actions #1

Updated by Renato Botelho about 7 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

pfSense-upgrade version 0.27_2 on 2.3.x and 0.34 on 2.4.x check for /dev/adN under /etc/fstab and call "/usr/local/sbin/ufslabels.sh commit" to get it fixed before proceed with upgrade

Actions #2

Updated by Jim Pingle about 7 years ago

  • Status changed from Feedback to Assigned

The code itself appears to work but it doesn't get triggered unless you start to run the upgrade from the CLI, stop when prompted, and then re-run pfSense-upgrade.

If you run the upgrade from the GUI or from the shell and immediately use 'y' to continue, it doesn't fix the fstab file.

Actions #3

Updated by Renato Botelho about 7 years ago

  • Status changed from Assigned to Feedback

I've added it to pfSense-repo package post-install script

Actions #4

Updated by Jim Pingle about 7 years ago

  • Status changed from Feedback to Resolved

Latest fix did the trick. I can now start with a VM with a legacy style fstab and the upgrade completes and boots up fine, where before it couldn't mount the old device names.

Actions

Also available in: Atom PDF