Add android-x86-4.4-RC2 to ubuntu grub

I installed android-x86-4.4-RC2 with windows xp and windows 7, after I installed ubuntu 14.04. Now android-x86-4.4-RC2 is not showing up in grub. What should I do to fix this?

Thank you!

Edited: I used the command sudo update grub, but appears only ubuntu and windows in grub.


Open up terminal in Ubuntu and type:

sudo -i
<your password>

Now: fdisk -l and look for the the device/partition you have android x86 installed on, next:

nano /etc/grub.d/40_custom

you can add this to the bottom of your custom menu:

menuentry "Android-x86" {
set root='(hdX,X)'
linux /android-4.4-RC2/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 acpi_sleep=s3_bios,s3_mode SRC=/android-4.4-RC2S SDCARD=/data/sdcard.img
initrd /android-4.4-RC2/initrd.img}

Press CtrlX than Y then hit Enter.

Last:

update-grub

To determine what your set root='(hdx,x)' using the fdisk -l command where you installed android, you need to edit accordingly:

sda =  (hd0,0)
sda1 = (hd0,1)
sda2 = (hd0,2)

or USB may be recognized as sdb

sdb = (hd1,0)
sdb1 = (hd1,1)
sdb2 = (hd1,2)

This means sdX is a=0,X b=1,X c=2,X d=3,X, well hopefully you get what I'm trying to explain.

One thing I found that got me stuck was the sections for /android-4.4-RC2. Wherever android is located in a directory, this has to match, or you will spend hours trying to figure out why android is not booting up. What made it easy for me in the beginning was to put android in a folder under the name android and than just making those three sections /android instead of /android-4.4-RC2.

If you did not setup a SDCARD than you can remove the section SDCARD=/data/sdcard.img

If you are already running Ubuntu, you do not need to install grub. Ubuntu, linux already has grub. You do not even have to install android-x86. All you need to do is extract the Android-x86 ISO and copy these four files:

-initrd.img

-system.cfg

-kernel

-ramdisk.img

than create an empty folder called data.

If you are running on the same partition as Ubuntu, put the four files, along with the empty data folder, somewhere, for example, /home/media/android. If you want to run android-x86 from a separate partition, then put the four files and empty data folder in it's own folder on that partition with a folder name you can remember, something easy, such as android works.

If running android-x86 on a separate partition or USB stick, then the last two lines of the menuentry should be:

linux /android/kernel

initrd /android/initrd.img

If you are going to run it on the same partition as Ubuntu then your menuentry lines should look something like:

linux /home/media/android/kernel

initrd /home/media/android/kernel

I also wrote on my blog a more detailed faq: How to install android-x86 without a CD or USBstick