small custom CD issue/question
Brad Doctor
bdoctor at ps-ax.com
Wed Mar 16 18:31:33 UTC 2005
You need to add the keyword 'reboot' to your ks.cfg.
> I have built a custom CD and ks.cfg file to do an automated install and
> setup. It's a fairly stripped-down package set with the Core and Base
> groups and a few additional individual rpm's. The only odd thing is
> that when it's done and returns to the "Complete, press <ENTER> to
> reboot" screen, pressing <ENTER> does nothing. I have to
> <CTL>+<ALT>+<DEL> to reboot. I'm hoping that someone has seen this
> behavior before (and figured out what caused it!)
>
> Below are the isolinux.cfg file and ks.cfg files.
>
> Thanks in advance!
> Gordon Keegan
>
>
> isolinux.cfg:
> ------------
> serial 0 9600
> default local
> prompt 1
> timeout 600
> display boot.msg
> F1 boot.msg
> F2 examples.msg
> F3 help.msg
>
> label local
> localboot 0x80
>
> label install
> kernel vmlinuz
> append initrd=initrd.img ks=cdrom:/ks.cfg local text
>
> label install-serial
> kernel vmlinuz
> append initrd=initrd.img ks=cdrom:/ks.cfg local text console=tty0
> console=ttyS0,9600n8
>
> label rescue
> kernel vmlinuz
> append initrd=initrd.img text rescue
>
> label noks
> kernel vmlinuz
> append initrd=initrd.img
>
>
>
> ks.cfg:
> ------
> install
> lang en_US
> langsupport en_US
> keyboard us
> mouse none
> rootpw --iscrypted $1encryptedrootpasswordhashstring.
> text
> cdrom
> firewall --disabled
> authconfig --enableshadow --enablemd5
> timezone --utc America/New_York
> bootloader --linear --location=mbr
>
> ##
> ## <!> Don't want X and don't probe for a monitor
> ##
>
> skipx
> #xconfig --monitor=vga
>
> ##
> ## <!> parts.ks is created below in the %pre section
> ##
>
> %include /tmp/parts.ks
>
> ##
> ## <!> Here is our package list
> ## '-' at start of the package name indicates exclusion.
> ## This ought to remove packages that are part of Base
> ## We include kernel-* because RHN cannot provision those
> ## due to the up2date PkgSkipList
> ##
>
> %packages
> @Base
> compat-libstdc++
> XFree86-libs
> glibc-headers
> libcap
> libgcj
> libpcap
> libtool-libs
> lockdev
> m4
> ntp
> perl-CGI
> perl-CPAN
> perl-DB_File
> perl-suidperl
> sendmail-cf
> strace
> usbutils
> zsh
>
>
>
> ##----------------------------------------------------------------------
> -----##
>
> %post --nochroot
>
> ## re-create /mnt/source to get at CDROM
>
> if [ -e /tmp/cdrom ]; then
> mkdir /mnt/source
> mount /tmp/cdrom /mnt/source
> fi
>
> ## for later reference
> cat /proc/cmdline > /mnt/sysimage/var/tmp/ks-cmdline
> cat /mnt/source/ks.cfg > /mnt/sysimage/var/tmp/ks.cfg
>
> ## setup post-install scripts/dirs for chroot'ed postinstall stuff
> if [ -e /mnt/source/post/postinstall.tar ]; then
> mkdir /mnt/sysimage/var/tmp/post
> cd /mnt/source/post
> tar -cf - . | (cd /mnt/sysimage/var/tmp/post; tar -xvf -)
> cd /
> fi
>
> if [ -e /tmp/cdrom ]; then
> umount /mnt/source
> fi
>
>
> ##----------------------------------------------------------------------
> -----##
>
> %post
>
> chvt 3
>
> if grep nopost /var/tmp/ks-cmdline; then
>
> echo ""
> echo " * found 'nopost' install option ... postinstall skipped"
> echo ""
>
> else
>
>
> echo ""
> echo "Configuring tmpfs"
> echo "--------------------"
>
> if ! grep '/tmp' /etc/fstab ; then
> echo " * added a tmpfs entry to /etc/fstab"
> echo "tmpfs /tmp tmpfs
> size=1024m 1 2" >> /etc/fstab
> fi
>
> echo ""
> echo "Postinstall Stuff"
> echo "--------------------"
>
> if [ -s /var/tmp/post/postinstall.tar ]; then
> echo " * found postinstall.tar"
> echo " * extracting postinstall.tar"
>
> cd /var/tmp/post
> tar -xvf postinstall.tar
>
> fi
>
>
> ##
> ## execute post-install scripts
> ##
> if [ -f /var/tmp/post/postinstall/postinstall.sh ]; then
> echo " * executing postinstall"
> echo ""
> cd /var/tmp/post/postinstall
> bash ./postinstall.sh
> else
> echo " * ERROR - unable to acquire & execute rh-postinstall"
> fi
> sleep 2
>
>
> echo "##############################"
> echo "## CONFIGURATION COMPLETE " `date`
> echo "##############################"
>
> chvt 1
>
>
> ##----------------------------------------------------------------------
> -----##
>
> %pre
>
> ##
> ## Dynamic Partitioning
> ## The output of this script is %include(d) above
> ##
>
> NEWDEV=`sed 's/.*rootdev=\([^ $]*\).*/\1/' < /proc/cmdline`
>
> echo "##"
> echo "## newdev = $NEWDEV"
>
> if test "$NEWDEV" = "cciss" ; then
> DEVICE1="--ondisk cciss/c0d0"
>
> elif test "$NEWDEV" = "ida" ; then
> DEVICE1="--ondisk ida/c0d0"
>
> elif test "$NEWDEV" = "hd" ; then
> DEVICE1="--ondisk hda"
>
> elif test "$NEWDEV" = "sd" ; then
> DEVICE1="--ondisk sda"
>
> else
> DEVICE1="--ondisk sda"
> fi
>
> echo "## kickstart configured with $DEVICE1"
>
> cat > /tmp/parts.ks <<EOPARTS
> clearpart --all --initlabel
> part swap --size 2047 $DEVICE1 --asprimary
> part /boot --fstype ext3 --size 128 $DEVICE1
> part / --fstype ext3 --size 2047 $DEVICE1
> part /var --fstype ext3 --size 2047 $DEVICE1
> part swap --size 2047 $DEVICE1
> part /export/home --fstype ext3 --size 1 $DEVICE1 --grow --maxsize
> 1024
> EOPARTS
>
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
--
Brad Doctor, CISSP
More information about the Kickstart-list
mailing list