Sunday, September 27, 2009

Boot your USB Drive in VirtualBox

The GUI of VirtualBox does not have an option to boot a USB drive (Physical Drive) in a virtual machine.

However you can attach a physical drive to a virtual machine using a command line tool that is bundled with Virtual Box.You can then boot your virtual machine from the attached Physical drive.

This is the continuation of my previous article.You can read more about bootable usb drives in my previous article.

In this article I will show you how you can boot a bootable usb drive in Virtual Machine created by VirtualBox.You can easily test bootable USB drives within Windows and without restarting using this method.

Warning:Do not Attach your Primary hard disk to your Virtual Machine and Boot it in the Virtual machine

Download and install Virtual Box from here http://www.virtualbox.org/wiki/Downloads

Attaching a Physical Disk to a Virtual Machine

Section 9.10 in the VirtualBox manual contains all the details required to attach a physical disk to a virtual machine.Using the vboxmanage.exe tool you can create a tiny vmdk file which points to your real USB drive (Physical Drive/Disk).You can attach this tiny vmdk to your virtual machine.A vmdk file is a virtual hard disk file which can be used with VirtualBox and VMWare.

The vboxmanage.exe tool is bundled with VirtualBox.You don’t have to download it separately

Open Command Prompt

Navigate to your Virtual Box installation Directory.

cd c:\”Program Files”\Sun\”xVM VirtualBox”

Type the following command and press enter
Syntax of the command
VBoxManage internalcommands createrawvmdk -filename path\to\usb.vmdk -rawdisk \\.\PhysicalDrive1 -register
Example
VBoxManage internalcommands createrawvmdk -filename c:\Users\Agni\.VirtualBox\VDI\usb.vmdk -rawdisk \\.\PhysicalDrive1 -register

You have to replace path\to\usb.vmdk with the path to your VDI folder(Where all your virtual hard disks are stored).If you want to save your usb.vmdk in different location,then you will have to add the usb.vmdk file manually in the GUI.This is because the register switch only registers the virtual hard disks stored in the User ’s VDI folder .

In windows your 1st Hard Disk will be \\.\PhysicalDrive0.Your 2nd Hard disk will be \\.\PhysicalDrive1.

To find the correct number for your USB Drive

Right Click on My Computer-Manage-Disk Management

Here you can find the correct disk number of your USB Drive

Drive Number of the Physical Drive

Drive Number of the Physical Drive

You will have to replace \\.\PhysicalDrive1 with the correct drive number.

In this case there was only 1 hard disk and 1 USB disk.So the USB drive is referred by \\.\PhysicalDrive1

In linux you have to replace \\.\PhysicalDrive1 with the correct /dev/sda reference.

Now you should have a tiny vmdk file.You can start your Virtual Machine with this tiny vmdk and boot from it.

  1. Start VirtualBox.
  2. Create a new Machine or Select an Existing Machine.
  3. Settings-Hard Disk-Add-Select usb.vmdk
  4. Make sure that usb.vmdk is your Primary Master.


  5. System-Boot Order.Set your Hard Disk as the first boot device.

    Boot Order

  6. Now start your Virtual Machine.

Your virtual machine will boot from your bootable physical hard disk.

In this screenshot I have used a bootable Ubuntu USB drive created using Unetbootin.



Read more: http://agnipulse.com/2009/07/boot-your-usb-drive-in-virtualbox/#ixzz0SHfDD0LD

Monday, August 24, 2009

Hack Your Wii for Homebrew without Twilight Princess


Bummed because you've got a new Wii and the Twilight Princess hack won't work on it? Have an older Wii but you don't want to buy Twilight Princess just to install Homebrew? Try the free and easy bannerbomb exploit.

Last year we showed you how to use the Twilight Princess hack to install the Homebrew Channel and various goodies like DVD playback. The bannerbomb exploit is the newest way to install the Homebrew Channel and works on the newest systems, unlike Twilight Princess—which has been a defunct hack since menu 4.0 was introduced.

How does it work? The hack exploits the Wii menu itself, loading a fake banner which causes a system crash and allows the exploit to load unsigned code. During our field testing it took—not counting time to carefully read the instructions and take photographs—less than ten minutes to complete the process.

For this hack you'll need a Wii, an SD card formatted to FAT, a copy of the bannerbomb file (I've linked to the banner bomb exploit file that works for the most number of Wii units right out of the gate; if it doesn't work for you, visit the main page and try some of the other versions), and the HackMii installer. The following instructions are an expanded photo-pictorial version of the instructions found on the bannerbomb exploit author's site.


You'll need to copy the files from your computer to the SD card. If you're using an SD card you already use for the Wii, you'll need to rename the "private" directory to "privateold" for the duration of the hack.

First, unzip the contents of the banner bomb exploit onto the card. This should create a "private" directory with the contents of the zip file.

Next, copy the installer.elf file from the HackMii installer onto the root of the SD card and rename it to boot.elf—as seen above.

Once you have the files on the SD card, it's time to toss it in the Wii and boot up.

Here we are at the initial main menu of the Wii. Nothing special to see here except for the fact that it's been over a week since we've hopped on the Wii Fit.

Click on the circular Wii icon in the lower left corner. DO NOT click on the SD card icon if you've got a newer or updated Wii with the 4.0 menu. You won't hurt your Wii, but the exploit won't work.

Once you've clicked on the Wii icon, you'll be in the sub-menu seen above. Click on Data Management to access the next menu.

Click on Channels to get to the SD card. You won't be able to access it via the Save Data tab.

Click on the SD card tab to load the exploit.

The Wii will ask you "Load boot.dol/elf?", click Yes.

Not turning your Wii-hacking skills into a profit engine for global domination is a very altruistic thing to do. Take a moment to be thankful for all the awesome people in the world that create and distribute the free and open-source software that makes our lives better. Press 1 to continue loading the exploit.

At this point the exploit has been executed and the HackMii installer is the temporary operating system—think LiveCD—of the Wii. From this menu you can select whether or not you want to install The Homebrew Channel, DVDx, and/or BootMii—BootMii is a more advanced tool which you may or may not care to load, it's essentially a boot loader for the Wii that provides a more extensive "takeover" of the Wii than The Homebrew Channel. You can read more about it here and here, if you're curious.

On this menu you install or uninstall the respective tools. If this is your first time running the HackMii Installer you won't see the Uninstall option under any of the entries. During testing we forgot to photograph this screen and hopped back into the installer to snap it.

Install The Homebrew Channel? Yes, Ma'am.

After you agree to install the The Homebrew Channel it usually installs in a matter of seconds. Far faster than we were able to raise the camera to snap a picture. You'll see the SUCCESS in cash-money-green when it is done installing. You can repeat the installation process for DVDx and BootMii if you desire.

After The Homebrew Channel finishes installing you'll be taken to the channel itself. The Homebrew Channel runs applications out of the /YourSDCard/Apps/ folder. During this screenshot our SD card was empty, thus the expansive bubbly-goodness of the default Homebrew screen. As you add applications they will appear here.

Now we're back to the main menu. 12:46pm to 1:15pm and we're done! Under 30 minutes, including stopping to take pictures.

Wondering what you can do with it once you have the Homebrew Channel installed? Well, for example, you can backup your Wii games to a hard drive for safe keeping and faster load times, play old-school games in emulation, and play DVD-backups without a modchip.

Have a favorite homebrew application for the Wii? We'd love to hear about it in the comments.

Click here to find out more!