tazlito rev 490
Store location of 2nd eltorito boot file
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 16 23:20:47 2018 +0100 (2018-03-16) |
parents | 4cfb991effc5 |
children | 94ef1a590b5d |
files | tazlito |
line diff
1.1 --- a/tazlito Fri Mar 16 20:15:54 2018 +0100 1.2 +++ b/tazlito Fri Mar 16 23:20:47 2018 +0100 1.3 @@ -259,11 +259,15 @@ 1.4 } 1.5 1.6 1.7 -# Force the size in the 2nd eltorito boot file (/boot/isolinux/efi.img) 1.8 +# Force size and location in the 2nd eltorito boot file (/boot/isolinux/efi.img) 1.9 1.10 fix_efi_boot_img_size() { 1.11 - i=$(stat -m $2/boot/isolinux/boot.cat | sed q) 1.12 - set -- $1 $((102+2048*$i)) $3 1.13 + i=$((2048*$(stat -m $2/boot/isolinux/boot.cat | sed q)+102)) 1.14 + set -- $1 $i $3 $i $2 1.15 + for i in $(seq 0 8 24); do 1.16 + printf '\\\\x%02X' $((($3 >> $i) & 255)) 1.17 + done | xargs echo -en | dd bs=1 conv=notrunc of=$1 seek=$2 2>/dev/null 1.18 + set -- $1 $((4+$4)) $(stat -m $5/boot/isolinux/efi.img | sed q) 1.19 for i in $(seq 0 8 24); do 1.20 printf '\\\\x%02X' $((($3 >> $i) & 255)) 1.21 done | xargs echo -en | dd bs=1 conv=notrunc of=$1 seek=$2 2>/dev/null