modified: chr.sh
This commit is contained in:
parent
68eceef92e
commit
6e01ddacd7
7
chr.sh
7
chr.sh
@ -1,21 +1,20 @@
|
||||
|
||||
sgdisk --clear --set-alignment=2 \
|
||||
sgdisk --zap-all --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=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" \
|
||||
/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
|
||||
|
||||
partprobe
|
||||
mkfs.vfat -n "Boot" /dev/sda1
|
||||
mkfs.ext4 -F -L "RouterOS" -m 0 /dev/sda2
|
||||
mkdir -p /tmp/{boot,routeros}
|
||||
|
Loading…
x
Reference in New Issue
Block a user