Solution 1:

Regarding Android x86 6.0

The "EEEPC" assignment is only for ASUS EEEPCs, only use it if you have one, otherwise use android_x86, do not use generic_x86, you will get stuck at the boot animation and have to restart by using CTRL+F1 to access the terminal and issue reboot as the GUI will not get loaded. I know this because I spent several hours following bad, though well intentioned, advice.

set root='(hd0,4)'
linux /android-6.0-rc1/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 acpi_sleep=s3_bios,s3_mode SRC=/android-6.0-rc1
initrd /android-6.0-rc1/initrd.img

This was the final configuration that worked for me on an old school SONY VAIO 64 bit on a triple boot setup.

'(0,4)' was the location of my hard drive and partition Android x86 was installed to, change it accordingly. You do not need your UUID, you only need exactly what I have put above with your installation location being the only change.

Solution 2:

This is from XDA Developers

For GRUB 1.97 - 1.99 & 2.00 +

  1. To make it easy, install GRUB Customizer Type these into terminal emulator : Code:

    sudo add-apt-repository ppa:danielrichter2007/grub-customizer
    sudo apt-get update
    sudo apt-get install grub-customizer
    
  2. Open GRUB customizer and make a new GRUB entry.

  3. Open 'Sources' tab, type these :

    set root='(hd0,4)'
    search --no-floppy --fs-uuid --set=root e1f9de05-8d18-48aa-8f08-f0377f663de3
    linux androidx86/kernel root=UUID=e1f9de05-8d18-48aa-8f08-f0377f663de3 quiet      androidboot.hardware=generic_x86 SRC=/androidx86 acpi_sleep=s3_bios,s3_mode
    initrd androidx86/initrd.img
    

Here's what to change :

  1. set root='(hd0,4)' : Change the (hd0,4) to partiton Android x86 is installed. The hd0 means sda, so if you install it to sdb, it'll be hd1 and so on. The hd0,4 means the partition number, in my case, hd0,4 means sda4. So if you install it on sda6, it'll be hd0,6.

  2. --set=root e1f9de05-8d18-48aa-8f08-f0377f663de3 : The random number here is the UUID of partition Android x86 is installed You must change it to correct UUID, you can easily got UUID by creating new entry in GRUB Customizer then go to Options tab, then select the 'Linux' option in dropdown. You'll see partition dropdown, select your partition. Open the source tab, you'll see the UUID there.

  3. androidx86/ : The root of Android x86 Change it into your Android x86 root. You can see what's your Android x86 root by navigating to Android x86 partition, and you'll see a folder name started with 'android', that's the root of your Android x86

  4. androidboot.hardware : Your device, of course. Note : If you're using Android 2.3 - 4.0.3, change it to androidboot_hardware Here's the list of hardware :

  • generic_x86 : If your hardware isn't listed, use this
  • eeepc : EEEPC laptops
  • asus_laptop : ASUS laptops (supported ASUS laptops only)

Solution 3:

This is a ten month old question but I figured I'd help anyway. It's actually a very simple fix. I'm throwing the fix in my answer instead of hitting "edit" on the above answer because I don't want to wait for peer reviewing or whatever.

Anyway, the answer with the most votes states that you should use the following code:

set root='(hd0,4)'
`search --no-floppy --fs-uuid --set=root e1f9de05-8d18-48aa-8f08-f0377f663de3
linux androidx86/kernel root=UUID=e1f9de05-8d18-48aa-8f08-f0377f663de3 quiet      androidboot.hardware=generic_x86 SRC=/androidx86 acpi_sleep=s3_bios,s3_mode
initrd androidx86/initrd.img

The issue is in line two. There's a stray grave (`) at the beginning of line two. Literally as simple as that. Sometimes it's the most simple of things that make everything stop working.

I imagine that you either have found a way to add Android x86 to GRUB or you just don't care anymore but yeah. So here's the correct code:

set root='(hd0,4)'
search --no-floppy --fs-uuid --set=root e1f9de05-8d18-48aa-8f08-f0377f663de3
linux androidx86/kernel root=UUID=e1f9de05-8d18-48aa-8f08-f0377f663de3 quiet      androidboot.hardware=generic_x86 SRC=/androidx86 acpi_sleep=s3_bios,s3_mode
initrd androidx86/initrd.img

