With QEMU, you can install a Windows version of QEMU on a USB stick, create a Linux-based virtual machine, and run Linux as a virtual system inside Windows. Many Internet cafes do not even let you reboot the system, so booting into Linux simply isn't an option.Īn easy solution to this problem is a virtual machine based on the popular QEMU emulator. In some cases, you might need to manually reconfigure the BIOS to support a USB boot. Sometimes you must ask the permission of the owner of the computer you are using, and many PC owners are reluctant to let their friends boot to a totally different operating system. In practice, however, your Linux-on-a-stick might not be as universal as advertised.
Sudo qemu-nbd -c /dev/nbd0 /path/to/tc/tc.vhdġ0.0.2.Theoretically, a bootable USB stick with a Linux distribution lets you carry your Linux desktop with you without installing any software on the host machine. Hard disk using the "Network Block Device" protocol. Qemu has an awesome way to let you access just about any virtual Qemu-img convert -O vpc tc.vhd tc.vhd.copy # Remove any reserved space from the sparse disk. redir tcp:80::80 -redir tcp:8000::8000 # Create a "shrunken" copy of your VHD file. # Port forwarding, some ports require elevated permissions on your host. Here are some neat things you can do with QEMU. Packages to customize your VM as you see fit. sudo reboot DoneĪt this point, you should be done, and just need to install Then reboot so that Tiny Core can use that disk. Next, create an ext4 filesystem on our newly created Printf "o\nn\np\n1\n\n\nw\n" | sudo fdisk /dev/sda You can run these steps manually, but I am showing this singleĬommand to format the entire virtual hard drive.
If you run these commands on your host machine you mayĪfter you boot to the VM using the commands above, format the Warning: You must run these commands inside the QEMU Is our initramfs, what to use as the primary hard drive, andįinally, we pass some additional boot options to Tiny Core Regardless of the OS, we specify which file is our kernel, which The path to our QEMU Bios files (incuded with QEMU). VM executable, and the -L flag is needed to specify On Windows only, we need to specify the absolute path to the QEMU Windows Qemu-windows-2.2.0\qemu-system-i386 -L Qemu-windows-2.2.0\Bios -m 1024 -kernel vmlinuz -initrd core.gz -hda tc.vhd -append "home=sda1 opt=sda1 tce=sda1" OSX or Linux qemu-system-i386 \ Vhd since Windows can natively handle that format as
You can use whatever size or fileįormat you prefer for the disk image, but I prefer The disk should only be a few KB large initially, but has theĪbility to grow up to 4GB. That command should generate a 4GB sparse virtual hard disk file. System-wide if you're using QEMU on a Mac or Linux host. This binary willĮither be in the Qemu-2.2.0-windows directory weĮxtracted if you're on Windows, or it should be installed On OSX, you should be able to use something like On Linux, QEMU should be installable through your preferred Deleting the other system binaries will save us a There are a number of qemu-system-*.exe files in
Your tc directory should look like this now. Portable, working VM platform for Windows. To our tc directory and you will have a simple, No installation ofĪny sort is required on Windows. "lassauge builds" for this project is that theįiles are entirely portable. The most important reason I am going to suggest using the
(2.2.0 at the time this was written) from his website.
Seemed the best for what I want to accomplish with this project.ĭownload the latest Qemu Windows build zip file Those files are our kernel and initramfs, respectively. You should now have these files in the tc directory.
Iso or opening it in some sort of archive manager Once it is downloaded extract the vmlinuz and Its size makes it the perfectĬreate a directory called tc to store all the files The VM can be moved around on a USB drive or even Create a Linux virtual machine that can run on a Windows, Linux,