Tag Archives: installation

How to create a bootable auto-install DVD image of Red Hat Enterprise Linux 6 with kickstart file in it?

Normally, Red Hat Enterprise Linux DVD ISOs or some other ISOs like from CentOS or Oracle Enterprise Linux can be installed using kickstart file which can be stored in some network location or disk location. But what if one wants to create an ISO with Kickstart file in the bootable disk itself?

Requirements: Whenever the disk is inserted into CDROM and booted with the same, the machine shall automatically be installed and configured.

Here are the steps to do that. Take a Red Hat Enterprise Linux 6 machine to perform the steps below.

1. Mount the DVD iso at some location, lets say /mnt

    # mount -o loop /downloaded/rhel-server-6.4-x86_64-dvd.iso /mnt

2. Make sure that all files will be copied which start with .

    # shopt -s dotglob

3. Copy all the files to some directory from the ISO.

    # cp -avRf /mnt/* /test/

4. Enter into the same directory and put the kickstart file in it.

    # cd /test/
    # wget ftp://192.168.0.254/ks.cfg
    # ls

5. Now make isolinux.cfg file writable and make changes in it.  

    # chmod a+w isolinux/isolinux.cfg
    # vi isolinux/isolinux.cfg

Make following changes.

~~~
label linux
  menu label ^Install using Kickstart by Pushpendra
  menu default
  kernel vmlinuz
  append initrd=initrd.img ks=cdrom:/ks.cfg
~~~

6. Make that file read only again.

    # chmod a-w isolinux/isolinux.cfg

7. Create an ISO file now.

   # mkisofs -J -T -o /tmp/rhel6modified.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -m TRANS.TBL -graft-points /test/

Now boot with the iso file, you can get the splashscreen as well.

Now burn this iso on the DVD and boot the machine with the same, it will now automatically install the machine with kickstart file.

Leave a comment

Filed under Uncategorized

How to Configure Local Repository using a DVD iso in Red Hat Enterprise Linux/CentOS/Oracle Enterprise Linux?

To install softwares/packages in Red Hat Enterprise Linux, one needs to use either yum or rpm.

The full form of yum is Yellow Dog Updater Modifier, it uses rpm in background. If one installs packages using rpm, he/she needs to resolve the dependencies of the packages by himself/herself whereas in yum, the dependencies are automatically gets resolved, with the help of yum metadata, which can be created through local repository.

Repository of packages is a collection of rpm packages helping yum to resolve dependencies and install them properly using user friendly way.

To create a repository in Red Hat Enterprise Linux 6.4, using Local DVD iso, follow the steps given below. The steps can be used for Red Hat Enterprise Linux, CentOS or for Oracle Enterprise Linux as well.

Image

[1] Mount the DVD ISO to any directory.

    # ls
    /tmp/rhel-server-6.4-x86_64-dvd.iso

    # mkdir /localrepo
    # mount -o loop /tmp/rhel-server-6.4-x86_64-dvd.iso /localrepo

[2] Make an entry in /etc/fstab file to make that mount permanent across reboots.

# echo “/tmp/rhel-server-6.4-x86_64-dvd.iso  /localrepo  iso9660 defaults,loop 0 0” » /etc/fstab

[3] Take backup of all your old repositories.

    # mkdir /old_repo

    # mv /etc/yum.repos.d/* /old_repo/

[4] Create the following file in /etc/yum.repos.d/ which is your new repository now.

    # vi /etc/yum.repos.d/myrepo.repo
    [rhel-local]
    name=Red Hat Enterprise Linux 6.4 Local repository
    baseurl=file:///localrepo
    enabled=1
    gpgcheck=0

[5] Run the following commands to clean the old yum cache and create new cache.

    # yum clean all

    # rm -rf /var/cache/yum/*

    # yum makecache

    # yum repolist

[6] The following commands will show the group information of packages.

    # yum grouplist

    # yum install ‘<packagename>’

In this way, one can install the packages through local repository.

Leave a comment

Filed under Uncategorized