blob: 5f04c13252424e51495009c0bbf9f60429052b56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
prepareBootImage() {
dd if=/dev/zero bs=1k count=$BOOTDISKSIZE of=$MBD_FILENAME 2>/dev/null
mkdosfs -C $MBD_FILENAME $BOOTDISKSIZE >/dev/null
mount -o loop -t vfat $MBD_FILENAME $MBD_BOOTTREE
mkdir -p $MBD_BOOTTREE/EFI/boot
cp $MBD_FSIMAGE $MBD_BOOTTREE/EFI/boot/initrd.img
cp -a $BOOTDISKDIR/* $MBD_BOOTTREE/EFI/boot/
cp $KERNELROOT/boot/efi/EFI/redhat/vmlinuz-* $MBD_BOOTTREE/EFI/boot/vmlinuz
cp $MBD_BOOTTREE/EFI/boot/elilo.efi $MBD_BOOTTREE/EFI/boot/bootia64.efi
cat > $MBD_BOOTTREE/EFI/boot/elilo.conf << EOF
prompt
timeout=50
relocatable
image=vmlinuz
label=linux
read-only
initrd=initrd.img
EOF
# make a copy in the root of the image
cp $MBD_BOOTTREE/EFI/boot/* $MBD_BOOTTREE/
}
makeBootImages() {
mkdir -p $TOPDESTPATH/images/pxeboot
makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd.img \
--initrdsize 12288 \
--loaderbin loader \
--modules "$INITRDMODS sgiioc4"
[ $? = 0 ] || exit 1
# make a boot iso
mkdir -p $TOPDESTPATH/images/isopath
cp -l $TOPDESTPATH/images/boot.img $TOPDESTPATH/images/isopath
mkisofs -quiet -o $TOPDESTPATH/images/boot.iso -b boot.img -no-emul-boot -R -J -V "$PRODUCT" -T $TOPDESTPATH/images/isopath
rm -rf $TOPDESTPATH/images/isopath
# make a pxe dir with kernel + initrd
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
}
|