Bios : execute syslinux, key will be bootable
This commit is contained in:
parent
9f731578cd
commit
c3851451ed
1 changed files with 3 additions and 2 deletions
5
init.sh
5
init.sh
|
@ -11,7 +11,7 @@ DEBIAN_ARCH="amd64"
|
|||
BOOT_TYPE="efi64"
|
||||
SYSLINUX_VERSION="6.03"
|
||||
SYSLINUX_FILES="com32/menu/menu.c32 com32/menu/vesamenu.c32 com32/libutil/libutil.c32 com32/lib/libcom32.c32"
|
||||
SYSLINUX_BIOS_FILES="core/ldlinux.sys com32/elflink/ldlinux/ldlinux.c32"
|
||||
SYSLINUX_BIOS_FILES=""
|
||||
SYSLINUX_EFI_FILES="com32/elflink/ldlinux/ldlinux.e64"
|
||||
TMP_DIR="tmp"
|
||||
MOUNT_DIR="/mnt/usbstick"
|
||||
|
@ -152,13 +152,14 @@ then
|
|||
# In bis mode, we need to write syslinux MBR.
|
||||
echo "Writing syslinux mbr.ini fo $dest"
|
||||
dd bs=440 count=1 conv=notrunc if=${TMP_DIR}/syslinux-${SYSLINUX_VERSION}/bios/mbr/mbr.bin of=${dest}
|
||||
./tmp/syslinux-6.03/bios/linux/syslinux -i -d syslinux ${dest}1
|
||||
fi
|
||||
create_dir $MOUNT_DIR
|
||||
mount ${dest}1 $MOUNT_DIR
|
||||
echo "copying all file to USB drive"
|
||||
cp * $MOUNT_DIR &> /dev/null
|
||||
cp -R syslinux $MOUNT_DIR &> /dev/null
|
||||
cp -R EFI $MOUNT_DIR &> /dev/null
|
||||
if [[ $BOOT_TYPE == "efi64" ]];then cp -R EFI $MOUNT_DIR &> /dev/null; fi
|
||||
umount $MOUNT_DIR
|
||||
exit 0
|
||||
fi
|
||||
|
|
Reference in a new issue