Amazon EC2 - building a minimal centOS ebs bootable image
Hello
Looking to build CentOS based micro EC2 instance bootable from Amazon
EBS. Want that the image be minimal, so that I can add only the rpms I
want.
Despite looking could not find a way to import a CentOS image from
scratch or an existing minimal CentOS image that is bootable from EBS.
My server must must persist, as I cannot handle issues with a dynamic
server, so I want to use a server that can boot from EBS.
Am a EC2 newbie and a follow the instructions kind of a Sys Admin ;-)
Please guide me to links, howtos and give experienced advice, in
general.
With best regards.
Sanjay.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
01-29-2011, 07:53 AM
John R Pierce
Amazon EC2 - building a minimal centOS ebs bootable image
On 01/29/11 12:36 AM, Sanjay Arora wrote:
> Hello
>
> Looking to build CentOS based micro EC2 instance bootable from Amazon
> EBS. Want that the image be minimal, so that I can add only the rpms I
> want.
>
> Despite looking could not find a way to import a CentOS image from
> scratch or an existing minimal CentOS image that is bootable from EBS.
> My server must must persist, as I cannot handle issues with a dynamic
> server, so I want to use a server that can boot from EBS.
good luck with the persistence part in a cloud. the whole idea of
clouds is to distribute your services and separate them from the
physical instances. EC2 is *not* a replacement for a conventional
static server.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
01-29-2011, 01:16 PM
Rainer Traut
Amazon EC2 - building a minimal centOS ebs bootable image
Am 29.01.2011 09:36, schrieb Sanjay Arora:
> Looking to build CentOS based micro EC2 instance bootable from Amazon
> EBS. Want that the image be minimal, so that I can add only the rpms I
> want.
>
> Despite looking could not find a way to import a CentOS image from
> scratch or an existing minimal CentOS image that is bootable from EBS.
> My server must must persist, as I cannot handle issues with a dynamic
> server, so I want to use a server that can boot from EBS.
Hi Sanjay,
there are plenty of howtos to get centos in the cloud - google is your
friend.
But one note: since C5.5 you do not need Amazon's kernel+initrd anymore,
the Centos shipped xenblk and xennet modules work just fine. And finally
amazon ships a thing as "boot kernel" that behaves like pygrub and reads
the grub.conf of your image and starts the inside configured kernel.
I had to use this cmdline to make the initrd:
KVER=$(uname -a|awk '{print $3}')xen
mkinitrd --omit-scsi-modules --with=xennet --with=xenblk
--preload=xenblk -f /boot/initrd-${KVER}.img ${KVER}
and my modprobe.conf:
alias eth0 xennet
alias scsi_hostadapter xenblk
To get an image into the cloud I did:
- format a 10GiB file with ext3
- install a minimal centos to it (yum with --installroot option)
- put this into S3 as an AMI
- start an instance of it
- clone this to an EBS file with rsync
- make a snapshot of this EBS
- convert this snapshot to an EBS AMI
- use your EBS instances...
Hth
Rainer
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
01-29-2011, 01:27 PM
Amazon EC2 - building a minimal centOS ebs bootable image
In article <4D44212C.6050802@gmx.de>, Rainer Traut <tr.ml@gmx.de> wrote:
> I had to use this cmdline to make the initrd:
> KVER=$(uname -a|awk '{print $3}')xen
Don't need awk: KVER=$(uname -r)xen
Cheers
Tony
--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
01-29-2011, 04:17 PM
Rainer Traut
Amazon EC2 - building a minimal centOS ebs bootable image
Am 29.01.2011 16:32, schrieb Sanjay Arora:
> On Sat, Jan 29, 2011 at 7:46 PM, Rainer Traut<tr.ml@gmx.de> wrote:
>>
>> To get an image into the cloud I did:
>> - format a 10GiB file with ext3
>> - install a minimal centos to it (yum with --installroot option)
>> - put this into S3 as an AMI
>> - start an instance of it
>> - clone this to an EBS file with rsync
>> - make a snapshot of this EBS
>> - convert this snapshot to an EBS AMI
>> - use your EBS instances...
>>
> Looking exactly for something like this...but more detailed. I have
> slow dsl...so I would rather use somebody else's centos image to build
> my own.
>
> Have found many howtos but all seem to be for just for copying some
> other ami and then reconfiguring it, or else they are too technical
> for me to dive into.
>
For building the image:
http://bodgitandscarper.co.uk/category/amazon-ec2/
But as I said I had to use another mkinitrd cmd.
The image will be compressed once you upload it, mine was around 300mb.
Rainer
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
01-29-2011, 04:20 PM
Rainer Traut
Amazon EC2 - building a minimal centOS ebs bootable image
Am 29.01.2011 15:27, schrieb Tony Mountifield:
> In article<4D44212C.6050802@gmx.de>, Rainer Traut<tr.ml@gmx.de> wrote:
>> I had to use this cmdline to make the initrd:
>> KVER=$(uname -a|awk '{print $3}')xen
>
> Don't need awk: KVER=$(uname -r)xen
Thx, Tony.
I wrote it at 3am for a presentation that day...
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos