tazlito rev 507

Do not use efi shell
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jun 02 15:45:33 2018 +0200 (15 months ago)
parents 15343f90d12e
children 8b6be2b2d776
files tazlito
line diff
     1.1 --- a/tazlito	Wed May 30 15:51:10 2018 +0200
     1.2 +++ b/tazlito	Sat Jun 02 15:45:33 2018 +0200
     1.3 @@ -478,30 +478,16 @@
     1.4  		if [ ! -s $basedir/efi/boot/$efifile ] &&
     1.5  		   [ $(get $((0x82)) "$1") == $((0x4550)) ]; then
     1.6  			mkdir -p $basedir/efi/boot 2> /dev/null
     1.7 -			ln "$1" "$basedir/efi/boot/$(basename $1).efi"
     1.8 +			ln "$1" "$basedir/efi/boot/$efifile"
     1.9  			stat -c "%s %n" "$1"
    1.10  			for i in $basedir/boot/rootfs* ; do
    1.11  				ln "$i" $basedir/efi/boot/ &&
    1.12  				stat -c "%s %n" "$i"
    1.13  			done 2> /dev/null
    1.14 -			efilinux="/EFI/BOOT/$(basename $1).efi"
    1.15 -			sed 's|/|\\|g' >> $basedir/efi/boot/startup.nsh <<EOT
    1.16 -# start tazlito $efilinux
    1.17 -@echo -off
    1.18 -set -v num 0
    1.19 -for %i run (1 20)
    1.20 -  if exist FS%num%:$efilinux then
    1.21 -    echo -on
    1.22 -    FS%num%:
    1.23 -    $efilinux rw root=0x100 autologin\
    1.24 +			sed 's|/|\\|g' > $basedir/efi/boot/linux.cmdline <<EOT
    1.25 +rw root=0x100 autologin\
    1.26  $( ( cd $basedir/efi/boot ; ls -r rootfs*gz ) | while read f ; do \
    1.27 -[ "$efifile" == "bootx64.efi" -a -s $basedir/efi/boot/${f}64 ] && \
    1.28 -f=${f}64; echo -n " initrd=/EFI/BOOT/$f";done)
    1.29 -    @echo -off
    1.30 -  endif
    1.31 -  set -v num %i
    1.32 -endfor
    1.33 -# stop tazlito $efilinux
    1.34 +echo -n " initrd=/EFI/BOOT/$f";done)
    1.35  EOT
    1.36  		fi
    1.37  		shift
    1.38 @@ -1282,13 +1268,9 @@
    1.39  		cmp $i ${b%.efi} || continue
    1.40  		rm -f $i
    1.41  		case "$i" in
    1.42 -		*vmlinuz*) sed -i '/# start tazlito /,/# stop tazlito /d' \
    1.43 -				$(dirname $i)/startup.nsh
    1.44 +		*vmlinuz*) rm -f $(dirname $i)/linux.cmdline ;;
    1.45  		esac
    1.46 -		if [ ! -s $(dirname $i)/startup.nsh ]; then
    1.47 -			rm $(dirname $i)/startup.nsh
    1.48 -			rmdir $1/efi/boot && rmdir $1/efi
    1.49 -		fi
    1.50 +		rmdir $1/efi/boot && rmdir $1/efi
    1.51  	done 2> /dev/null
    1.52  }
    1.53