Marshmallow in VirtualBox:installation stuck on GRUB
First, select Create/modify partition:
Then create 2 partitions:
- Create a small (100m) first primary partition for grub. Set the bootable flag. Write changes.
- Create an extended (logical) partition for the rest, and install android on the 2nd. Grub will go automatically to the 1st one. Write changes.
Just adding my 2 cents, on what I think is happening:
Actually from a bit of experimentation it's not the presence of 2 partitions that allows Grub to proceed it's the "Create/Modify permissions" that you need to get into first to create a GPT partition table before you can format the partition. (That's why manual partitioning also worked for Dr. Gianluigi Zane Zanettini in the comments of the originally accepted answer).
What actually seems to be happening is that if you don't create the partition table, when you come to the formatting stage where it asks you to format the partition (EXT4, EXT3, etc), the installer seems to say that it's successful, when actually it hasn't happened because the GPT partition table doesn't exist. So when it asks you to install grub it tries to install grub onto an unformatted partition ... and fails silently.
If you go to "Create/Modify Partition" and create a "New" single partition (accept the defaults creating a single partition), "Write" "Quit"; and then go to format the partition after as the next step, Grub will get installed and the installation will proceed as normal.
(Emphasis on the single just to show that even a single partition will work.)
NB: I haven't managed to get the GUI to run for Android x86 (android-x86-6.0_20160129.iso), but at least it seems to boot - meaning it passes through the grub installation and i get a shell prompt.
This worked successfully for me for installing Android x86 4.4-r5 (android-x86-4.4-r5.iso
) on VirtualBox 5.2.0:
- Create a VM: Select Type as
Linux
and Version asLinux 2.6 / 3.x / 4.x (32-bit)
and click Next - Leave memory the default of 512 MB (or choose more, doesn't matter)
- Create a new virtual hard disk. I chose 8 GB
- Click Start
- In the popup select the iso:
android-x86-4.4-r5.iso
- In boot menu select
Installation - Install Android-x86 to harddisk
- In
Choose Partition
menu selectCreate/Modify partitions
- In
Do you want to use GPT
question selectNo
cfdisk
program will open- Select
New
and selectPrimary
as partition type, set size to100
MB and select Beginning - Select bootable. Now the
Flags
column should sayBoot
for the new paritition - Select the free space and select
New
and selectPrimary
as partition type, leave size as default to fill the remaining free space - Select
Write
and typeyes
and press Enter - Select
Quit
Now the
Choose partition
menu should display this configuration:sda1 unknown VBOX HARDDISK sda2 unknown VBOX HARDDISK
- Select the second partition:
sda2
and selectOK
- Select
ext2
- Select
Yes
in lose data warning popup - Wait for formatting to finish
- In
Do you want to install boot loader GRUB?
question selectYes
- In
Do you want to install EFI GRUB2?
question selectYes
- In
Do you want to format the boot partition /dev/sda1?
selectYes
- In
Do you want to install /system directory as read-write
selectYes
(doesn't matter for us) - Wait for installation to finish
- In
Congratulations!
menu selectReboot
- Remove the installation iso so it doesn't boot back to installation
I just spent 3 hours trying to get this to work. Hope this helps someone.
Bonus 1:
To set up ADB debugging see http://www.android-x86.org/documents/debug-howto :
- Enable Developer options in Android and enable
USB Debugging
- In VirtualBox go to Devices -> Network -> Network Settings
- Make sure
Adapter 1
tab is selected and clickAdvanced
- Make sure
Cable Connected
box is checked - Click
Port Forwarding
- Click the plus sign
- Set the following values: Name:
adb
, Prodocol:TCP
, Host IP: leave blank or set to127.0.0.1
to make it accessible from localhost only, Host Port:5555
, Guest IP: leave blank, Guest Port:5555
. - Click
OK
To connect via ADB:
# adb connect localhost:5555
Now
adb devices
should show:List of devices attached localhost:5555 device
Bonus 2:
In VirtualBox Input menu unselect the Mouse Integration
and now mouse pointer will show up!