title: EC2 machine abruptly terminating right after start
body: <p>I was in the process of shrinking the size of the EBS volume attached to my ec2 machine. There are many tutorials on how to do this (<a href="http://cloudacademy.com/blog/amazon-ebs-shink-volume/" rel="nofollow noreferrer">here is the one I used</a>). </p>
  
  <p>The gist is that, I create a snapshot of the actual drive, and small empty volume. I then copy the content of the snapshot to the small drive via <code>sudo rsync -aHAXxSP /mnt/snap/ /mnt/small</code>.</p>
  
  <p>When checking the contents of the small drive, it seems like it contains all of the folders/files in the original drive. </p>
  
  <p>At the end, after detaching all volumes and attaching the smallest volume, when starting the ec2 instance, it terminates after initializing. 
  When I get the reason for the termination it says <code>Instance initiated shutdown</code>: </p>
  
  <pre><code>AI2s-MBP-7:~ i-danielk$ aws ec2 describe-instances --instance-ids i-e0ef0910  
  RESERVATIONS    645962089403    r-440c95a5
  GROUPS  sg-4cdf6427 zfei_profiler
  INSTANCES   0   x86_64  tOGHd1424650611612  True    xen ami-146e2a7c    i-e0ef0910  r3.2xlarge  zfei_profiler   2015-08-23T01:56:40.000Z            /dev/xvda   ebs     hvm
  BLOCKDEVICEMAPPINGS /dev/xvda
  EBS 2015-08-23T01:55:56.000Z    False   attached    vol-1d08fcf0
  MONITORING  disabled
  PLACEMENT   us-east-1c      default
  SECURITYGROUPS  sg-4cdf6427 zfei_profiler
  STATE   80  stopped
  STATEREASON Client.InstanceInitiatedShutdown    Client.InstanceInitiatedShutdown: Instance initiated shutdown
  TAGS    Name    WIKI_TACL_MERGE
  </code></pre>
  
  <p>Any idea how can I figure out the real reason for my instance shutdown? </p>
  
  <p>Update1: this is really weird ... the "Instance Settings > Get System Log" shows nothing. Here is a screenshot: 
  <a href="https://i.stack.imgur.com/GkBut.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GkBut.png" alt="enter image description here"></a></p>
  
  <p>Update2: Both cases (original volume, and the small volume) were added as <code>/dev/xvda</code> (I tried <code>/dev/sda</code> but it didn't accept it). </p>
  
  <p>Update3: Here is the content <code>/boot/grub/grub.conf</code>. Based on what I see, there is nothing problematic (and nothing needs to be changed). </p>
  
  <pre><code>[ec2-user@ip-10-167-76-117 target]$ cat /boot/grub/grub.conf
  # created by imagebuilder
  default=0
  timeout=1
  hiddenmenu
  
  title Amazon Linux 2014.09 (3.14.33-26.47.amzn1.x86_64)
  root (hd0,0)
  kernel /boot/vmlinuz-3.14.33-26.47.amzn1.x86_64 root=LABEL=/ console=ttyS0 LANG=en_US.UTF-8 KEYTABLE=us
  initrd /boot/initramfs-3.14.33-26.47.amzn1.x86_64.img
  
  title Amazon Linux 2014.09 (3.14.27-25.47.amzn1.x86_64)
  root (hd0,0)
  kernel /boot/vmlinuz-3.14.27-25.47.amzn1.x86_64 root=LABEL=/ console=ttyS0
  initrd /boot/initramfs-3.14.27-25.47.amzn1.x86_64.img
  </code></pre>
  
  <p>And this is <code>/etc/fstab</code>: </p>
  
  <pre><code>[ec2-user@ip-10-167-76-117 target]$ cat /etc/fstab
  #
  LABEL=/     /           ext4    defaults,noatime  1   1
  tmpfs       /dev/shm    tmpfs   defaults        0   0
  devpts      /dev/pts    devpts  gid=5,mode=620  0   0
  sysfs       /sys        sysfs   defaults        0   0
  proc        /proc       proc    defaults        0   0
  </code></pre>