Various fixes for bios key creation
This commit is contained in:
parent
1c2829b34f
commit
b45d5bfbed
1 changed files with 6 additions and 4 deletions
10
init.sh
10
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
|
||||
|
|
Reference in a new issue