|
|
|
@ -36,6 +36,7 @@ prepareBootTree() {
|
|
|
|
|
|
|
|
|
|
ln $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
|
|
|
|
|
cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
|
|
|
|
|
cp $KERNELROOT/boot/xen-[0-9]* $MBD_BOOTTREE/xen.gz
|
|
|
|
|
|
|
|
|
|
if [ -f $IMGPATH/usr/lib/anaconda-runtime/syslinux-vesa-splash.jpg ]; then
|
|
|
|
|
cp $IMGPATH/usr/lib/anaconda-runtime/syslinux-vesa-splash.jpg $MBD_BOOTTREE/splash.jpg
|
|
|
|
@ -70,30 +71,10 @@ prepareBootTree() {
|
|
|
|
|
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.
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
makeBootImages() {
|
|
|
|
|
local initrd="initrd.img"
|
|
|
|
|
local kernelimage="vmlinuz"
|
|
|
|
|
|
|
|
|
|
if [ "$kernelvers" = "$kernelxen" ] ; then
|
|
|
|
|
local tag="${kernelvers#kernel}"
|
|
|
|
|
if [ -n "$tag" -a "$tag" != "$kernelvers" ] ; then
|
|
|
|
|
initrd="initrd${tag}.img"
|
|
|
|
|
kernelimage="vmlinuz${tag}"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
local xenimage="xen.gz"
|
|
|
|
|
|
|
|
|
|
echo "Building $initrd"
|
|
|
|
|
makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/$initrd \
|
|
|
|
@ -102,13 +83,13 @@ makeBootImages() {
|
|
|
|
|
--modules "$INITRDMODS"
|
|
|
|
|
[ $? = 0 ] || exit 1
|
|
|
|
|
|
|
|
|
|
if [ "$kernelvers" != "$kernelxen" ] ; then
|
|
|
|
|
if [ -f $IMGPATH/usr/share/syslinux/isolinux.bin ]; then
|
|
|
|
|
if [ -f $IMGPATH/usr/share/syslinux/isolinux.bin ]; then
|
|
|
|
|
echo "Building isolinux directory"
|
|
|
|
|
MBD_BOOTTREE=$TOPDESTPATH/isolinux
|
|
|
|
|
MBD_FSIMAGE=$TOPDESTPATH/images/pxeboot/initrd.img
|
|
|
|
|
mkdir $MBD_BOOTTREE
|
|
|
|
|
cp $IMGPATH/usr/share/syslinux/isolinux.bin $MBD_BOOTTREE/isolinux.bin
|
|
|
|
|
cp $IMGPATH/usr/share/syslinux/mboot.c32 $MBD_BOOTTREE/mboot.c32
|
|
|
|
|
|
|
|
|
|
prepareBootTree
|
|
|
|
|
|
|
|
|
@ -116,46 +97,21 @@ makeBootImages() {
|
|
|
|
|
mv $MBD_BOOTTREE/syslinux.cfg $MBD_BOOTTREE/isolinux.cfg
|
|
|
|
|
|
|
|
|
|
# set up the label for finding stage2 with a hybrid iso
|
|
|
|
|
sed -i "s/initrd=initrd.img/initrd=initrd.img stage2=hd:LABEL=\"$CDLABEL\"/" $MBD_BOOTTREE/isolinux.cfg
|
|
|
|
|
|
|
|
|
|
# insert XEN boot options
|
|
|
|
|
sed -i 's/kernel vmlinuz/kernel mboot.c32/' $MBD_BOOTTREE/isolinux.cfg
|
|
|
|
|
sed -i "s/append initrd=.*/append $xenimage --- $kernelimage stage2=hd:LABEL=\"$CDLABEL\" rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM --- $initrd/" $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 menu label ^Memory test\n kernel memtest\n append -\n" >> $MBD_BOOTTREE/isolinux.cfg
|
|
|
|
|
cp $IMGPATH/usr/lib/anaconda-runtime/boot/memtest* $MBD_BOOTTREE/memtest
|
|
|
|
|
echo -e "label memtest86\n menu label ^Memory test\n kernel memtest\n append -\n" >> $MBD_BOOTTREE/isolinux.cfg
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
else
|
|
|
|
|
echo "No isolinux binaries. Skipping isolinux creation"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# symlink the kernel for pxe dir
|
|
|
|
|
ln $TOPDESTPATH/isolinux/vmlinuz $TOPDESTPATH/images/pxeboot/vmlinuz
|
|
|
|
|
|
|
|
|
|
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 kernel used for the installer
|
|
|
|
|
initrd.img - an initrd with support for all install methods and
|
|
|
|
|
drivers supported for installation of $PRODUCT
|
|
|
|
|
EOF
|
|
|
|
|
cat << __EOT__ >> $TOPDESTPATH/.treeinfo
|
|
|
|
|
[images-$BASEARCH]
|
|
|
|
|
kernel = images/pxeboot/vmlinuz
|
|
|
|
|
initrd = images/pxeboot/initrd.img
|
|
|
|
|
__EOT__
|
|
|
|
|
if [ -n "$BOOTISO" ]; then echo "boot.iso = images/$BOOTISO" >> $TOPDESTPATH/.treeinfo ; fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# set up the boot stuff for the xen guest kernel
|
|
|
|
|
if [ -z "$kernelxen" -o "$kernelvers" = "$kernelxen" ] ; then
|
|
|
|
|
cp $KERNELROOT/boot/vmlinuz-$version $TOPDESTPATH/images/pxeboot/$kernelimage
|
|
|
|
|
cat << __EOT__ >> $TOPDESTPATH/.treeinfo
|
|
|
|
|
[images-xen]
|
|
|
|
|
kernel = images/pxeboot/$kernelimage
|
|
|
|
|
initrd = images/pxeboot/$initrd
|
|
|
|
|
|
|
|
|
|
__EOT__
|
|
|
|
|
fi
|
|
|
|
|
if [ -n "$BOOTISO" ]; then echo "boot.iso = images/$BOOTISO" >> $TOPDESTPATH/.treeinfo ; fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|