16

I'm trying to install android-x86-6.0_20160129.iso in VirtualBox but the installation get stuck at Do you want to install boot loader GRUB

enter image description here

Some background:

  • The VM was created from the Ubuntu 32-bit (x86) VirtualBox template
  • The VM has 1 core + 3096 MB RAM
  • Video memory: 32 MB
  • PAE/NX enabled
  • Hardware virtualization: both VTx and nested pagination enabled
  • Graphics acceleration: disabled (both 2D and 3D)
  • Storage: 64 GB attached to IDE virtual controller (was SATA before: makes no difference)

I've already tried all the "standard" VirtualBox procedure (PAE yes/no; SATA/IDE; no soundcard; no USB; graphics accel. yes/no).

I also tried run the Live CD in VESA mode: like this it starts, but I'd still prefer to install it.

1

3 Answers 3

13

First, select Create/modify partition:

enter image description here

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.
2
  • 2
    Manual partitioning solved the issue for me, thanks! Commented Mar 14, 2016 at 11:22
  • I had the same problem. You don't need two partitions, one bootable ext2 partition is enough. Two is nicer because you get to format one of them with ext3.
    – pwned
    Commented May 24, 2017 at 8:35
9

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.

4
  • Why the down-vote?
    – Irvin H.
    Commented May 12, 2016 at 16:23
  • 1
    The downvote wasn't from me. I actually think that your idea makes sense. I'll try it soon, thanks for sharing! Commented May 12, 2016 at 20:24
  • 1
    Tested this out and can confirm that this works.
    – adeelx
    Commented Jul 10, 2016 at 19:10
  • It's a nice hypothesis, but it's not the case. When I attempt to install the x64 ISO, it is able to create the partition, format it, and install just fine. When I use the x86 ISO, it hangs when installing Grub (or at the "Read only /system" prompt). The x86 ISO hangs at this stage even when I use a virtual disk that I partitioned and formatted using the x64 ISO, so I know that the GPT is present and the partition is ext4. There is something else causing the installer to hang.
    – Thomas
    Commented Aug 12, 2017 at 22:56
6

This worked successfully for me for installing Android x86 4.4-r5 (android-x86-4.4-r5.iso) on VirtualBox 5.2.0:

  1. Create a VM: Select Type as Linux and Version as Linux 2.6 / 3.x / 4.x (32-bit) and click Next
  2. Leave memory the default of 512 MB (or choose more, doesn't matter)
  3. Create a new virtual hard disk. I chose 8 GB
  4. Click Start
  5. In the popup select the iso: android-x86-4.4-r5.iso
  6. In boot menu select Installation - Install Android-x86 to harddisk
  7. In Choose Partition menu select Create/Modify partitions
  8. In Do you want to use GPT question select No
  9. cfdisk program will open
  10. Select New and select Primary as partition type, set size to 100 MB and select Beginning
  11. Select bootable. Now the Flags column should say Boot for the new paritition
  12. Select the free space and select New and select Primary as partition type, leave size as default to fill the remaining free space
  13. Select Write and type yes and press Enter
  14. Select Quit
  15. Now the Choose partition menu should display this configuration:

    sda1 unknown VBOX HARDDISK
    sda2 unknown VBOX HARDDISK
    
  16. Select the second partition: sda2 and select OK
  17. Select ext2
  18. Select Yes in lose data warning popup
  19. Wait for formatting to finish
  20. In Do you want to install boot loader GRUB? question select Yes
  21. In Do you want to install EFI GRUB2? question select Yes
  22. In Do you want to format the boot partition /dev/sda1? select Yes
  23. In Do you want to install /system directory as read-write select Yes (doesn't matter for us)
  24. Wait for installation to finish
  25. In Congratulations! menu select Reboot
  26. 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 :

  1. Enable Developer options in Android and enable USB Debugging
  2. In VirtualBox go to Devices -> Network -> Network Settings
  3. Make sure Adapter 1 tab is selected and click Advanced
  4. Make sure Cable Connected box is checked
  5. Click Port Forwarding
  6. Click the plus sign
  7. Set the following values: Name: adb, Prodocol: TCP, Host IP: leave blank or set to 127.0.0.1 to make it accessible from localhost only, Host Port: 5555, Guest IP: leave blank, Guest Port: 5555.
  8. Click OK
  9. To connect via ADB:

    # adb connect localhost:5555
    
  10. 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!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .