From 0b2510fbf9a48e722fbbf709f74000a1a0aafc88 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Thu, 17 Aug 2023 10:51:56 +0200 Subject: [PATCH] =?utf8?q?Zapisano=20poprzedni=C4=85=20=C5=9Bcie=C5=BCk?= =?utf8?q?=C4=99=20przed=20przje=C5=9Bciem=20do=20katalogu=20GRUB-a=20w=20?= =?utf8?q?katalogu=20'staging'=20=C5=9Brodowiska,=20aby=20mo=C5=BCna=20by?= =?utf8?q?=C5=82o=20przed=20utworzeniem=20p=C5=82yty=20powr=C3=B3ci=C4=87?= =?utf8?q?=20na=20miejsce=20docelowe.=20Dodano=20poprzedni=C4=85=20lokaliz?= =?utf8?q?cj=C4=99=20do=20=C5=9Bcie=C5=BCek=20wskazuj=C4=85cych=20na=20pli?= =?utf8?q?k=20log=C3=B3w=20podczas=20tworzenia=20partycji=20EFI.=20Tam=20g?= =?utf8?q?dzie=20zauwa=C5=BCno=20zosta=C5=82y=20r=C3=B3wnie=C5=BC=20zmieno?= =?utf8?q?ne=20=C5=9Bcie=C5=BCki?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- immudex-build | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/immudex-build b/immudex-build index ed79a56..2791727 100755 --- a/immudex-build +++ b/immudex-build @@ -17,7 +17,7 @@ function help() { function create_enviroment() { echo -n "Installation of packages needed to build immudex..."; - sudo apt update >> ~/immudex_build.log 2>&1; + sudo apt update >> immudex_build.log 2>&1; sudo apt install -y debootstrap squashfs-tools xorriso isolinux syslinux-efi grub-pc-bin grub-efi-amd64-bin mtools dosfstools >> immudex_build.log 2>&1; if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi } @@ -51,7 +51,7 @@ if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi #Copying chroot script to chroot directory: echo -n "Copying chroot script to chroot directory..."; -sudo cp -vv ${HOME}/immudex-testing/versions/base.sh ${HOME}/build/immudex-testing/${arch}/chroot >> ~/immudex_build.log 2>&1; +sudo cp -vv ${HOME}/immudex-testing/versions/base.sh ${HOME}/build/immudex-testing/${arch}/chroot >> immudex_build.log 2>&1; if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi #Executing chroot script, at least i trying: @@ -120,16 +120,18 @@ grub-mkstandalone --format=x86_64-efi --output=${HOME}/build/immudex-testing/${a if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi #Creating additional EFI partition: +oldcwd=$(pwd); cd ${HOME}/build/immudex-testing/${arch}/staging/boot/grub; echo -n "Creating addtitional EFI partition..."; -dd if=/dev/zero bs=1M of=efiboot.img count=20 >> immudex_build.log 2>&1; +dd if=/dev/zero bs=1M of=efiboot.img count=20 >> ${oldcwd}/immudex_build.log 2>&1; sudo mkfs.vfat efiboot.img >> immudex_build.log 2>&1; -echo "-==Creating MS-DOS directory: $(date)==-" >> immudex_build.log; -sudo mmd -i efiboot.img efi efi/boot >> immudex_build.log 2>&1; -sudo mcopy -vi efiboot.img ${HOME}/build/immudex-testing/${arch}/staging/EFI/boot/bootx64.efi ::efi/boot >> immudex_build.log 2>&1; +echo "-==Creating MS-DOS directory: $(date)==-" >> ${oldcwd}/immudex_build.log; +sudo mmd -i efiboot.img efi efi/boot >> ${oldcwd}/immudex_build.log 2>&1; +sudo mcopy -vi efiboot.img ${HOME}/build/immudex-testing/${arch}/staging/EFI/boot/bootx64.efi ::efi/boot >> ${oldcwd}/immudex_build.log 2>&1; if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi #Create iso image: +cd $oldcwd; echo -n "Creating iso image..."; xorriso as mkisofs -iso-level 3 -o "immudex-testing${arch}.iso" -full-iso9660-filenames -volid "immudex-testing${arch}" -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -eltorito-boot isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table --eltorito-catalog isolinux/isolinux.cat -eltorito-alt-boot -e /boot/grub/efiboot.img -no-emul-boot -isohybrid-gpt-basdat -append_partition 2 0xef ${HOME}/build/immudex-testing/${arch}/staging/boot/grub/efiboot.img ${HOME}/build/immudex-testing/${arch}/staging >> immudex_build.log 2>&1; if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi -- 2.39.5