Skip to content

Instantly share code, notes, and snippets.

@0xquad
Last active January 4, 2018 05:35
Show Gist options
  • Save 0xquad/04eb57934731c755b3b8be281d484fa0 to your computer and use it in GitHub Desktop.
Save 0xquad/04eb57934731c755b3b8be281d484fa0 to your computer and use it in GitHub Desktop.
Install a minimal version of WinXP SP3 in VirtualBox

Install an optimized size version of WinXP SP3 in VirtualBox

  1. Create a new vm
    • WinXP SP2
    • 1GB RAM
    • 40GB dynamic disk, .vdi or other
    • shared folder to the host (C:\ or /)
    • for QHD displays, set the VM zoom factor to 200% for this VM
  2. Mount fr_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73982.iso or any other WinXP installation file to the optical drive
  3. Boot, disconnect the network adapter, install
    • one large partition
  4. After installation, install Guest Additions; don't reboot but shutdown instead
  5. Create an immutable disk for the page file
    1. Create a new dynamic disk of 2GB max, name it swap or similar
    2. Boot into Windows
    3. Do a quick NTFS format of the second drive and assign a drive letter
    4. Shutdown the VM
    5. In the Media Manager, set that new swap drive to Immutable and reassign to the VM
    6. Boot into Windows and go to the page file settings
    7. Change the page file location to the second drive and define a size limit of 256-2000MB
    8. Apply changes and reboot
  6. Do customizations
    • no background
    • darken background color
    • smooth fonts (ClearType)
    • click 'show the content of this folder' in C:\, \Program Files, \Windows, \Windows\System32
    • change keyboard rate to maximum
    • if on a QHD screen, change the cursor size to the largest one in the Mouse settings
    • in any folder, sort by Type, resize columns appropriately, go to folder settings, show hidden files, show known extensions, uncheck remember settings for each folder, uncheck simple sharing, click Apply, then click Apply these settings to all folders
    • in add/remove Windows components, delete Windows Media Player, MSN Explorer, MSN Messenger, Outlook Express
    • delete shortcuts in the Start Menu: IE, Email, XP Tour
  7. Connect the network adapter, install all remaining updates from Windows Update if applicable and reboot
  8. Delete all folders named \Windows\$NtUninstall$* and also \Windows\SoftwareDistribution\Download
  9. On the host, download the latest Firefox 52.5.x version
  10. In WinXP, look for the Firefox installation file through the shared folder and install it
  11. Do any wanted customizations in Firefox (don't remember history and passwords, disable updates, prevent sending health checks to Mozilla, install Ghostery and AdBlock Plus addons, set homepage to Startpage)
  12. Optimize the disk size of the VM
    • On the host, download sdelete from https://docs.microsoft.com/en-gb/sysinternals/downloads/sdelete and make the .exe available through the shared folder from WinXP
    • Defragment C:
    • Launch cmd.exe from the Run Dialog and run sdelete.exe -z c: to zero out free space on the disk, from the directory where sdelete resides (takes a while to complete and will seem to hang at 100% for a while, use Ctrl+C if it lasts more than 10min)
    • Shutdown the VM
    • On the host, use VBoxManage.exe modifymedium disk "C:\path\to\disk.vdi" --compact
  13. Export the VM to an appliance if needed (.ova)

Refs: - https://www.howtogeek.com/312883/how-to-shrink-a-virtualbox-virtual-machine-and-free-up-disk-space/

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