LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2011, 04:11 AM   #1
udaypratapyati
LQ Newbie
 
Registered: Feb 2011
Posts: 17

Rep: Reputation: 0
Make custom bootable linux cd


hi all,

i want to make a custom redhat bootable cd (RHEL5) which would contain a kickstart script for auto installation. Also there will be a shell script to copy files from the cd to harddisk at desired location.

Can anyone tell how to make

1. Custom bootable cd .
2. Where to place the kickstart script (ks.cfg) and the shell script on the cd.
3. How to boot using kickstart script.
4. How to invoke the shell script post installation.

Thanks in advance.
Uday Pratap Yati.
 
Old 02-08-2011, 04:16 AM   #2
Ashkan_s
Member
 
Registered: Jul 2008
Distribution: Fedora
Posts: 77

Rep: Reputation: 22
Take a look at revisor http://revisor.fedoraunity.org/
 
Old 02-08-2011, 04:28 AM   #3
prodev05
Member
 
Registered: Jul 2009
Location: Planet Earth
Distribution: Unix & Linux Variants
Posts: 304

Rep: Reputation: 20
You can't create a kickstart bootable CD. Instead deploy a Kickstart server and configure it, as per your needs.
 
Old 02-08-2011, 04:18 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
Wouldn't fit on a cd. A dvd with an automated install script would work. A netinstall with autoinstall script would work.

I guess you could really make a live cd that setup a kickstart server could work. Still would need a dvd unless both are very small.
 
Old 02-14-2011, 03:34 AM   #5
Eisennheart
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Rep: Reputation: 0
Automated CD

This is possible. Edit a file isolinux.cfg from the isolinux directory of the RHEL5, append ks=cdrom:/ks.cfg, as you can see below:

default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
kernel vmlinuz
append ks=cdrom:/ks.cfg initrd=initrd.img
label text
kernel vmlinuz
append initrd=initrd.img text
label ks
kernel vmlinuz
append ks initrd=initrd.img
label local
localboot 1
label memtest86
kernel memtest
append -

Place the ks.cfg at the CD/DVD root directory. You should use cdrom installation type in the ks.cfg:

....

install
cdrom
key --skip
lang en_US.UTF-8

....

Use %post to invoke scripts in post installation:

.....

%post
sed -i s/id:5:initdefault:/id:3:initdefault:/ /etc/inittab

.....

And after done in creating the CD/DVD installer, just press Enter on the linux prompt. This should now read the kickstart file from the CD/DVD.
 
Old 02-15-2011, 03:19 AM   #6
udaypratapyati
LQ Newbie
 
Registered: Feb 2011
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Eisennheart View Post
This is possible. Edit a file isolinux.cfg from the isolinux directory of the RHEL5, append ks=cdrom:/ks.cfg, as you can see below:

default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
kernel vmlinuz
append ks=cdrom:/ks.cfg initrd=initrd.img
label text
kernel vmlinuz
append initrd=initrd.img text
label ks
kernel vmlinuz
append ks initrd=initrd.img
label local
localboot 1
label memtest86
kernel memtest
append -

Place the ks.cfg at the CD/DVD root directory. You should use cdrom installation type in the ks.cfg:

....

install
cdrom
key --skip
lang en_US.UTF-8

....

Use %post to invoke scripts in post installation:

.....

%post
sed -i s/id:5:initdefault:/id:3:initdefault:/ /etc/inittab

.....

And after done in creating the CD/DVD installer, just press Enter on the linux prompt. This should now read the kickstart file from the CD/DVD.

Can u pls share a post script that copies files from the cd/dvd and places on the hard disk. This will be of great help for me... as i have been trying for the same for a long time n not able to achieve it.

Thanks in advance.
Uday.
 
Old 02-15-2011, 08:06 PM   #7
Eisennheart
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Rep: Reputation: 0
%post --nochroot

#Copy installation files from CD
(
echo
[ -d /mnt/source ] || mkdir /mnt/source
mount /tmp/cdrom /mnt/source
cp -rp /mnt/source/Data /mnt/sysimage/root/
umount /mnt/source
) >> /mnt/sysimage/root/.postnochroot
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make linux bootable ratnakant Linux - Newbie 2 04-21-2009 04:01 AM
make a bootable CD from wxWidgets in Linux. nasim_mallick LinuxQuestions.org Member Intro 1 08-01-2007 02:58 AM
How to make a bootable Linux CD depam Linux - Software 3 07-07-2006 04:24 AM
how to copy linux cd and make it bootable matt_w_lambert Linux - Software 1 03-30-2003 10:01 PM


All times are GMT -5. The time now is 10:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration