Skip to content

Instantly share code, notes, and snippets.

@szampardi
Forked from xrobau/extract.sh
Last active March 24, 2025 07:11
Show Gist options
  • Save szampardi/388301ede6243ff6271a5f94061f643c to your computer and use it in GitHub Desktop.
Save szampardi/388301ede6243ff6271a5f94061f643c to your computer and use it in GitHub Desktop.
smbios/msdm pve
#!/bin/bash
# On the 'donor' machine, boot a live linux ISO (Ubuntu or whatever)
# and connect it to the internet. Then run these commands, which will
# dump the contents to sprunge.us so you can retrieve them easily. Or
# copy them manually, whatever.
mkdir -p /tmp/MSDM
cd /tmp/MSDM
for f in SLIC MSDM; do
[ -e /sys/firmware/acpi/tables/$f ] && cat /sys/firmware/acpi/tables/$f > $f.bin
done
dmidecode -t 0 -u | awk '/^\t\t[0-9A-F][0-9A-F]( |$)/' | xxd -r -p > smbios_type_0.bin
dmidecode -t 1 -u | awk '/^\t\t[0-9A-F][0-9A-F]( |$)/' | xxd -r -p > smbios_type_1.bin
# This adds the correct params to qemu so it uses the extracted files from the donor machine
echo "args: -acpitable file=$MDIR/SLIC -acpitable file=$MDIR/MSDM -smbios file=$MDIR/smbios_type_0.bin -smbios file=$MDIR/smbios_type_1.bin"

Comments are disabled for this gist.