Oracle Linux: WARNING: locking_type (4) is deprecated, using --sysinit --readonly
APPLIES TO:
Linux OS–Version Oracle Linux 7.0 to Oracle Linux 9.0 [Release OL7 to OL9]
Linux x86_64 on Oracle Public Cloud
GOAL:
This document explains why the error “WARNING: locking_type (4) is deprecated, using --sysinit –readonly.
Operation prohibited while --readonly is set” within Dracut's Emergency Shell and how to fix it
SOLUTION:
The locking_type (4) warning shows up because the old LVM setting(compatibility), which enforces read-only operations on volume groups, is being replaced by the more explicit and flexible combination of the --sysinit
and --readonly
options. This change was introduced to allow better control and compatibility, as the old locking_type=4 was sometimes incompatible with operations like lvchange --refresh, leading to boot failures.