photon icon indicating copy to clipboard operation
photon copied to clipboard

You are in emergency mode. After logging in, type "journalctl -xb" to veiw system logs, ....

Open JonathanVQP opened this issue 2 years ago • 4 comments

Describe the bug

My Photon OS 4 Rev2 VM in VMware workstation 17 got messed up so I transferred a backup vm to this one. Now I get this emergency mode message when I boot up. The UUIDs are correct in fstab and I ran e2fsck so no bad blocks.

Reproduction steps

  1. Mess up your current Photon OS VM
  2. Transfer backup Ph4 vm to current one
  3. Get emergency mode message. ...

Expected behavior

Supposed to boot up Ph4.

Additional context

Transfer Ph4 from one hard drive to another. Now cannot boot up.

JonathanVQP avatar Mar 23 '23 21:03 JonathanVQP

edited: a recovered Photon OS vm typically needs maintenance e.g. reset the root password. Did you already try boot in emergency mode ?

For debug information, in Kernel cmdline add systemd.debug-shell=1 systemd.log_level=debug. The next time you boot you will be able to switch to tty9. See https://freedesktop.org/wiki/Software/systemd/Debugging .

dcasota avatar Mar 23 '23 21:03 dcasota

@dcasota Ph4 automatically went into emergency mode. I guess grub had to be reconfigured after I transferred to the hard drive. The weird thing is that the replacement vm is going into the same hard drive as before so nothing has changed.

JonathanVQP avatar Mar 23 '23 23:03 JonathanVQP

@JonathanVQP If the issue is reproducible, please provide vm vmware.log + Photon OS journal log. edited: Is the vm configured with usb controller + passthru of an usb media + Photon OS installed on that usb media ~+ after the installation switching the usb media to another physical usb port~ ? This constellation (even with usb controller 3.1 and usb3 ports+ usb3 media) causes issues, indeed, but resolvable.

  1. Power off the fresh provisioned vm. In vm options, switch firmware to efi + force bios setup the next time the virtual machine boots.

  2. In bios, select the provisioned EFI usb device to boot from.

  3. It's an automatic boot into emergency mode.

    Is this the issue constellation? Same happens on ESXi8 + vm with slipstreamed photon-5.0-2267d6de5 as well.
    Workaround: In 1) after having saved to force bios setup: boot and enter bios. In Boot Manager > Enter setup. Configure boot options> change boot order > change the order (press enter), select EFI USB Device, press + . Commit changes and exit. Exit the Boot Maintenance Manager. Select EFI USB Device. Now the boot process doesn't enter emergency mode and starts normally. Observation: The installation and the boot process even with usb3.1 is very slow. Additionally, physically secure boot Photon OS from the provisioned usb media (no VMware Workstation / ESXi) does stop with Verification failed: (0x1A) Security Violation. Well, The virtual machine cannot boot from the attached USB device from https://kb.vmware.com/s/article/1022290 has its reason. The kb does not list Workstation 17, but your issue could be similar to the limitations description. From a developer perspective, supposed to boot up Ph4 might be made possible.

dcasota avatar Mar 23 '23 23:03 dcasota

@dcasota I got it to work. For some strange reason, the shared drive option was disabled. When I enabled it, it suddenly boots up....don't know why but it now works.

JonathanVQP avatar Mar 24 '23 18:03 JonathanVQP