Last active
May 3, 2023 18:27
-
-
Save webdev23/d438b4f0f9a9394f7d69563fdfefeade to your computer and use it in GitHub Desktop.
QEMU MicroXP-v0.82.iso installation script from internet archives
This file contains 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
#!/usr/bin/php | |
<?php | |
echo " _.-;;-._ | |
\e[15;48;5;20mMicro_xp QEMU deployment script '-..-'| || | | |
'-..-'|_.-;;-._| | |
'-..-'| || | | |
'-..-'|_.-''-._| | |
"; | |
echo "Please choose: \n"; | |
$mode = readline("[1]Boot [2]Online install [3]Offline install [4]Screen resolution: "); | |
if ($mode == "1"){ | |
echo "\nBooting with 2048Mb of ram\n"; | |
system("qemu-system-i386 -drive file=microxp,index=0,format=raw -m 2048 -vga std"); | |
}; | |
if ($mode == "2"){ | |
echo "\nDownloading iso fron archives.org (100mo)\nPlease wait!\n"; | |
system("wget -c -q --show-progress https://ia800509.us.archive.org/20/items/MicroXP0.82/MicroXP-v0.82.iso"); | |
echo "\nCompleted!\n"; | |
deploy(); | |
}; | |
if ($mode == "3"){ | |
echo "Offline install\n"; | |
if (file_exists("MicroXP-v0.82.iso")) { | |
echo "\nMicroXP-v0.82.iso found!\n"; | |
} else { | |
echo "MicroXP-v0.82.iso not found! Exit.\n"; | |
exit; | |
}; | |
deploy(); | |
}; | |
if ($mode == "4"){ | |
system("sudo sed -i '$ d' /etc/default/grub && echo \"GRUB_GFXMODE=1280x1024\" | sudo tee -a /etc/default/grub"); | |
}; | |
function deploy(){ | |
echo "\nNow creating 2GB virtual drive\nPlease wait!\n"; | |
system("qemu-img create -f raw microxp 2G "); | |
echo "Booting iso | network enabled | 2Gb ram\nPlease wait!\n"; | |
echo "Use CTRL+ALT to exit pointer from window.\n"; | |
system("qemu-system-i386 -hda microxp -cdrom MicroXP-v0.82.iso -boot d -m 2048"); | |
}; |
Author
webdev23
commented
Aug 15, 2017
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment