From fda08d6a68f001e6b7e0bf9b7d1f7202ec91f1fc Mon Sep 17 00:00:00 2001 From: zyb Date: Mon, 24 Jun 2024 03:23:03 +0800 Subject: [PATCH] modified: .github/workflows/mikrotik_patch.yml --- .github/workflows/mikrotik_patch.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/mikrotik_patch.yml b/.github/workflows/mikrotik_patch.yml index 54ee99d..d870a89 100644 --- a/.github/workflows/mikrotik_patch.yml +++ b/.github/workflows/mikrotik_patch.yml @@ -158,23 +158,23 @@ jobs: run: | sudo modprobe nbd sudo apt install -y qemu-utils extlinux > /dev/null - sudo truncate --size 128M chr-$LATEST_VERSION.img - sudo sgdisk --clear --set-alignment=2 \ + truncate --size 128M chr-$LATEST_VERSION.img + sgdisk --clear --set-alignment=2 \ --new=1::+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" --attributes=1:set:2 \ --new=2::-0 --typecode=2:8300 --change-name=2:"RouterOS" \ chr-$LATEST_VERSION.img - sudo dd if=chr-$LATEST_VERSION.img of=pt.bin bs=1 count=66 skip=446 - echo -e "\x80" | sudo dd of=dbt.bin bs=1 count=1 conv=notrunc - sudo sgdisk --mbrtogpt --clear --set-alignment=2 \ + dd if=chr-$LATEST_VERSION.img of=pt.bin bs=1 count=66 skip=446 + echo -e "\x80" | dd of=pt.bin bs=1 count=1 conv=notrunc + sgdisk --mbrtogpt --clear --set-alignment=2 \ --new=1::+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" --attributes=1:set:2 \ --new=2::-0 --typecode=2:8300 --change-name=2:"RouterOS" \ chr-$LATEST_VERSION.img - sudo dd if=mbr.bin of=chr-$LATEST_VERSION.img bs=1 count=446 conv=notrunc - sudo dd if=pt.bin of=chr-$LATEST_VERSION.img bs=1 count=66 seek=446 conv=notrunc + dd if=mbr.bin of=chr-$LATEST_VERSION.img bs=1 count=446 conv=notrunc + dd if=pt.bin of=chr-$LATEST_VERSION.img bs=1 count=66 seek=446 conv=notrunc sudo qemu-nbd -c /dev/nbd0 -f raw chr-$LATEST_VERSION.img sudo mkfs.vfat -n "Boot" /dev/nbd0p1 - sudo mkfs.ext4 -F -L "RouterOS" -m 0 -i 16384 -I 128 /dev/nbd0p2 + sudo mkfs.ext4 -F -L "RouterOS" -m 0 /dev/nbd0p2 sudo mkdir -p ./img/{boot,routeros} sudo mount /dev/nbd0p1 ./img/boot/ sudo mkdir -p ./img/boot/{BOOT,EFI/BOOT}