LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Kickstart redhat installation from a single dvd. (https://www.linuxquestions.org/questions/linux-distributions-5/kickstart-redhat-installation-from-a-single-dvd-861564/)

udaypratapyati 02-09-2011 03:32 AM

Kickstart redhat installation from a single dvd.
 
Hi all,

i learnt that there is a way where we can automate the installation of redhat using a kickstart script. But everywhere they talk about doing that from bootable floppy image.

i have a single dvd of redhat (RHEL5). Can any one tell how can i kickstart the installation using the kickstart script i,e. where do i place the ks.cfg file on the disk and what command to be given at boot prompt. (kickstart from dvdrom and not from any network).

pls suggest if there are any changes to be done for the above mentioned job.

thanks.
UDAY.

udaypratapyati 02-09-2011 03:34 AM

if someone can provide me with a kickstart script (ks.cfg)that will be of great help for me.

thanks.
UDAY

EricTRA 02-09-2011 03:57 AM

Hello,

If you want to include the kickstart file to your DVD, you'll first have to the contents of the DVD (beware of hidden files) to another directory, make your changes, rebuild the image with mkisofs or something like that and then burn that image to DVD. From that point on you'll have a bootable DVD with kickstart. You'll also have to change your isolinux.cfg to point to the kickstart file.

You can find all the information you need at the following site:

Kickstart Installation RedHat

Kind regards,

Eric

phil.d.g 02-09-2011 04:02 AM

You can use the net install iso image to bootstrap a kickstart installation. The way that works for me is to put the kickstart file on an internal http server accessible by the machine that is being setup.

The official documentation is very good and thorough:

http://www.redhat.com/magazine/024oc...res/kickstart/
http://docs.redhat.com/docs/en-US/Re...ickstart2.html

EricTRA 02-09-2011 04:08 AM

Hi Phil,

That does work also but the OP specifically mentioned:
Quote:

(kickstart from dvdrom and not from any network).
Kind regards,

Eric

phil.d.g 02-09-2011 04:20 AM

Oops, my bad.

udaypratapyati 02-09-2011 06:16 AM

Quote:

Originally Posted by EricTRA (Post 4252818)
Hi Phil,

That does work also but the OP specifically mentioned:


Kind regards,

Eric

Hi Eric,

this worked for me thanx...

One more question....
How can i link a shell script such that it executes once the installation completes?

Thanks in advance.
Uday.

EricTRA 02-09-2011 08:38 AM

Hello,

Basically you include your script in your DVD (in a directory extra for example) and upon installation you copy the contents of that directory to your harddisk after installation. Then you just call it from your kickstart script. I've sent you one of my kickstart files so you can have a look at it.

Kind regards,

Eric

udaypratapyati 02-11-2011 03:33 AM

Quote:

Originally Posted by EricTRA (Post 4253070)
Hello,

Basically you include your script in your DVD (in a directory extra for example) and upon installation you copy the contents of that directory to your harddisk after installation. Then you just call it from your kickstart script. I've sent you one of my kickstart files so you can have a look at it.

Kind regards,

Eric


Sorry i am new to this... couldn't get what i wanted from the script. If you don't mind can u please explain how can copy files from the cdrom to the harddisk and how do i call the script that is included in the "Extra" dir.

this is what i tried in the post section.... (Note: i have not defined any pre section)

Quote:

%post --nochroot
(
cd /media/RHEL\ 5.4\ iso/isolinux
cp *.sh /root/
) >> /root/install-custom.log
but after installation files were not copied...and neither the log file was present. Also pls tell how do i call the script..

Thanks.
Uday.

EricTRA 02-20-2011 12:59 AM

Hello,

Read the script I send you again, you forgot some critical parts, like mounting the cdrom, so it's normal that files aren't copied. You need to mount and then copy. I assure you the ks.cfg I sent you works, but you need to read it carefully, not forgetting or eliminating crucial stuff.

Kind regards,

Eric

udaypratapyati 02-22-2011 02:44 AM

Quote:

Originally Posted by EricTRA (Post 4264471)
Hello,

Read the script I send you again, you forgot some critical parts, like mounting the cdrom, so it's normal that files aren't copied. You need to mount and then copy. I assure you the ks.cfg I sent you works, but you need to read it carefully, not forgetting or eliminating crucial stuff.

Kind regards,

Eric

Hi Eric,

Can u pls explain this...
Quote:

# where the root of the new system is mounted
ROOT=/mnt/sysimage

# where we save the source media information (should mathc the "pre" section)
SOURCE_DESC=/tmp/cdrom.ls
i could not get these.... as i don't see anything called cdrom.ls infact in my working system i found /dev/cdrom and /dev/cdrom-hdc present

also pls breif on /mnt/sysimgae stuff....
This will be of great help.

Thanks in advance....
Uday.

udaypratapyati 02-26-2011 01:26 AM

Thanks Eric,

Thanks a lot...
The script file worked for my purpose except for a couple of places...

1. i had something like this...
Quote:

cp -r /tmp/sysimage/root/Extras/myfiles/* tmp/sysimage/usr/share/applications/
which worked.... but... the same thing if i try to do it on desktop doesn't...

Quote:

cp -r /tmp/sysimage/root/Extras/myfiles/* /tmp/sysimage/root/Desktop/
****** this doesn't work *****
any information regarding this will be of great help to me....

one more question....

Quote:

the following command
Quote:

ls /home/ >/root/myfile.txt
creates the file "myfile.txt" but does not contain the anything in it though i have some users created...
will the ls command not work during the installation time? or is there any other way to do it?

Thanks again.
Uday.

Rogue45 07-27-2012 03:46 PM

Very easy to do this. You will have to make a new install disc though.
1) To Modify kickstart to install from cdrom make sure this is in command section
# Install from a cdrom
cdrom

2) Go into the .iso file(you will have to unzip it) and modify /isolinux/isolinux.cfg to this:
Change this line: append initrd=initrd.img
to this: append initrd=initrd.img ks=cdrom:/ks.cfg

Put your ks.cfg at the top level of the install disc.
Put your modified .iso on the top level of disc and you're good to go.

Now your kickstart is on the same disc and will install using it.


All times are GMT -5. The time now is 11:14 PM.