Possible Syslinux for bios parameters fixes
This commit is contained in:
parent
7f3ab8830c
commit
838ea9ce7f
1 changed files with 15 additions and 8 deletions
23
init.sh
23
init.sh
|
@ -147,13 +147,8 @@ then
|
||||||
echo -e "\nCreating partition"
|
echo -e "\nCreating partition"
|
||||||
parted -s ${dest} mklabel msdos mkpart primary fat32 1MiB 100% set 1 boot on
|
parted -s ${dest} mklabel msdos mkpart primary fat32 1MiB 100% set 1 boot on
|
||||||
mkfs.vfat ${dest}1 -n debian &> /dev/null
|
mkfs.vfat ${dest}1 -n debian &> /dev/null
|
||||||
if [[ $BOOT_TYPE == "bios" ]]
|
|
||||||
then
|
# mount and copy
|
||||||
# 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
|
create_dir $MOUNT_DIR
|
||||||
mount ${dest}1 $MOUNT_DIR
|
mount ${dest}1 $MOUNT_DIR
|
||||||
echo "copying all file to USB drive"
|
echo "copying all file to USB drive"
|
||||||
|
@ -161,5 +156,17 @@ then
|
||||||
cp -R syslinux $MOUNT_DIR &> /dev/null
|
cp -R syslinux $MOUNT_DIR &> /dev/null
|
||||||
if [[ $BOOT_TYPE == "efi64" ]];then cp -R EFI $MOUNT_DIR &> /dev/null; fi
|
if [[ $BOOT_TYPE == "efi64" ]];then cp -R EFI $MOUNT_DIR &> /dev/null; fi
|
||||||
umount $MOUNT_DIR
|
umount $MOUNT_DIR
|
||||||
exit 0
|
sleep 5
|
||||||
|
# Make key bootable if bios.
|
||||||
|
if [[ $BOOT_TYPE == "bios" ]]
|
||||||
|
then
|
||||||
|
# In this 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}
|
||||||
|
sleep 5
|
||||||
|
cd ${TMP_DIR}/syslinux-${SYSLINUX_VERSION}/bios/linux/
|
||||||
|
linux32 syslinux --directory /syslinux/ --install ${dest}1
|
||||||
|
cd $current_dir
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
Reference in a new issue