1

After an incorrect record was added to /etc/fstab, CentOS is, expectedly, failing to boot.

I've been looking around and found a lot of different solutions but I'm unable to resolve my issue.

When editing the kernel file for CentOS, I press e, and I am presented with this file:

Kernel

I've tried different combinations of adding init=/bin/bash or rw or single, etc. to the linuxefi line, but mostly I end up on a screen that prompts for a passphrase:

Passphrase Prompt

I don't have the passphrase for this, and I am looking for a password-less option of editing the bad /etc/fstab file.

If I enter an incorrect password three times, I'm entered into a version of emergency mode, however I can't edit /etc/fstab, only a file /etc/fstab.empty exists, which is, unsurprisingly, empty.

enter image description here

Edit: The following information is how we are installing CentOS in the first place, which I believe may indicate that we are encrypting the hard disk, which I think means that I am stuck...

Using text mode:

# Secure Boot Mode:
part /boot/efi --fstype="efi" --size=200 --fsoptions="umask=0077,shortname=winnt"
part /boot     --fstype="xfs" --size=200
part /         --fstype="xfs" --grow --encrypted --passphrase=temppass

Later:

# --------------------------------------------------------------------------------------------------
# Setup HDD Encryption
# --------------------------------------------------------------------------------------------------
yum install -y clevis clevis-luks clevis-dracut
# Entries from previous installs can remain and cause problems:
luksmeta nuke -f -d /dev/sde3
# Move decyption to the TPM:
clevis luks bind -f -k- -d /dev/sde3 tpm2 '{"pcr_ids":"7"}' <<< temppass
echo -n temppass | cryptsetup luksRemoveKey /dev/sde3 -
dracut -f

  • Hi @sourcejedi, I included some of the installation steps that we have in our kickstart file (created by someone we have lost contact with), I'm hoping this may inform you of our setup for the root filesystem. – Rail24 Oct 30 '19 at 16:36
  • The password you are getting is for your encrypted root volume. The commands you list removed the unlock password so you have to let it decrypt via the tpm chip, there is no other option. If that doesn’t work, you are out of luck. – jsbillings Oct 31 '19 at 22:46
1

The messages say the initrd is failing to mount /sysroot, which will become the root filesystem that contains /etc/fstab. if that's because you don't know the password for it - I think you're stuck.

I'm not familiar with the kickstart commands, but I guess you're right to think the hard disk is encrypted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.