Here is my entire /etc/grub.d/40_custom file (excluding the exec tail and the commented out lines at the beginning):

menuentry "Android x86 4.4 R2" --class android --class gnu-linux --class gnu --class os {
    set root='(hd0,msdos2)'
    search --no-floppy --fs-uuid --set=root a47b5fe5-8969-4774-be9c-72c32a3fd14b
    linux /android-4.4-r2/kernel root=UUID=a47b5fe5-8969-4774-be9c-72c32a3fd14b quiet      androidboot.hardware=generic_x86 SRC=/android-4.4-r2 acpi_sleep=s3_bios,s3_mode
    initrd /android-4.4-r2/initrd.img
}
menuentry "Android x86 5.0.2 UNOFFICIAL" --class android --class gnu-linux --class gnu --class os {
    set root='(hd0,msdos4)'
    search --no-floppy --fs-uuid --set=root d2edeae9-3dc8-41b1-b775-25d0a8028092
    linux /android-2014-12-25/kernel root=UUID=d2edeae9-3dc8-41b1-b775-25d0a8028092 quiet      androidboot.hardware=generic_x86 SRC/android-2014-12-25 acpi_sleep=s3_bios,s3_mode
    initrd /android-2014-12-25/initrd.img
}

Obviously hd0,msdos2 is the partition that I have Android 4.4 R2 installed on and a47b5fe5-8969-4774-be9c-72c32a3fd14b is the UUID of said partition and hd0,msdos4 is the partition that I have Android 5.0.2 (unofficial and highly unstable) installed on and d2edeae9-3dc8-41b1-b775-25d0a8028092 being that partition's UUID.

For me, hd0,msdos2 is /dev/sdb2 and hd0,msdos4 is /dev/sdb4. I'm not sure on the following, but I think that GRUB does hd0, hd1, hd2, etc. in a different order than Linux does sda/hda, sdb/hdb, sdc/hdc, etc. Again, not sure, but I think GRUB does it in physical order (as they would be identified in your BIOS) and Linux does them in...uhh...some other way, I guess. Again, not sure on that.

But yeah if you need to figure out which partition in GRUB partition format (hdX,msdosY) your Android partition is (which I see is /dev/sda3), restart your PC and hit C to go to a command line. Then type (hd and hit tab (tab autocompletes things) and it will then list all drives as autocomplete options (not 100% sure but I'm like 70% sure it doesn't display USB drives unless they're SATA drives connected with a USB to SATA adapter). Then type (hd0, and hit tab and it will list all partitions on hd0 as autocomplete options. If you have multiple drives, figuring out which one /dev/sda3 is just a matter of trial and error with using autocomplete on (hd. I'm not sure exactly what the results look like but I do know for a fact that the results for (hd0, will (obviously) display the GRUB-style partition identifiers for all partitions on hd0 (for you, it'd be msdos1 through msdos7; in GRUB, hd starts at 0 but msdos starts at 1), the labels of all the partitions on hd0, and the filesystem (usually you throw Android x86 onto ext2 but since you have it on NTFS, it'd display the filesystem as NTFS; for most people it'd display ext2 which is how I know which one it is because my Android partitions are the only ext2 partitions I have).

Hmm...I had initially intended to only correct the mistake in line two of the most popular answer and I ended up with a damn near full tutorial on how to add Android x86 to GRUB...

Solution 4:

  • Open 40_custom:

    sudo -H gedit /etc/burg.d/40_custom
    
  • Add Android x86 menu entry:

    menuentry "Android-4.3-x86" --class android {
    set root='(hd*,msdos*)'
    linux /path/android-4.3-x86/kernel quiet root=/dev/ram0 androidboot.hardware=tx2500 acpi_sleep=s3_bios,s3_mode SRC=/path/android-4.3-x86 vga=788
    initrd /path/android-4.3-x86/initrd.img
    

    (set path and * as yours)

  • Update grub:

    sudo update-grub