LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   Minimal centos via kickstart not working (http://www.linuxquestions.org/questions/red-hat-31/minimal-centos-via-kickstart-not-working-585555/)

abcdefg 09-18-2007 10:30 AM

Minimal centos via kickstart not working
 
I remember in the past, being able to remove packages to be installed in kickstart by naming the package, and adding a - infront of it... such as -wget. Im not entirely sure when this has changed, or what changed, but centos (redhat) now is far from minimal, on its minimal/bare install setting.

a bare install via kickstart ends up with about 1150MB, bare install from the interactive installer gives me ~720MB. By specifying --nobase, ive managed to cut it down to 644MB.

To put this in perspective, ive created a 10MB bootable redhat installer CD, which is set up to download centos 4.5 off of my network web-server. The goal was to have a bare-minimal (and by minimal, I actually mean MINIMAL) linux operating system prepared for installing Vmware server. Redhats current minimal install is more bloated than a full ubuntu install.

To be clear:
I do not care about memory usage
I do not care about security
This "minimal" attempt of mine is to reduce download size. Eventually I plan on distributing this, and considering most people would rather not download 644MB of linux + 120MB of vmware, I would like to cut it down as much as possible. It wont be running SSH, HTTPD, FTP, NFS, SAMBA, or anything else.. Just the OS, and what's needed to run Vmware.

I will have to determine later what vmware actually needs, and doesnt need... But I would like to stick with Redhat, and no thanks... I am not going to try gentoo or ubuntu, id rather use Redhat.

Ive spent the past four or five hours messing around with the ks.cfg file, and googling for any information. There is a thread on this at the redhat bugzilla : https://bugzilla.redhat.com/show_bug.cgi?id=139364 but aside from this, I could not find any other information. Im not expecting a 100MB redhat install, although I feel 644MB is a bit too bloated for what im doing. On low end DSL, even 10-20MB less makes a big difference in download time.

Can anyone offer any help on how to cut down on the packages, with commands that *actually* work?

Code:

# Kickstart file
install
lang en_US
langsupport --default en_US
keyboard us
mouse generic3ps/2
skipx
network --device eth0 --bootproto dhcp
url --url http://isoredirect.centos.org/centos/4.5/os/i386/
rootpw --iscrypted Kjs.0l8anffFM
authconfig --enableshadow --enablemd5
timezone America/New_York
%packages --nobase
perl
policycoreutils
wget
xorg-x11-libs


doublejoon 09-18-2007 01:19 PM

On your first installation CD take a look at the repodata directory and look at comps.xml file.

It will list the available groups with their respective packages

So maybe do something like this. Hold back all groups and then only list your required packages

Code:

%packages
-@ X Window System
-@ GNOME Desktop Environment
-@ Graphical Internet
-@ Sound and Video

wireshark
tcpdump
iptables

Kickstart will automatically satisfy any dependencies just to get a base system up and running. May not be quite as lean as you would like. I do agree CentOS/RHEL/Fedora can be bloated even for minimal install.

I'm still working on getting some kickstart.cfg files configured based on server role. Trying to included only needed packages

Good Luck

abcdefg 09-18-2007 05:00 PM

Quote:

Originally Posted by doublejoon (Post 2895941)
On your first installation CD take a look at the repodata directory and look at comps.xml file.

It will list the available groups with their respective packages

So maybe do something like this. Hold back all groups and then only list your required packages

With CentOS 4.5, comps.xml is not in /repodata/ but is listed in /CentOS/base/ , And im not entirely sure how to use the comps.xml with my install-cd.

My current cd, on / contains trans.tbl and ks.cfg
its other folder is /isolinux, containing boot.cat, initrd.img, etc. Would I just add /CentOS/base/comps.xml on this installation CD? Or would there be more required?

Quote:

Originally Posted by doublejoon (Post 2895941)
Code:

%packages
-@ X Window System
-@ GNOME Desktop Environment
-@ Graphical Internet
-@ Sound and Video

wireshark
tcpdump
iptables

Kickstart will automatically satisfy any dependencies just to get a base system up and running. May not be quite as lean as you would like. I do agree CentOS/RHEL/Fedora can be bloated even for minimal install.

I'm still working on getting some kickstart.cfg files configured based on server role. Trying to included only needed packages

Good Luck

Thank you for the help, this should cut down the install size enough to be a bit more "minimal".

Update: Ive tried setting packages as optional, and tried a few comps.xml's posted online which claimed to be "minimal". It either ends up as ~1200MB in size, or something like this : http://wolfgame.org/files/open_sauce_redhat.PNG. This installation in that image, of course, was not minimal beyond the default minimal install size (about 1200MB), and for some reason would not boot after the installation was finished.

abcdefg 09-20-2007 10:58 PM

Anyone?? :confused:

sandalle 10-17-2007 12:53 AM

I am having similar problems. I have tried an empty CentOS/base/comps.xml, but then Anaconda gives XML syntax errors, my latest try without XML errors for CentOS/base/comps.xml is:
Code:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE comps PUBLIC "-//CentOS//DTD Comps info//EN" "comps.dtd">
<comps>
  <group>
    <id>core</id>
    <name>Core</name>
    <description>WebEx empty Core</description>
    <default>true</default>
    <uservisible>false</uservisible>
    <biarchonly>false</biarchonly>
  </group>
  <group>
    <id>base</id>
    <name>Base</name>
    <description>WebEx empty Base</description>
    <default>false</default>
    <uservisible>false</uservisible>
    <grouplist>
      <groupreq>core</groupreq>
    </grouplist>
    <biarchonly>false</biarchonly>
  </group>
  <grouphierarchy>
    <category>
      <name>WebEx</name>
      <subcategories>
        <subcategory>WebEx-Base</subcategory>
      </subcategories>
    </category>
  </grouphierarchy>
</comps>

And in my ks.cfg I have tried the following package selections:
Code:

%packages
@Core

Code:

%packages --nobase --ignoredeps --ignoremissing
-*

Code:

%packages --nobase --ignoredeps --ignoremissing
@Core

Code:

%packages --nobase --ignoredeps --ignoremissing
Code:

%packages --ignoredeps
@Core

Code:

%packages --nobase --ignoredeps --ignoremissing
-glibc
-readline
-usbutils
-hwdata
-libstdc++
-device-mapper
-less
-popt
-audit
-hotplug
-MAKEDEV
-libsepol
-glib2
-db4
-cracklib-dicts

As well as no %packages defined, but Anaconda still refuses to listen to what I'm telling it and installs a bunch of packages it thinks it requires, but I'm overwriting with my own backup .tgz (just using Anaconda for hw detection and configuration).

aclark 11-01-2008 01:11 PM

Check out Orange JeOS
 
For a small and secure CentOS image for use with VMware you may want to check out the Orange JeOS project:

http://orangejeos.sourceforge.net/

Andy


All times are GMT -5. The time now is 02:22 PM.