Issue: After rebooting, power outage, datastore or other issues; the Photon OS appliance enters emergency mode.
The appliance fails to start and there is an error similar to:
[FAILED] Failed to start File System Check on /dev/disk...uuid/#####-### See 'systemctl status systemd-fsck-root.service' for details.
[DEPEND] Dependency failed for /sysroot.
[DEPEND] Dependency failed for Initrd Root File System.
[DEPEND] Dependency failed for Reload Configuration from the Real Root.
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on the environment.
fsck
command automatically (preferred) or manually.
linux
.Option 1
At the end of the line, add fsck.repair=yes
then press F10 to continue booting the appliance. This will force the filesystem to check and auto-resolve disk issues. The appliance may silently reboot several times to fix issues as needed.
Option 2
At the end of the line, add systemd.unit=emergency.target
then press F10 to continue booting the appliance.
1. Find the filesystems with the following commands:
$ /bin/sh
$ /bin/mount
$ blkid
2. Run the e2fsck command against the mount point that has the issue:
$ e2fsck -y /dev/<mount>
The -y switch will fix the nodes automatically. Replace <mount> with the mount point experiencing the issue. Ex: $ e2fsck -y /dev/sda3
3. Power OFF the virtual appliance.
4. Power ON the virtual appliance.