-
-
Save szampardi/388301ede6243ff6271a5f94061f643c to your computer and use it in GitHub Desktop.
smbios/msdm pve
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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.