38 lines
1.4 KiB
Bash
38 lines
1.4 KiB
Bash
#!/bin/bash
|
|
# Build new single-file bootable images for Acronis TI 2025 (ADD) and
|
|
# Disk Director 12.5 (ABA), keeping the old file names/paths so that the
|
|
# legacy (grub4dos/xorboot) menu keeps working unchanged.
|
|
set -e
|
|
ISO=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
|
|
W=/tmp/acrbuild
|
|
rm -rf "$W"; mkdir -p "$W"
|
|
|
|
apt-get install -y grub-pc-bin grub-efi-amd64-bin mtools xorriso >/tmp/apt_grubiso.log 2>&1 || true
|
|
|
|
build_one() {
|
|
local name="$1" srcdir="$2" kernel="$3" initrds="$4"
|
|
local tree="$W/$name"
|
|
mkdir -p "$tree/boot/grub" "$tree/$srcdir"
|
|
echo "=== $name: extracting $srcdir"
|
|
7z e -y -o"$tree/$srcdir" "$ISO" "ACR/$srcdir/$kernel" $(for i in $initrds; do echo "ACR/$srcdir/$i"; done) >/dev/null
|
|
ls -l "$tree/$srcdir" | tail -3
|
|
|
|
cat > "$tree/boot/grub/grub.cfg" <<EOF
|
|
set timeout=0
|
|
set default=0
|
|
|
|
menuentry "Acronis" {
|
|
linux /$srcdir/$kernel force_modules=usbhid quiet lang=RU_ru
|
|
initrd $(for i in $initrds; do echo -n "/$srcdir/$i "; done)
|
|
}
|
|
EOF
|
|
grub-mkrescue -o "$W/$name.iso" "$tree" >/tmp/mkrescue_$name.log 2>&1 || { tail -5 /tmp/mkrescue_$name.log; return 1; }
|
|
printf " -> %s : %s bytes\n" "$name" "$(stat -c %s "$W/$name.iso")"
|
|
xorriso -indev "$W/$name.iso" -report_el_torito plain 2>&1 | grep -E 'El Torito boot img' | sed 's/^/ /'
|
|
}
|
|
|
|
build_one ADD ATI2025 dat10.dat "dat11.dat dat12.dat"
|
|
build_one ABA ADDH12 dat14.dat "dat15.dat dat16.dat"
|
|
|
|
ls -l "$W"/*.iso
|