Chad Woolley
2010-Sep-19 21:01 UTC
[CentOS] How to simulate minimal ISO install using stage2 image file?
Hello, I'm working on a project which automates creation of EC2 AMI images. To do this, you must use a running EC2 instance to mount an image file in a chroot jail. My problem is that I want to create an AMI that looks exactly like a minimal (nothing selected) install from the CentOS ISO image, but the "stage2" image [1] file is much more "minimal" than that. e.g., it doesn't have yum, groups, devices, networking, etc set up as you would if you had run the ISO minimal install on a real or virtual box. I can't mount the ISO directly in the chroot (as far as I know, but I could be wrong). My question is, how can I make the mounted stage2.img chroot jail look just like a minimal ISO install? I could manually create everything (which I have started), but this is a lot of work, and I'm likely to miss something that an ISO build would have (e.g. some group). Is there some other standard CentOS script I can run after mounting the stage2.img which will do everything the installer does? Can I run the installer manually with some kickstart script? Pointers to references and documentation are welcome... Thanks, -- Chad [1] http://mirrors.usc.edu/pub/linux/distributions/centos/5.5/os/x86_64/images/
Chad Woolley
2010-Sep-20 03:48 UTC
[CentOS] How to simulate minimal ISO install using stage2 image file?
On Sun, Sep 19, 2010 at 2:01 PM, Chad Woolley <thewoolleyman at gmail.com> wrote:> I'm working on a project which automates creation of EC2 AMI images. > To do this, you must use a running EC2 instance to mount an image file > in a chroot jail. > > My problem is that I want to create an AMI that looks exactly like a > minimal (nothing selected) install from the CentOS ISO imageI did some research - it looks like I might be able to do this with kickstart: http://www.centos.org/docs/5/html/5.2/Installation_Guide/s1-kickstart2-startinginstall.html However, I'm unsure exactly which of those options to use. This seems like a common task - are there any good tutorials which show the exact process to create an basic CentOS image in a chroot via kickstart? Thanks, -- Chad