Skip to content

Instantly share code, notes, and snippets.

@webdev23
Last active May 3, 2023 18:27
Show Gist options
  • Save webdev23/d438b4f0f9a9394f7d69563fdfefeade to your computer and use it in GitHub Desktop.
Save webdev23/d438b4f0f9a9394f7d69563fdfefeade to your computer and use it in GitHub Desktop.
QEMU MicroXP-v0.82.iso installation script from internet archives
#!/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");
};
@webdev23
Copy link
Author

webdev23 commented Aug 15, 2017

sudo apt install php qemu-kvm 
wget https://gist.githubusercontent.com/webdev23/d438b4f0f9a9394f7d69563fdfefeade/raw/001e2d68d9fc623e6812e32b887a261802bca7da/QEMU_MicroXP-v0.82.php
chmod +x QEMU_MicroXP-v0.82.php
./QEMU_MicroXP-v0.82.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment