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 |
Need help building an ISO
Quote:
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! |
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. |
Quote:
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. :rolleyes: I'll definitely post a follow-up if I get my ISOs created the way *I* want them! ;) |
Quote:
That is a nice little trick :) |
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 |
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. |
All times are GMT -5. The time now is 10:21 AM. |