Debian on Amazon Web Services - Resizing the AMI
I'm in the process of setting up a Debian Linux server to demonstrate some of the work I'm doing on my Raspberry Pi. AWS makes this fairly painless except for the fact that the AMI for Wheezy is a whopping 250 gigabytes. I'll be using this server purely for educational purposes so I'm very well certain I'll never need that much space. Unfortunately it's not immediately obvious how to shrink it down to a more appropriate size.
A bit of searching lead me to an answer on Server Fault written by the user Aaron. Using his answer I was able to successfully create an instance on a smaller volume. However there were two minor gotchas.
- I'm not real familiar with Linux so I'm not sure of the significance but when I attached the two volumes as
/dev/sdgthey showed up in linux as
- At the time of his answer the AWS console did not support registering AMIs so you had to get an API key and all that jazz. This is no longer necessary as you merely need to right click on the Snapshot and select Create Image From Snapshot
The last hurdle I encountered was while registering the new machine image I needed to change the architecture from
x86_64 (since I opted for the 64 bit OS) which made the proper Kernel ID appear in the drop down. I didn't need to worry about the Ram Disk ID.