CENTOS Server CD project
From WBITT's Cooker!
m (→Creating the exploded tree repository, the hard way) |
(→Creating the exploded tree repository, the hard way) |
||
Line 12: | Line 12: | ||
===Creating the exploded tree repository, the hard way=== | ===Creating the exploded tree repository, the hard way=== | ||
- | The idea is simple. I have a CENTOS 5.4 DVD already downloaded at home (and office). To get the list of packages, I did a "core" install of CENTOS on a XEN virtual machine. (I used a kickstart file with @core mentioned in the " | + | The idea is simple. I have a CENTOS 5.4 DVD already downloaded at home (and office). To get the list of packages, I did a "core" install of CENTOS on a XEN virtual machine. (I used a kickstart file with @core mentioned in the "%packages" section. Analysing its "/root/install.log", I quickly figured out which packages got installed. (clever me!). So this is the list of packages I need from the "CentOS" directory of the install-tree. (It's about 443 packages). This resulted in an installation of about 950MB in size. |
- | This is good enough. However, I am too much irritated by seeing bluetooth, cups, x11, and similar packages being part of the core installation. So I went one step further, and started deleting packages using yum, in a polite fashion, from this VM. This way, I was able to delete some packages, which I consider un-necessary for an installation, where only a web-server is the only desired service to run, without any backend database. (Which was the case with me.). After this surgery, I was able to bring down the disk usage to about 750 MB. And fewer number of packages. | + | This is good enough. However, I am too much irritated by seeing bluetooth, cups, x11, and similar packages being part of the core installation. So I went one step further, and started deleting packages using yum, in a polite fashion, from this VM. This way, I was able to delete some packages, which I consider un-necessary for an installation, where only a web-server is the only desired service to run, without any backend database. (Which was the case with me.). After this surgery, I was able to bring down the disk usage to about 750 MB. And of-course, fewer number of packages. I can use that in the %post to delete the un-necessary RPMs! |
Revision as of 23:15, 24 June 2010
Contents |
Why Server CD?
Lately I thought of installing a XEN CENTOS 5.5 virtual machine on one of my servers out there. I needed the exploded tree of the ISO to be available. However, when I checked centos.org website, I noticed that they stopped distributing a "Single Server CD" after CENTOS 4. I could have downloaded a CENTOS 5.5 DVD image on the server but it was kind of un-desired / not practical for two reasons.
- The centos.org distributes DVD iso image through bit-torrent, and my server service provider does not allow P2P or torrent traffic.
- Even if I had one, I would have to download one big 4-5 GB file to my server. Whereas a few hundred MBs would do, if I want a text based "core" installation only.
So there arose an itch, and I decided to create a project to scratch that itch!
Objectives / Project goals
- To create a repository / collection of files, a so called "Server CD" install-tree, small enough to provide the "core" installation, plus yum and wget.
- To be able to create a boot-able /installable "install CD" out of the install-tree mentioned above. So that, when I (or anyone else) need to install a minimum OS on a bare-metal machine, he doesn't have to go through downloading a full DVD.
Creating the exploded tree repository, the hard way
The idea is simple. I have a CENTOS 5.4 DVD already downloaded at home (and office). To get the list of packages, I did a "core" install of CENTOS on a XEN virtual machine. (I used a kickstart file with @core mentioned in the "%packages" section. Analysing its "/root/install.log", I quickly figured out which packages got installed. (clever me!). So this is the list of packages I need from the "CentOS" directory of the install-tree. (It's about 443 packages). This resulted in an installation of about 950MB in size.
This is good enough. However, I am too much irritated by seeing bluetooth, cups, x11, and similar packages being part of the core installation. So I went one step further, and started deleting packages using yum, in a polite fashion, from this VM. This way, I was able to delete some packages, which I consider un-necessary for an installation, where only a web-server is the only desired service to run, without any backend database. (Which was the case with me.). After this surgery, I was able to bring down the disk usage to about 750 MB. And of-course, fewer number of packages. I can use that in the %post to delete the un-necessary RPMs!
I created a copy of the original install tree and deleted those rpms from the CentOS directory, which I did not find installed on a freshly installed machine using the "@core" group.
When I was done with doing so, I created another XEN VM, and used this new (shrunk) install-tree to install the new VM to make sure it works. And it did!
Now, to use this install tree on my server on the internet, I can do one of the following:
- Push the repository tarball to my XEN physical host/server on internet,
- Or, make a script to "wget" all the required packages from a CENTOS mirror, create a repo for the installer, and make that available through yum on that server.
The first method is kind of immediately do-able, but not "exciting". It definitely involves copying all the install tree to the XEN host up there. To do the second method, I created a kind of script, which can pull the packages from any install tree on the internet and populate the CentOS directory on my own install-tree. Good enough, but still not geeky enough.
What I want to do now, is to be able to parse comps.xml file, present in the repodata directory of any regular install tree, find out the packages needed for "@core" and then pull those packages from the regular install tree into my own install tree. (This would be geeky/cool.)
And when I can do that, I can then create an actual bootable ISO out of it using help from many posts on the internet (mentioned at the end of this document).
Packages which can be removed from @core
Here is the list of packages which I found in CENTOS-5.4-x86_64, which I was successfully able to remove, using yum, without any damage to the OS. (about 118 packages)
aspell aspell-en atk authconfig autofs avahi avahi-compat-libdns_sd bitstream-vera-fonts bluez-gnome bluez-libs bluez-utils cairo ccid coolkey cpuspeed crash cups cups-libs desktop-file-utils dhcpv6-client dnsmasq dos2unix dosfstools ecryptfs-utils ed eject fbset finger firstboot-tui fontconfig freetype GConf2 gpm gtk2 hicolor-icon-theme htmlview ifd-egate iptables-ipv6 irda-utils irqbalance jwhois krb5-workstation ksh libdrm libICE libjpeg libnotify libpng libSM libtiff libwnck libX11 libXau libXcursor libXdmcp libXext libXfixes libXft libXi libXinerama libXrandr libXrender libXres libXt libXxf86vm mailcap man man-pages mdadm mesa-libGL microcode_ctl mkbootdisk mtools nano NetworkManager NetworkManager-glib newt notification-daemon ntsysv numactl ORBit2 pam_ccreds pam_krb5 pam_pkcs11 pam_smb pango paps pcmciautils pcsc-lite pcsc-lite-libs pinfo procmail rdate redhat-lsb redhat-menus rhpl rp-pppoe rsh sendmail setuptool slang sos specspo startup-notification syslinux system-config-network-tui system-config-securitylevel-tui tcpdump trousers unix2dos vconfig wireless-tools words wpa_supplicant xorg-x11-filesystem ypbind yp-tools yum-updatesd
References/Further Reading
Some smart people have already done this. Below are some links for reference: