Switch bootloader from elilo to grub-efi-ia64 on ia64
This commit is contained in:
parent
ab3cd32e27
commit
6544f2d076
|
@ -12,6 +12,7 @@ debian-cd (3.1.24) UNRELEASED; urgency=medium
|
||||||
[ John Paul Adrian Glaubitz ]
|
[ John Paul Adrian Glaubitz ]
|
||||||
* Add grub-efi{,{-ia64,{-bin}}} to tools/generate_di+k_list on ia64
|
* Add grub-efi{,{-ia64,{-bin}}} to tools/generate_di+k_list on ia64
|
||||||
* Remove elilo from tools/generate_di+k_list on {i386,ia64}
|
* Remove elilo from tools/generate_di+k_list on {i386,ia64}
|
||||||
|
* Switch bootloader from elilo to grub-efi-ia64 on ia64
|
||||||
|
|
||||||
-- Holger Levsen <holger@debian.org> Wed, 20 Feb 2019 14:12:16 +0100
|
-- Holger Levsen <holger@debian.org> Wed, 20 Feb 2019 14:12:16 +0100
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Based on boot-arm64
|
||||||
#
|
#
|
||||||
# boot-ia64
|
# Do install stuff for ia64, including making bootable CDs
|
||||||
|
# Works with debian-installer
|
||||||
#
|
#
|
||||||
# $1 is the CD number
|
# $1 is the CD number
|
||||||
# $2 is the temporary CD build dir
|
# $2 is the temporary CD build dir
|
||||||
|
@ -8,6 +11,10 @@
|
||||||
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
# Workaround for #823881:
|
||||||
|
export MTOOLS_SKIP_CHECK=1
|
||||||
|
|
||||||
N=$1
|
N=$1
|
||||||
CDDIR=$2
|
CDDIR=$2
|
||||||
|
@ -30,33 +37,98 @@ else
|
||||||
DI_WWW_HOME=$(echo $DI_WWW_HOME | sed "s,%ARCH%,$ARCH,")
|
DI_WWW_HOME=$(echo $DI_WWW_HOME | sed "s,%ARCH%,$ARCH,")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case "$MKISOFS" in
|
||||||
|
*xorriso*)
|
||||||
|
XORRISO_VER=$(xorriso_version)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ERROR: debian-cd depends on xorriso for making $ARCH bootable CDs."
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
cd $CDDIR/..
|
cd $CDDIR/..
|
||||||
|
|
||||||
# Download boot images
|
BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinuz cdrom/debian-cd_info.tar.gz"
|
||||||
for image in boot.img; do
|
|
||||||
|
# Download boot images.
|
||||||
|
for image in $BOOT_IMAGES; do
|
||||||
if [ ! -e "$image" ]; then
|
if [ ! -e "$image" ]; then
|
||||||
if [ ! "$DI_WWW_HOME" ];then
|
dir=$(dirname $image)
|
||||||
if [ ! "$DI_DIR" ];then
|
mkdir -p $dir
|
||||||
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
|
||||||
fi
|
cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
|
||||||
cp "$DI_DIR/cdrom/$image" . || \
|
elif [ ! "$DI_WWW_HOME" ];then
|
||||||
cp "$DI_DIR/$image" .
|
if [ ! "$DI_DIR" ];then
|
||||||
else
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
||||||
$WGET "$DI_WWW_HOME/cdrom/$image" || \
|
fi
|
||||||
$WGET "$DI_WWW_HOME/$image"
|
cp "$DI_DIR/$image" "$image"
|
||||||
fi
|
else
|
||||||
|
$WGET "$DI_WWW_HOME/$image" -O "$image"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p boot$N/boot
|
mkdir -p $CDDIR/$INSTALLDIR
|
||||||
cp -f boot.img boot$N/boot/
|
cp -lf cdrom/vmlinuz $CDDIR/$INSTALLDIR/
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-emul-boot"
|
cp -lf cdrom/initrd.gz $CDDIR/$INSTALLDIR/
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b boot/boot.img"
|
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-c boot/boot.catalog"
|
|
||||||
|
|
||||||
bls=$(calc_boot_size "boot$N/boot/boot.img")
|
# Boot setup including config and help files comes from d-i.
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-load-size $bls"
|
mkdir -pv $PWD/boot$N
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"
|
cat cdrom/debian-cd_info.tar.gz | (cd boot$N/; tar zx)
|
||||||
|
|
||||||
# done
|
if [ -d boot$N/grub ] ; then
|
||||||
|
echo " Adding EFI boot code for $ARCH on CD$N"
|
||||||
|
|
||||||
|
# Move GRUB files to the right place.
|
||||||
|
mkdir -p $CDDIR/EFI/boot
|
||||||
|
mcopy -n -s -i boot$N/grub/efi.img '::efi/*' $CDDIR/EFI
|
||||||
|
mkdir -p $CDDIR/boot/grub
|
||||||
|
mv boot$N/grub/* $CDDIR/boot/grub/
|
||||||
|
rmdir boot$N/grub
|
||||||
|
|
||||||
|
# Stuff the EFI boot files into a FAT filesystem, making it as
|
||||||
|
# small as possible. We end up re-packing like this in case we're
|
||||||
|
# making a multi-arch image
|
||||||
|
|
||||||
|
# First, work out how many blocks we need
|
||||||
|
blocks=$(calculate_efi_image_size $CDDIR)
|
||||||
|
|
||||||
|
# Now make a new image to contain the files
|
||||||
|
rm -f $CDDIR/boot/grub/efi.img
|
||||||
|
mkfs.msdos -v -C "$CDDIR/boot/grub/efi.img" $blocks >/dev/null
|
||||||
|
|
||||||
|
# And copy them into place
|
||||||
|
mmd -i "$CDDIR/boot/grub/efi.img" ::efi
|
||||||
|
mcopy -o -s -i "$CDDIR/boot/grub/efi.img" $CDDIR/EFI/* \
|
||||||
|
"::efi"
|
||||||
|
|
||||||
|
# Ugh - different code here depending on the version of xorriso we've got
|
||||||
|
if [ $XORRISO_VER -le 10202 ] ; then
|
||||||
|
echo "ERROR: debian-cd depends on xorriso > 1.2.2 for making $ARCH bootable CDs."
|
||||||
|
exit 1;
|
||||||
|
elif [ $XORRISO_VER -gt 10202 ] ; then
|
||||||
|
echo " Using newer EFI support in xorriso $XORRISO_VER"
|
||||||
|
|
||||||
|
# Location of the EFI boot image, and don't emulate a floppy or HD
|
||||||
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-e boot/grub/efi.img -no-emul-boot"
|
||||||
|
|
||||||
|
# Add an *extra* partition on the end for the EFI bits
|
||||||
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-append_partition 2 0xef $CDDIR/boot/grub/efi.img"
|
||||||
|
|
||||||
|
# And force alignment
|
||||||
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-partition_cyl_align all"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Finally, belt and braces - fix up the %install% entries in grub
|
||||||
|
# in case they're still there
|
||||||
|
sed -i "s,\%install\%,$INSTALLDIR,g" $CDDIR/boot/grub/grub.cfg
|
||||||
|
|
||||||
|
# Substitute custom KERNEL_PARAMS into grub.cfg
|
||||||
|
sed -i "s,/vmlinuz ,/vmlinuz $KERNEL_PARAMS ,g" $CDDIR/boot/grub/grub.cfg
|
||||||
|
|
||||||
|
else
|
||||||
|
echo " No EFI boot code for $ARCH on CD$N"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# th,th, thats all
|
||||||
|
|
Loading…
Reference in New Issue