0

I am attempting to install nfs-utils (and thus all its dependencies) in a stateless RHEL6.5 KVM VM. The VM is configured to have a read-only root via the /etc/sysconfig/readonly-root file, Linux magic that I didn't implement, and the "Readonly" option in the VM settings GUI. The installation is done using virt-customize -a image.img --run install_script.sh. The script uses a here-document to build the .repo file (which goes to the CentOS vault for 6.5), then I use yum install -y nfs-utils to do the actual installation. I've taken this approach because it appears easier, cleaner, and less error-prone than getting the VM to boot in read/write mode, installing, cleaning up, then shutting down. Also, I can't figure out how to get it to boot into read/write.

The output of the virt-customize showed that the packages were installed successfully. The only failure was the removal of the .repo due to a typo.

After this installation, I booted up the VM and attempted to login as usual. My attempts are now being rejected because Login incorrect.

I checked with virt-cat to make sure that the login shell for the user was set correctly, and the encrypted password in /etc/shadow looks the same as the original.

My original approach was to create an ISO image containing all the dependencies and nfs-utils, and attach that to the VM and have a script handle the installation. The same issue occurred then. I narrowed the issue's source down to the installation of one of the NFS packages: either nfs-utils or nfs-utils-lib (One of the two, I can't remember), and the rpcbind package. When one of these packages is installed, and then the VM is booted, login breaks. I am guessing that this is the same issue occurring now.

The image I'm using for the VM is cp-ed from the original VM's image as this is a test to figure out how to do the installation correctly.

Yes, I am entering the password correctly. I've tried to change the user's password (via libguestfs tools), but I still can't log in, so I'm not sure if the change failed (the return code for the commands indicates success) or the same problem is in effect.

Question:

  1. Can the login issue be debugged and fixed? If so, how?
  2. How do I do the installation correctly so that login doesn't get borked? Clearly this way doesn't work.

Your Answer

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

Browse other questions tagged or ask your own question.