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

Re: Rebuilding minimal install iso RHEL 4 (U1)



On 10/4/05, Greg Hosler wrote:
> On 04-Oct-2005 Michael Stiller wrote:
> > Any clues on the rebuild image issue?
>
> sure. setup a installation server, and serve it out via nfs (or ftp, or httpd,
> though nfs is my personal favorite).
>
> Not only will you dump the multi-cd issue, it'll be faster.
>
> Check out the RHEL-SAG documentation. info on setting up a installation server
> is all in there. If you have any questions, or problems after reading this,
> contact me off line.

Attached are my simple notes on creating a HTTP kickstart install point (due to
some local quirks, I cannot use NFS or PXEBOOT) and a truly minimal kickstart
file from CentOS4 (warning: I haven't actually used it, and it makes your system
not LSB compliant). If that won't meet your needs, I'd recommend doing
a network
install as described in "Non-Kickstart Network Installations and
Upgrades" and using
the generated anaconda-ks.cfg file as a framework for your kickstarts.

Please keep comments on the list, maybe we can all learn something. :)
Title: KickStart - SIG Wiki

KickStart

We keep the installation tree for the latest version of Red Hat Enterprise Linux AS (Advanced Server) for network installs with a generic kickstart file that sets keyboard language, network install URL, basic server packages, and other local settings. Kickstart installs are usually much faster than CD installs since you can specify settings beforehand and do not need to switch CDs. Since we are academic users, we almost always install AS since it includes both the necessary server and desktop software; see [WWW] http://www.redhat.com/software/rhel/faq/#5 for more information.

If you can boot linux from the system, the easiest way to start a kickstart install is from your bootloader. Copy the files from images/pxeboot/ and put them in /boot; here is an example grub section:

title kickstart install
        root (hd0,0)
        kernel /pxeboot/vmlinuz ks=http://your-host/rhel/ks.cfg ksdevice=link ramdisk=32768
        initrd /pxeboot/initrd.img 

To perform a kickstart install from CD, burn the installation CD (CD#1) and boot from it. At the boot: prompt, type "linux [WWW] http://your-host/rhel/ks.cfg" to use the generic kickstart file. The installer will prompt you for other necessary information such as partition sizes, ethernet configuration, and so on.

Alternatively, before instaling you may copy the generic file to something like servername.cfg, add in your specific preferences, and point the installer to that file. For more information about the kickstart files, see [WWW] the Red Hat manual section about Kickstart Installations.

Upgrades

To upgrade an installation, you can use the copy the generic kickstart file and change the install line to upgrade. You can even directly [WWW] boot the installer using GRUB. Of course, you probably want to remove all the extra post-installation stuff.

Non-Kickstart Network Installations and Upgrades

Unfortunately, sometimes kickstart installations don't work, for example because of a driver or setup problem in anaconda (the Red Hat installer). If you find that kickstart isn't working, the best option is to do a network install. At the boot: prompt, type "linux askmethod" (or "linux text askmethod" for the faster text-mode installation). At the menu choose an HTTP install. The server name is 127.0.0.1 (your-host, ip address is much faster) and the directory is rhel/4as (extra slashes are OK but unnecessary).

If this does not work and you can't find a network connectivity problem, you may need to just burn all the binary CDs and install that way. It is also possible to create custom CDs, see [WWW] http://people.redhat.com/rkeech/custom-distro.txt

  • (!) You can also use a network install to create a kickstart file. After an install, the anaconda installer leaves a working kickstart file based on your install as /root/anaconda-ks.cfg. You can comment anything you don't want out of the kickstart file (i.e., partitioning information), and the installer will ask you.

Setting up the network installation server

This describes a method for sysadmins to create an install point without copying the RPMs from the ISOs. The goal is to create a single place that looks like one really big CD (or DVD) to anaconda, the Red Hat installer. This will need to be done for every new release or update CD set.

Make sure you have enough room for 4 CDs on the server, then go to the [WWW] RHN website, click on "Channels" then click on "Easy ISOs" on the left.

  1. Find the correct Channel, currently "Red Hat Enterprise Linux AS (v. 4 for 32-bit x86)," then download them on the server:

    mkdir -p /ISO/4as
    cd /ISO/4as
    nohup wget -c 'LONG-URL-disc1.iso' &
    nohup wget -c 'LONG-URL-disc2.iso' &
    nohup wget -c 'LONG-URL-disc3.iso' &
    nohup wget -c 'LONG-URL-disc4.iso' &
    
  2. Make directories and add the ISOs to /etc/fstab (same as mount -t iso9660 -o loop=/dev/loop1 RHEL4-i386-AS-disc1.iso disc1)

    mkdir {disc1,disc2,disc3,disc4}
    cat >> /etc/fstab <<EOF
    /ISO/4as/RHEL4-i386-AS-disc1.iso /ISO/4as/disc1 iso9660 loop=/dev/loop1 0 0
    /ISO/4as/RHEL4-i386-AS-disc2.iso /ISO/4as/disc2 iso9660 loop=/dev/loop2 0 0
    /ISO/4as/RHEL4-i386-AS-disc3.iso /ISO/4as/disc3 iso9660 loop=/dev/loop3 0 0
    /ISO/4as/RHEL4-i386-AS-disc4.iso /ISO/4as/disc4 iso9660 loop=/dev/loop4 0 0
    EOF
    mount disc1
    mount disc2
    mount disc3
    mount disc4
    

    You should now be able to look inside the ISOs with a command like ls /ISO/4as/disc2/RedHat/.

  3. Set up a hierarchy and add symbolic links (ignore the TRANS.TBL warnings)

    mkdir -p /ISO/4as/RedHat/RPMS/
    ln -s /ISO/4as/disc1/RedHat/base/ /ISO/4as/RedHat/
    ln -s /ISO/4as/disc1/RedHat/TRANS.TBL /ISO/4as/RedHat/
    ln -s /ISO/4as/disc1/RedHat/RPMS/* /ISO/4as/RedHat/RPMS
    ln -s /ISO/4as/disc2/RedHat/RPMS/* /ISO/4as/RedHat/RPMS
    ln -s /ISO/4as/disc3/RedHat/RPMS/* /ISO/4as/RedHat/RPMS
    ln -s /ISO/4as/disc4/RedHat/RPMS/* /ISO/4as/RedHat/RPMS
    

    You now have a complete monolithic image, which could also be used to [WWW] make a DVD

  4. Make it all web-accessible

    mkdir /var/www/html/rhel
    cd /var/www/html/rhel
    ln -s /ISO/4as .
    

last edited 2005-06-17 20:47:54 by JoshuaDF

Attachment: tiny.cfg
Description: Binary data


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