diff --git a/init.sh b/init.sh index fa04da6..6861243 100755 --- a/init.sh +++ b/init.sh @@ -165,7 +165,7 @@ efi_create_key_structure () { } bios_create_key_structure() { - parted -s $1 mklabel msdos mkpart debian fat32 1MiB 100% set 1 boot on + parted -s $1 mklabel msdos mkpart primary fat32 1MiB 100% set 1 boot on mkfs.vfat ${1}1 -n debian &> /dev/null mount ${1}1 $2 } @@ -228,12 +228,14 @@ case $boot_type in ;; bios) - create_dir $tmp_dir/syslinux 1 + syslinux_folder=${tmp_dir}/syslinux + create_dir $syslinux_folder for file in $SYSLINUX_BIOS_FILES do printf "copying %s\n" "$file" - cp $syslinux_modules_dir/$boot_type/$file $tmp_dir/syslinux/ + cp $syslinux_modules_dir/$boot_type/$file $syslinux_folder done + cp $repo_path/{vmlinuz,initrd.gz} $tmp_dir cp -R syslinux $tmp_dir &> /dev/null ;; esac @@ -279,7 +281,7 @@ then then # In this mode, we need to write syslinux MBR. printf "Writing syslinux mbr.ini to %s\n" "$device" - dd bs=440 count=1 conv=notrunc if=${syslinux_mod}/${boot_type}/mbr.bin of=${dest} + dd bs=440 count=1 conv=notrunc if=$syslinux_modules_dir/$boot_type/mbr.bin of=$device sleep 2 $SYSLINUX_EXE --directory /syslinux --install ${device}1 fi