Re: Installing a system to a directory only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom H wrote:
Hi all,

I'm trying to use anaconda to build system images for Amazon's EC2
service. For this, you need to build a standard Linux system, then run
a tool to package up the system into several files.

The whole image building and packaging process is a bit adhoc, so I'm
trying to automate it. My idea is to start with a kickstart file, then
have anaconda build the system into a directory (rather than build a
system from scratch), then run the packager on that directory only. To
summarise:

kickstart file -> [anaconda install] -> full system image in a
directory -> [EC2 packager] -> final system image

Looking at various websites, the --rootpath option seems to be the answer.

On a CentOS 5.2 i386 machine, with the 11.1.2.113-1.el5.centos.2
version of anaconda installed, I tried this:

mkdir -p /mnt/runtime/usr/sbin/
LANG=en /usr/sbin/anaconda -T -m
http://mirrors.dedipower.com/centos/5.2/os/i386/
--rootpath=/root/buildroot

The installer displays the text menu, asks for the early options, but
then dies just after the "Checking dependencies in packages selected
for installation..." step:

Traceback (most recent call first):
  File "/usr/lib/anaconda/urlinstall.py", line 95, in systemMounted
    self.loopbackFile = "%s%s%s" % (chroot,
  File "/usr/lib/anaconda/yuminstall.py", line 1328, in doPreInstall
    if self.method.systemMounted (anaconda.id.fsset, anaconda.rootPath):
  File "/usr/lib/anaconda/backend.py", line 180, in doPreInstall
    anaconda.backend.doPreInstall(anaconda)
++  File "/usr/lib/anaconda/dispatch.py", line 201, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 124, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/text.py", line 588, in run
    anaconda.dispatch.gotoNext()
  File "/usr/sbin/anaconda", line 982, in ?
    anaconda.intf.run(anaconda)
IndexError: list index out of range

The last statement run is:
        self.loopbackFile = "%s%s%s" % (chroot,
                                        fsset.filesystemSpace(chroot)[0][0],
                                        "/rhinstall-stage2.img")

With this being the problem:
(Pdb) print fsset.filesystemSpace(chroot)
[]

The same problem has been noted before:

http://www.linux-archive.org/centos/101098-anaconda-test-problem.html
http://www.linuxsir.org/bbs/thread330760.html

Does anyone have any ideas?
Tom,

I think that anaconda is the wrong tool for your task. I think you should look at using the "yum" command with the "--installroot" option. What you want sounds similar to how a livecd is built.

Take a look at this for an example:
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=18293

You also might want to look at revisor. It's a tool to automate the creation of livecd's.
http://revisor.fedoraunity.org/

Jason

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux