Skip to main content

Windows Users: Virtualize Your Linux Partition

Windows Users: Virtualize Your Linux Partition

If you're primarily a Windows user but want occasional access to your Linux partition, you can do so using some of VirtualBox's built-in tools.
BUT FIRST, A WARNING: These tools are very advanced and are considered "expert" tools in VirtualBox. You'll need to do some command line work to make it happen, and there's a reason: without the proper precautions, you could cause serious data corruption on your Windows partition. Use these instructions at your own risk and for God's sake, back up all your data before you try this and keep your data backed up regularly! We also highly suggest you read the corresponding chapter in VirtualBox's manual before you continue.
We're going to use Ubuntu for this tutorial, but you should be able to reproduce the steps with other Linux distributions. Also, if you have proprietary graphics drivers, you may encounter problems—VirtualBox has trouble with 3D acceleration in this setup. For now, it's best to use the default open source graphic drivers. Check out the video below for an overview of the process, then read on for the individual steps.

Step One: Create Your New Virtual Machine

Assuming you already have both partitions set up, boot into Windows and perform the following steps:
  1. Back up everything before you begin. No, I'm serious. Don't skip this step. Don't!
  2. Open up a Command Prompt as an administrator and run the following command: wmic diskdrive list brief /format:list Find the drive on which your Linux partition resides and note its number (in my case, it was Disk 0)
  3. Use the CD command to change to the directory in which VirtualBox is installed. For me, this was: CD "C:\Program Files\Oracle\VirtualBox"
  4. Run this next command, replcaing the variables with the correct ones for your system: VBoxManage internalcommands createrawvmdk -filename "C:\Users\Whitson\Desktop\Ubuntu.vmdk" -rawdisk \\.\PhysicalDrive0Replace the file path with wherever you want to put your VMDK file. Replace the 0 in \\.\PhysicalDrive0 with your disk number.
  5. You should get a message saying the VMDK was created successfully. If not, make sure you followed these steps exactly, and if you're still having problems read through that manual chapter. You may have special needs that we didn't discuss here.

Step Two: Create a GRUB ISO

Now, boot into Linux. We're going to use Ubuntu for this example. Before we set up our virtual machine, we'll need to put the GRUB bootloader on an ISO, since not all computers will load your existing version of GRUB properly. Once you're inside Linux, perform the following steps:
  1. Create a new folder on your desktop and call it "iso." Inside that folder, create one called "boot," and inside the boot folder, create a folder called "grub."
  2. Open a terminal and run the following command: cp /usr/lib/grub/i386-pc/* /home/yourusername/Desktop/iso/boot/grubObviously, replace "yourusername" with your user name.
  3. Next, run: cp /boot/grub/grub.cfg /home/yourusername/Desktop/iso/boot/grub
  4. Run the following command: sudo nano /home/yourusername/Desktop/iso/boot/grub/grub.cfg Scroll down to the section that says "menuentry 'Windows'" or something similar, and delete everything from "menuentry" to the "}" at the end of that section.
  5. Lastly, run: grub-mkrescue -o boot.iso /home/yourusername/Desktop/iso/ If you get an error saying "xorriso: not found," you may have to install the xorriso package with: sudo apt-get install xorriso When you're done, you should have a file called boot.iso in your home directory. Copy this to a flash drive or to your Windows partition.

Step Three: Boot Into Your New Virtual Machine

Now, it's time to boot back into Windows and get this sucker up and running. Once you've returned to Windows:
  1. Run VirtualBox as an administrator. Click the New button and name your virtual machine. Choose the amount of RAM to allocate to the virtual machine as normal.
  2. At the next step, choose "Use an existing virtual hard drive file." Click the browse button on the right, and browse to the VMDK file we made earlier. Click the Create button. If all goes well, you should see it show up in VirtualBox's sidebar.
  3. Select your new virtual machine in the sidebar and click the Settings button. Under Storage, select "Controller: IDE" and click the plus sign next to it. Press "Choose Disk" and navigate to the boot.iso file we created earlier. Click OK and return to the main VirtualBox screen.
  4. Select your new virtual machine and click the Start button. Choose Linux from the GRUB menu that pops up.
  5. If all goes well, you should see your Linux installation's login screen. You can log in, install VirtualBox's Guest Additions, and use your Linux partition without shutting down Windows!
IMPORTANT NOTE: Never try to mount or read from your Windows partition while you're running Linux in VirtualBox. This is where the danger of this method comes in. If you try to read your Windows partition, your machine will crash and you could cause data corruption (since your host OS is already using that partition). In fact, I recommend removing it from your fstab file so it never pops up in Linux, thus keeping you much safer.

full article on :


Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim # FREETYPEINC = ${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i

download office 2021 and activate

get office from here open powershell as admin (win+x and a ) type cmd  goto insall dir 1.         cd /d %ProgramFiles(x86)%\Microsoft Office\Office16 2.           cd /d %ProgramFiles%\Microsoft Office\Office16 try 1 or 2 depending on installation  install volume license  for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x" activate using kms cscript ospp.vbs /setprt:1688 cscript ospp.vbs /unpkey:6F7TH >nul cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH cscript ospp.vbs / cscript ospp.vbs /act Automatic script (windefender may block it) ------------------------------------------------------------------------------------------------------------------- @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - =====================================================================================&

Hidden Wiki

Welcome to The Hidden Wiki New hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!! Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it. The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with. Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction Points - Clearnet search engine for Tor Hidden Services (allows you