From 50aeb4f2c6107b2e36e64ebc6ea241349cd0182b Mon Sep 17 00:00:00 2001 From: zyb Date: Tue, 16 Jul 2024 16:44:22 +0800 Subject: [PATCH] modified: chr.sh --- chr.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chr.sh b/chr.sh index be2c28a..b1052f7 100644 --- a/chr.sh +++ b/chr.sh @@ -1,14 +1,14 @@ #!/bin/bash apt-get install -y sgdisk extlinux > /dev/null 2>&1 dd if=/dev/zero of=/dev/sda bs=1 count=512 conv=notrunc -sgdisk --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" --gpttombr=1:2 /dev/sda -dd if=/dev/sda of=pt.bin bs=1 count=66 skip=446 -echo -e "\x80" | dd of=pt.bin bs=1 count=1 conv=notrunc +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" --gpttombr=1:2 /dev/sda +dd if=/dev/sda of=/tmp/pt.bin bs=1 count=66 skip=446 +echo -e "\x80" | dd of=/tmp/pt.bin bs=1 count=1 conv=notrunc dd if=/dev/zero of=/dev/sda bs=1 count=512 conv=notrunc -sgdisk --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" /dev/sda -wget -O mbr.bin https://raw.gitmirror.com/elseif/MikroTikPatch/main/mbr.bin -dd if=mbr.bin of=/dev/sda bs=1 count=446 conv=notrunc -dd if=pt.bin of=/dev/sda bs=1 count=66 seek=446 conv=notrunc +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" /dev/sda +wget -O /tmp/mbr.bin https://raw.gitmirror.com/elseif/MikroTikPatch/main/mbr.bin +dd if=/tmp/mbr.bin of=/dev/sda bs=1 count=446 conv=notrunc +dd if=/tmp/pt.bin of=/dev/sda bs=1 count=66 seek=446 conv=notrunc sync mkfs.vfat -n "Boot" /dev/sda1 mkfs.ext4 -F -L "RouterOS" -m 0 /dev/sda2