LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 02-13-2007, 07:16 AM   #1
futureechos
LQ Newbie
 
Registered: Feb 2007
Posts: 1

Rep: Reputation: 0
Question Kickstart - 99% there need help on hdlist


I'm setting up a netinstall over NFS so I can auto install about 40 servers.

(REDHAT AS4 x86_64)

It's mostly there. It boots off the networks and partitions the disk into logical volumes etc.

When it starts to install the packages it fails as there is mismatch between the hdlist and the contents of the NFS shared RPMS directory.

I've rebuilt the list using the genhdlist from the anaconda-runtime package but this just abnormal terminates the installer.

I've read that genhdlist is redundant and should be replaced with yum and createrepo?

Does anyone know how to correctly regenerate the hdlist,hdlist2 and comps.xml in order to match your RPMS/ repository?

Thanks in advance.


Futureechos
 
Old 01-29-2008, 05:17 AM   #2
amemait
LQ Newbie
 
Registered: Jan 2008
Location: Texas
Distribution: Red Hat, Fedora, CentOS, Slackware, Mint, Ubuntu, +
Posts: 15

Rep: Reputation: 1
Need help building an ISO

Quote:
Originally Posted by futureechos View Post
I'm setting up a netinstall over NFS so I can auto install about 40 servers.

(REDHAT AS4 x86_64)

It's mostly there. It boots off the networks and partitions the disk into logical volumes etc.

When it starts to install the packages it fails as there is mismatch between the hdlist and the contents of the NFS shared RPMS directory.

I've rebuilt the list using the genhdlist from the anaconda-runtime package but this just abnormal terminates the installer.

I've read that genhdlist is redundant and should be replaced with yum and createrepo?

Does anyone know how to correctly regenerate the hdlist,hdlist2 and comps.xml in order to match your RPMS/ repository?

Thanks in advance.


Futureechos
I'm looking for the same answer for RHEL5. I have RPM packages that I've build that I need to add to the ISO. I can't get them off the network because kickstart doesn't handle trunked VLANs. I'm trying to make our installs completely contained on one DVD.

So far, I've found out-of-date references to genhdlist (which is deprecated and isn't included in RHEL5). But I'm new to spinning a new ISO and createrepo and have been finding it difficult to find resources on the steps required to build an ISO.

Any pointers are appreciated!
 
Old 01-31-2008, 01:53 AM   #3
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
just in case you are looking for alternatives:

i also have custom rpms and does a lot of net based
installs for test/dev machines.

but i don't fiddle with ISOs of my RHELx/CentOSx sources.

in my kickstart files, i have these lines:

/usr/bin/wget http://kshost/ks/machine_post_install.sh
/bin/mv machine_post_install.sh /etc/rc.d/init.d/machine_post_install.sh
chmod +x /etc/rc.d/init.d/machine_post_install.sh
ln -s /etc/rc.d/init.d/machine_post_install.sh /etc/rc.d/rc3.d/S86machine_post_install

the script machine_post_install.sh then has all the customization we
need for each machine.

the script is launched on the next bootup after the ks install
and it deletes itselfs from the system before doing another
restart.

hth.
 
Old 02-01-2008, 06:04 PM   #4
amemait
LQ Newbie
 
Registered: Jan 2008
Location: Texas
Distribution: Red Hat, Fedora, CentOS, Slackware, Mint, Ubuntu, +
Posts: 15

Rep: Reputation: 1
Quote:
Originally Posted by born4linux View Post
just in case you are looking for alternatives:

i also have custom rpms and does a lot of net based
installs for test/dev machines.

but i don't fiddle with ISOs of my RHELx/CentOSx sources.

in my kickstart files, i have these lines:

/usr/bin/wget http://kshost/ks/machine_post_install.sh
/bin/mv machine_post_install.sh /etc/rc.d/init.d/machine_post_install.sh
chmod +x /etc/rc.d/init.d/machine_post_install.sh
ln -s /etc/rc.d/init.d/machine_post_install.sh /etc/rc.d/rc3.d/S86machine_post_install

the script machine_post_install.sh then has all the customization we
need for each machine.

the script is launched on the next bootup after the ks install
and it deletes itselfs from the system before doing another
restart.

hth.
Thanks for the info! That's a cool way to do the task.

My problem is that many (most, if not all) of my current installations involve servers that are connected to the network via trunked VLANs, and the installer doesn't have trunked VLAN capability and I must use CDs/DVD media - thus the desire to remaster the ISOs.

My other alternative is to just do the basic install with the existing ISOs/media, configure the network for the trunked VLANs (either manually or with %post script commands in the kickstart), and then wget/scp the extra RPMs, etc.. I'm just trying to create an "all-in-one" solution to improve our deployment time.

I do appreciate the great suggestion for wget. If we can get a "spare" switch port provisioned without trunked VLANs, we could actually do that. 'Course our telecomm/networking group always tell us that ports are very expensive and they have no spares.

I'll definitely post a follow-up if I get my ISOs created the way *I* want them!
 
Old 02-14-2008, 06:57 AM   #5
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
Thumbs up

Quote:
Originally Posted by born4linux View Post
just in case you are looking for alternatives:

i also have custom rpms and does a lot of net based
installs for test/dev machines.

but i don't fiddle with ISOs of my RHELx/CentOSx sources.

in my kickstart files, i have these lines:

/usr/bin/wget http://kshost/ks/machine_post_install.sh
/bin/mv machine_post_install.sh /etc/rc.d/init.d/machine_post_install.sh
chmod +x /etc/rc.d/init.d/machine_post_install.sh
ln -s /etc/rc.d/init.d/machine_post_install.sh /etc/rc.d/rc3.d/S86machine_post_install

the script machine_post_install.sh then has all the customization we
need for each machine.

the script is launched on the next bootup after the ks install
and it deletes itselfs from the system before doing another
restart.

hth.


That is a nice little trick
 
Old 04-14-2009, 06:10 AM   #6
pitbull7270
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Rep: Reputation: 0
RHEL 5.x boot iso

Not sure if anyone ever answered this, this is how I make bootable SOs of RHEL 5.x

1.Download the media from http://www.redhat.com and save to /tmp
2.Create a directory structure

mkdir -p /build/rhel52

3.Mount the ISO

mount -oloop /tmp/rhel-5-server-x86_64-dvd.iso /mnt

4.Copy the files from the DVD to the /build/rhel52 directory

rsync -rv /mnt/* /build/rhel52
cp /mnt/.discinfo /build/rhel52
cp /mnt/.treeinfo /build/rhel52

5.At this point we can remove unneeded RPMs and directories(VT, Cluster, ClusterStorage), on a running system generate a list of RPMs by running the following command:

rpm -qa --queryformat '%{name},%{version}-%{release},%{arch}\n' | sort -n > /tmp/rhel5.2-rpm

6.We need to add .rpm to the list we just generated

cat /tmp/rhel5.2-rpm | sed 's/$/.rpm/g' > /build/rhel52/rhel52-list

7.Get a list of the available RPMs from the media

ls -1 /build/rhel52/Server > /build/rhel52/rhel52-all

8.Generate a list of not needed files

diff -uNr /build/rhel52/rhel52-list /build/rhel52/rhel52-all | grep ^+ > /build/rhel52/remove-list

9.Need to remove 3 lines in the rhel52-all list

vi /build/rhel52-all - Remove TRANS.TBL and repodata - also the top line of the file

10.Create a script to remove the unneeded files

#!/bin/ksh
#uncomment the next line for troubleshooting
#set -x
LINES=`cat remove-list | wc -l`
LINE_NO=1
while [ $LINE_NO -le $LINES ]
do
BADFILE=`sed -n "${LINE_NO}p" remove-list`
rm -f /build/rhel52/Server/$BADFILE
LINE_NO=`expr $LINE_NO + 1 `
done

11.We need to fix the repositories that are a part of the RHEL media

createrepo -g /build/rhel52/Server/repodata/comps-rhel5-server-core.xml /build/rhel52/Server

12.Create a directory for your files

mkdir /build/rhel52/addons

15.Copy files to the addons directory

cp /pathtofiles/addons/* /build/rhel52/addons/

13.Create kickstart file from the kickstart server (I have a webpage that I use to create my kickstarts)
Copy kickstart file to build directory

cp kickstart_file /build/rhel52

14.Vi the kickstart file and change the following:

change the url --url http:// line to cdrom

Insert this above %post:
%post --nochroot
mount /tmp/cdrom /mnt/sysimage/mnt

Change the lines from /bin/rpm -Uhv http:// to /bin/rpm -Uhv /mnt/addons/

Also any references to wgets can be included in the addons directory then copied to location

15.To make install easier vi the /build/rhel52/isolinux/boot.msg and cp the 2nd line that says "To install or upgrade in text mode" and paste under the use the function key line.

splash.lss

- To install or upgrade in graphical mode, press the 01<ENTER>07 key.
- To install or upgrade in text mode, type: 01linux text <ENTER>07.
- Use the function keys listed below for more information.

- To install the RHEL 5.2 DFS Image, type: 01linux ks=cdrom:/rhel52.ks.cfg<ENTER>07.

The bottom line is the install line, the 01 on the front and 07 on the end is actually a control key sequence that makes the text bold

16.Once that is completed you can run the following to create the ISO image:

mkisofs -r -T -J -V "RHEL52 DVD" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /tmp/rhel52.iso /build/rhel52
 
Old 06-02-2009, 08:52 AM   #7
pyarkitna
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
script not working

Hi,
Thanks for posting this script but apparently there are two errors coming up when using it.

1. Diff command doesnt actually come up with remove-list but just add both all and list files which is quite starange coz when i check diff on other files it returns only the difference but no > or < with concatinating both files

2. Script expecting integer value instead of LINES and some other errors are coming up on line 6 and 7 with sed and rm commands.

Could you please let me know if u have got any fix for that. Thanks.
 
  


Reply

Tags
custom, installation, iso, redhat, remaster, rhel, rpms


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
no hdlist file on update cd nouvellebie Mandriva 5 08-15-2006 08:16 AM
No hdlist error kep51 Linux - Newbie 2 02-26-2006 03:28 PM
hdlist error on 9.2 install....please help!!! caduceus Mandriva 16 11-15-2003 10:17 AM
9.2 hdlist.cz problem mmc Mandriva 2 10-16-2003 10:22 PM
no hdlist found ckleavitt Linux - Software 6 03-06-2002 11:16 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 04:17 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
Open Source Consulting | Domain Registration