Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating an EBS-backed AMI from a running instance, what am I doing wrong?
    primarykey
    data
    text
    <p>I am attempting to create an EBS-backed image from a running instance, similar to <a href="https://stackoverflow.com/questions/2082724/amazon-ec2-swap-root-instance-store-device-with-ebs-device">this post on SO</a>. I'm using primarily these sites as references:</p> <ol> <li><a href="http://thewebfellas.com/blog/2010/4/19/create-an-ebs-boot-volume-from-a-running-instance" rel="nofollow noreferrer">Create a bootable EBS AMI from a running instance</a></li> <li><a href="https://gist.github.com/1004950" rel="nofollow noreferrer">A script to rsync a running Linux OS to an image file</a></li> </ol> <p>I successfully created the EBS volume, ran <code>mkfs.ext3</code> against it (<em>I formatted the whole drive, not a partition -- is this the problem, perhaps?</em>) and used the following <code>rsync</code> command to make a copy of the filesystem:</p> <p><code>rsync --stats -avv --exclude=/root/.bash_history --exclude=/home/*/.bash_history --exclude=/etc/ssh/ssh_host_* --exclude=/etc/ssh/moduli --exclude=/etc/udev/rules.d/*persistent-net.rules --exclude=/mnt/* --exclude=/proc/* --exclude=/tmp/* --exclude=/sys/* --exclude=/dev/* --exclude=/production --exclude=/media / /mnt/ebs-root/</code> </p> <p>(where <code>/media</code> and <code>/production</code> are directories mounted from other EBS volumes, and <code>/mnt/ebs-root/</code> is the new EBS volume which will contain the image)</p> <p>the rsync works well enough, I can unmount the volume, snapshot it, and use the AWS console to make a bootable image... but when it boots, I can't access it over the web/ssh (after changing its elastic IP in the AWS console).</p> <p>I noticed that I might need to edit some files in the new EBS volume (like /etc/fstab) but I'm not sure. Here's the contents of my /mnt/ebs-root/etc/fstab, anyway:</p> <pre><code># Legacy /etc/fstab # Supplied by: ec2-ami-tools-1.3-34544 /dev/sda1 / ext3 defaults 1 1 /dev/sda2 /mnt ext3 defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/sdp1 /production ext3 defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 </code></pre> <p>I'm way outside my knowledge base here and hoping someone can point me in the right direction. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload