mirror of
https://huihui.cat/mirrors/MikroTikPatch.git
synced 2026-03-14 19:29:45 +01:00
Update mikrotik_patch_7.yml
Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
parent
c7f31476e7
commit
0e6364e06a
1 changed files with 9 additions and 2 deletions
11
.github/workflows/mikrotik_patch_7.yml
vendored
11
.github/workflows/mikrotik_patch_7.yml
vendored
|
|
@ -300,12 +300,19 @@ jobs:
|
|||
run: |
|
||||
sudo modprobe nbd
|
||||
sudo apt-get install -y qemu-utils > /dev/null
|
||||
truncate --size 128M chr-$LATEST_VERSION$ARCH.img
|
||||
sgdisk --clear --set-alignment=2 \
|
||||
--new=1::+32M --typecode=1:EF00 --change-name=1:"RouterOS Boot" \
|
||||
--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" \
|
||||
--gpttombr=1:2 \
|
||||
chr-$LATEST_VERSION$ARCH.img
|
||||
dd if=chr-$LATEST_VERSION$ARCH.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$ARCH.img
|
||||
dd if=chr.img of=chr-$LATEST_VERSION$ARCH.img bs=1 count=446 conv=notrunc
|
||||
dd if=pt.bin of=chr-$LATEST_VERSION$ARCH.img bs=1 count=66 seek=446 conv=notrunc
|
||||
sudo qemu-nbd -c /dev/nbd0 -f raw chr-$LATEST_VERSION$ARCH.img
|
||||
sudo mkfs.vfat -n "Boot" /dev/nbd0p1
|
||||
sudo mkfs.ext4 -F -L "RouterOS" -m 0 /dev/nbd0p2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue