wok rev 20311

syslinux/isohybrid.sh: resize EFI partition (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 14 22:22:48 2018 +0200 (3 months ago)
parents 00bd612becea
children f215c72530a6
files syslinux/stuff/tools/isohybrid.sh
line diff
     1.1 --- a/syslinux/stuff/tools/isohybrid.sh	Mon May 14 17:12:15 2018 +0200
     1.2 +++ b/syslinux/stuff/tools/isohybrid.sh	Mon May 14 22:22:48 2018 +0200
     1.3 @@ -194,15 +194,13 @@
     1.4  	store32 $(($e + 4)) $(($partype + $epart))
     1.5  	store32 $(($e + 8)) $offset
     1.6  	sectorcount=$(($cylinders * $heads * $sectors))
     1.7 -	store32 $(($e + 12)) $sectsize
     1.8 -	efi_len=$(($sectorcount - $efi_ofs))
     1.9 +	store32 $(($e + 12)) $sectorcount
    1.10  	if [ -n "$efi_ofs" ]; then
    1.11 +		efi_len=$(($sectorcount - $efi_ofs))
    1.12  		[ $(read16 0 1024) -eq 35615 -a $(read16 11 0) -ne 35615 ] &&
    1.13  		ddq bs=512 conv=notrunc skip=2 seek=44 count=20 if=$iso of=$iso
    1.14 -		store32 $((446+16)) $(((($efi_ofs / $sectors / $heads) << 24) +
    1.15 -				(($efi_ofs % $sectors + 1) << 16) +
    1.16 -				(($efi_ofs / $sectors % $heads) << 8)))
    1.17 -		store32 $((446+16+4)) $((0xEF + $epart))
    1.18 +		store32 $((446+16)) $((0xFFFFFE00))
    1.19 +		store32 $((446+16+4)) $((0xFFFFFEEF))
    1.20  		store32 $((446+16+8)) $efi_ofs
    1.21  		store32 $((446+16+12)) $efi_len
    1.22  		uudecode <<EOT | unlzma | ddq bs=512 seek=1 of=$iso conv=notrunc