Bug 256179 - [msdosfs] boots into single-user mode when changing drives
Summary: [msdosfs] boots into single-user mode when changing drives
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.0-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-05-27 03:56 UTC by Vincent Milum Jr
Modified: 2022-02-15 03:01 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Milum Jr 2021-05-27 03:56:19 UTC
Starting in FreeBSD 13.0-RELEASE, when fresh installing on AMD64 EFI systems, an entry is added to /etc/fstab for /dev/ada0p1 pointing to /boot/efi for example.

If another drive is added to the system, or a drive is removed, or a controller is changed which would alter the "ada0p1" reference, the msdosfs partition will fail to mount, forcing the boot process into single user mode.

I attempted to add the "failok" option to this line in fstab, but that made no difference.


Error text:
-------
/dev/ada0p1: UNEXPECTED INCONSISTENCY; RUN fsck_msdosfs MANUALLY
THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
	msdosfs: /dev/ada0p1 (/boot/efi)
Automatic file system check failed: help!
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
2021-05-27T03:28:56.765915+00:00 - init 1 - - /bin/sh on /etc/rc terminated abnormally, going to single user mode
Enter full pathname of shell or RETURN for /bin/sh:


Quick reproduction:
-------
Create a new VM using VMware and install FreeBSD 13.0-RELEASE on it like normal.
Power down the VM.
Change the storage type for the virtual disk (eg: from SAS to IDE)
Boot up the VM.
*!BOOM!*
Comment 1 Jose Luis Duran freebsd_committer freebsd_triage 2021-05-27 22:26:19 UTC
I guess that is one of the reasons why virtual machine disk images use GPT labels:

https://github.com/freebsd/freebsd-src/blob/1ca8842f3ad9725863c9affc044d1974a51818a9/release/tools/vmimage.subr#L239-L240