Wednesday, October 10, 2018

How to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS

If you install archlinux on an external hard drive, and want to access it directly without having to reboot. You can boot it using VirtualBox. Usually when you create contents from virtualbox you need create virtual harddisk image first then install/boot from the virtual harddisk image. However, the VirtualBox also capable for booting from real harddrive or physical drive.

Find Hard Drive Physical Drive Number

Before booting archlinux (installed on physical drive) from virtualbox. You must find the partition number of hard drive / physical drive.

Plug external harddrive to your USB slot, then open CMD in windows operating system;
type:
wmic diskdrive list
How to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS
See the white bolded text, for this example, the physical disk number is "1".

Create Archlinux Virtual Machines

Before connecting the real hard drive into VBox, you need to create Virtual Machines first. Run The Oracle VM VirtualBox Manager then click New.
How to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS
Type Archlinux on the name, it will automaticly switch to archlinux.
How to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS
Then next, set the memory size, set or define the ram as you wish, but not exceded to red area.
How to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS
Then next, choose "Do not add a virtual hard disk". 
How to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS
Then click create, click continue when "Warning" Messages appear.
Now Archlinux is listed on Oracle VM Vbox Manager.

Link Harddrive into VBox

run CMD as an administrator. Then go to C:\ProgramFiles\Oracle\VirtualBox, type below:
VBoxManage internalcommands createrawvmdk -filename "C:\Users\<userPC>\VirtualBox VMs\<VMfolder>\<filename>.vmdk" -rawdisk \\.\PhysicalDrive#
For this example, user pc is PC, VMFolder is archlinux, and the filename is archlinux.vmdk
VBoxManage internalcommands createrawvmdk -filename "C:\Users\PC\VirtualBox VMs\ARCHLINUX\ARCHLINUX.vmdk" -rawdisk \\.\PhysicalDrive1
Make sure you running cmd as administrator. When done, go to Virtualbox Manager, click on Archlinux machines, then go to settings, then open storage. on the controller IDE, choose add partition, choose existisng disk.
How to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS
In this example ARCHLINUX.vmdk,
How to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS
Then click OK. Now you can boot archlinux from physical drive / hard drive.

Ok that's about how to boot a hard disk that has archlinux installed using VirtualBox VM in Windows OS.

:)
Share on Facebook
Share on Twitter
Share on Google+