summaryrefslogtreecommitdiffstats
path: root/scripts/mk-images.i386
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-05-16 21:29:40 +0000
committerJeremy Katz <katzj@redhat.com>2006-05-16 21:29:40 +0000
commitaf3dad24d83bf95094ad44134522dcedf62a213a (patch)
tree60ba892102731fa469e45c81481f1982d6177ac6 /scripts/mk-images.i386
parent49b0c0efe16c7e822895d03fd420a6618e7043a5 (diff)
downloadanaconda-af3dad24d83bf95094ad44134522dcedf62a213a.tar.gz
anaconda-af3dad24d83bf95094ad44134522dcedf62a213a.tar.xz
anaconda-af3dad24d83bf95094ad44134522dcedf62a213a.zip
2006-05-16 Jeremy Katz <katzj@redhat.com>
* scripts/mk-images.x86: Merge i386 and x86_64 script into one. * scripts/mk-images.i386: And then remove the old. * scripts/mk-images.x86_64: Likewise.
Diffstat (limited to 'scripts/mk-images.i386')
-rw-r--r--scripts/mk-images.i386142
1 files changed, 0 insertions, 142 deletions
diff --git a/scripts/mk-images.i386 b/scripts/mk-images.i386
deleted file mode 100644
index 17fe2c942..000000000
--- a/scripts/mk-images.i386
+++ /dev/null
@@ -1,142 +0,0 @@
-SYSLINUX=$IMGPATH/usr/lib/syslinux/syslinux-nomtools
-
-if [ ! -f $SYSLINUX ]; then
- echo "Warning: nomtools syslinux doesn't exist"
- SYSLINUX=$IMGPATH/usr/bin/syslinux
- if [ ! -f $SYSLINUX ]; then
- echo "$SYSLINUX doesn't exist"
- exit 1
- fi
-fi
-
-# prepare a directory with the kernel, initrd, and various message files
-# used to populate a boot image
-prepareBootTree() {
- (cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)
-
- cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
- cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
-
- $IMGPATH/usr/lib/anaconda-runtime/splashtolss.sh $BOOTDISKDIR/syslinux-splash.png $BOOTDISKDIR/splash.lss
- if [ $? != 0 ]; then
- echo $0: Failed to create splash.lss
- exit 1
- fi
- cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss
- rm -f $MBD_BOOTTREE/syslinux-splash.png
- rm -f $MBD_BOOTTREE/memtest*
- for file in $BOOTDISKDIR/*.msg; do
- filename=`basename $file`
- sed -e "s/@VERSION@/$VERSION/g" $file > $MBD_BOOTTREE/$filename
- done
- if [ $? != 0 ]; then
- echo $0: Failed to copy messages from $BOOTDISKDIR to $MBD_BOOTTREE.
- umount $MBD_BOOTTREE
- rm -rf $MBD_BOOTTREE $MBD_TMPIMAGE
- exit 1
- fi
-}
-
-mkdir -p $TOPDESTPATH/images/pxeboot
-cat > $TOPDESTPATH/images/README <<EOF
-This directory contains image files that can be used to create media
-capable of starting the $PRODUCT installation process.
-
-The boot.iso file is an ISO 9660 image of a bootable CD-ROM. It is useful
-in cases where the CD-ROM installation method is not desired, but the
-CD-ROM's boot speed would be an advantage.
-
-To use this image file, burn the file onto CD-R (or CD-RW) media as you
-normally would.
-
-The diskboot.img file is a VFAT filesystem image that can be written to a
-USB pendrive or other bootable media larger than a floppy. Note that
-booting via USB is dependent on your BIOS supporting this. It should
-be written to the device using dd.
-EOF
-
-makeBootImages() {
- if [ "$kerneltag" != "xenU" ]; then
- echo "Building $KERNELARCH initrd.img"
- makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd.img \
- --initrdsize 7000 \
- --loaderbin loader \
- --modules "$INITRDMODS"
- [ $? = 0 ] || exit 1
-
- if [ -f $IMGPATH/usr/lib/syslinux/isolinux.bin ]; then
- echo "Building isolinux directory"
- MBD_BOOTTREE=$TOPDESTPATH/isolinux
- MBD_FSIMAGE=$TOPDESTPATH/images/pxeboot/initrd.img
- mkdir $MBD_BOOTTREE 2>/dev/null
- cp $IMGPATH/usr/lib/syslinux/isolinux.bin $MBD_BOOTTREE/isolinux.bin
-
- prepareBootTree
-
- # isolinux needs the config file to be isolinux.cfg
- mv $MBD_BOOTTREE/syslinux.cfg $MBD_BOOTTREE/isolinux.cfg
-
- # copy in memtest if present
- if [ -f $IMGPATH/usr/lib/anaconda-runtime/boot/memtest* ]; then
- cp $IMGPATH/usr/lib/anaconda-runtime/boot/memtest* $MBD_BOOTTREE/memtest
- echo -e "label memtest86\n kernel memtest\n append -\n" >> $MBD_BOOTTREE/isolinux.cfg
- fi
- else
- echo "No isolinux binaries. Skipping isolinux creation"
- fi
-
- # clean up time -- being very explicit about what's linked
- if [ -f $TOPDESTPATH/isolinux/vmlinuz -a -f $TOPDESTPATH/isolinux/initrd.img ] ;then
- echo "Cleaning up images"
- # links for the pxeboot bits
- rm -f $TOPDESTPATH/images/pxeboot/*
- ln $TOPDESTPATH/isolinux/vmlinuz $TOPDESTPATH/images/pxeboot/vmlinuz
- ln $TOPDESTPATH/isolinux/initrd.img $TOPDESTPATH/images/pxeboot/initrd.img
-
- # links for the autoboot bits
- if [ -f $TOPDESTPATH/dosutils/loadlin.exe ]; then
- rm -f $TOPDESTPATH/dosutils/autoboot/*
- mkdir -p $TOPDESTPATH/dosutils/autoboot/
- ln $TOPDESTPATH/isolinux/vmlinuz $TOPDESTPATH/dosutils/autoboot/vmlinuz
- ln $TOPDESTPATH/isolinux/initrd.img $TOPDESTPATH/dosutils/autoboot/initrd.img
- fi
- fi
-
- # now make a boot iso
- mkdir -p $TOPDESTPATH/images/isopath
- cp -rl $TOPDESTPATH/isolinux $TOPDESTPATH/images/isopath
- mkisofs -quiet -o $TOPDESTPATH/images/boot.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -V "$PRODUCT" -T $TOPDESTPATH/images/isopath
- rm -rf $TOPDESTPATH/images/isopath
-
- # now make a boot pendrive image
- mkdir -p $TOPDESTPATH/images/fobpath
- dd if=/dev/zero of=$TOPDESTPATH/images/diskboot.img bs=1M count=8 2>/dev/null
- mkdosfs $TOPDESTPATH/images/diskboot.img
- $SYSLINUX $TOPDESTPATH/images/diskboot.img
- mount -o loop $TOPDESTPATH/images/diskboot.img $TOPDESTPATH/images/fobpath
- cp -r $TOPDESTPATH/isolinux/* $TOPDESTPATH/images/fobpath/
- grep -v local $TOPDESTPATH/images/fobpath/isolinux.cfg > $TOPDESTPATH/images/fobpath/syslinux.cfg
- rm -f $TOPDESTPATH/images/fobpath/isolinux.cfg
- umount -f $TOPDESTPATH/images/fobpath
- rmdir $TOPDESTPATH/images/fobpath
-
- cat > $TOPDESTPATH/images/pxeboot/README <<EOF
-The files in this directory are useful for booting a machine via PXE.
-
-The following files are available:
-vmlinuz - the BOOT kernel used for the installer
-initrd.img - an initrd with support for all install methods and
- drivers supported for installation of $PRODUCT
-EOF
-
- else # set up the boot stuff for the xen guest kernel
- echo "Building $KERNELARCH guest initrd.img"
- mkdir -p $TOPDESTPATH/images/xen
- makeinitrd --initrdto $TOPDESTPATH/images/xen/initrd.img \
- --initrdsize 7000 \
- --loaderbin loader \
- --modules "$INITRDMODS"
- [ $? = 0 ] || exit 1
- cp $KERNELROOT/boot/vmlinuz-*xenU $TOPDESTPATH/images/xen/vmlinuz
- fi
-}