1

Today I was answering a question here about an infinite loop between

/etc/profile and /etc/bash/bashrc (or any other variant from bash initial script)

where the first call the second and vice-versa. Leaving you incapable of entering commands in bash.

On that specific scenario the solution was to boot from a live system and edit one of both files... but what could someone do if, for example, the same happens on an AWS instance?

This is a theoretical question, I suppose that it could happen to someone.

PS. I know that the fastest solution would be to kill the server and start a new one, but is there any other option?

  • It was /etc/bash.bashrc not /etc/bash/bashrc, but thanks for your answer (will wait about 24 hours before accepting you answer for a secret reason) – John Militer Aug 27 '17 at 2:52
  • 1
    Kill the server and start a new one. – Michael Homer Aug 27 '17 at 2:55
  • @JohnMiliter no problem :) I hope it can solve the problem, at least that's what I'd do in that case, btw on my gentoo I have a /etc/bash/bashrc script that calls for several other, that's why my second path :) – Christopher Díaz Riveros Aug 27 '17 at 2:56
0

In this particular case (I assume that is the same with all the IaaS providers), is possible to attach an existing volume to a different instance.

From Amazon's official docs

Prerequisites

  • Determine the device names that you'll use. For more information, see Device Naming on Linux Instances.
  • Determine how many volumes you can attach to your instance. For more information, see Instance Volume Limits.
  • If a volume is encrypted, it can only be attached to an instance that supports Amazon EBS encryption. For more information, see Supported Instance Types.
  • If a volume has an AWS Marketplace product code:
    • The volume can only be attached to a stopped instance.
    • You must be subscribed to the AWS Marketplace code that is on the volume.
    • The configuration (instance type, operating system) of the instance must support that specific AWS Marketplace code. For example, you cannot take a volume from a Windows instance and attach it to a Linux instance.
    • AWS Marketplace product codes are copied from the volume to the instance.

After that is the same procedure as any physical server.

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.