Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am installing a RHEL 5.5. I have seen one DVD that have a complex %pre script in ks.cfg and it used some customized python scripts in /mnt/runtime. It's cool and I wish to customize installation like that. I believe /mnt/runtime and its files are provided by anaconda, but how to add customized files in it (or some other directories that exist during installation)?

I read about anaconda / kickstart manuals but don't find much information regarding this.

Please comment

Thanks! XM

share|improve this question
    
Can you be more specific about the customization you want to perform? You probably DO want a kickstart file. –  JeffG Mar 3 '11 at 1:51
add comment

2 Answers

up vote 0 down vote accepted

Procedure for custom install DVD:

  1. Create a custom kickstart file. (You can install the OS on a system interactively, once, then harvest the anaconda-ks.cfg file from /root to get started. You can modify that file to suit your needs.
  2. Copy the RHEL/CentOS install DVD to a working folder (we will call it /tmp/dvdroot), and don't forget the hidden .treeinfo and .diskinfo files.
  3. Copy your customized kickstart file (we will assume it's called ks.cfg) to /tmp/dvdroot.
  4. Edit /tmp/dvdroot/isolinux/isolinux.cfg. There are several blocks of label/kernel/append. Duplicate one, and edit one to resemble this:

label special

kernel vmlinuz

append ks=cdrom:/ks.cfg initrd=initrd.img

Run the following commands

cd /tmp/dvdroot

mkisofs -quiet -r -T -J -V "Special Install Disk" -b isolinux/isolinux.bin \ -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \ -boot-info-table -o ../special-dvd.iso .

Do not forget that last dot on the previous command.

Now burn /tmp/special-dvd.iso to blank DVD media:

cdrecord -dao /tmp/special-dvd.iso

When you use the DVD to install a system and you get to the install prompt, enter special.

share|improve this answer
    
These instructions were tested with RHEL5.4. They should work with any Enterprise Linux version 5.x (i.e. Centos5.x or RHEL5.x) and will very likely work with any Fedora since Fedora 7. –  JeffG Mar 3 '11 at 14:18
    
I have not vetted these instructions, but at first glance, they look helpful: cinq.com/2008/04/14/… –  JeffG Mar 3 '11 at 14:21
add comment

The best thing to do is to provide the files via HTTP, either directly or via a yum repo.

share|improve this answer
    
By HTTP, do you mean to have it look for the files on LAN with specific URL? –  X.M. Mar 2 '11 at 2:10
    
Yes. HTTP as used by a browser, rpm, and yum. –  Ignacio Vazquez-Abrams Mar 2 '11 at 2:11
    
Thanks for the sound solution. However I realized we don't have a stable resource (to provide the files), nor connection to them; the server will be running in a existing, stable telecom topology. Do you have a solution that comes with single DVD and include all custom files on it? My guess is I need to modify some anaconda resources. –  X.M. Mar 2 '11 at 2:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.