FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 01-29-2011, 07:36 AM
Sanjay Arora
 
Default 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
 
Old 01-29-2011, 07:53 AM
John R Pierce
 
Default 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
 
Old 01-29-2011, 01:16 PM
Rainer Traut
 
Default 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
 
Old 01-29-2011, 01:27 PM
 
Default 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
 
Old 01-29-2011, 04:17 PM
Rainer Traut
 
Default 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
 
Old 01-29-2011, 04:20 PM
Rainer Traut
 
Default 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
 

Thread Tools




All times are GMT. The time now is 01:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org