Question on installation of android-x86-8.1-r2.x86_64.rpm on Ubuntu 18.04 I installed the android-x86-8.1-r2.x86_64.rpm package on Ubuntu 18.04 using the following commands as suggested by Release Note 8.1-r2 but it didn't add boot entries to the grub2 menu.


sudo apt install alien
sudo alien -ci android-x86-8.1-r2.x86_64.rpm





  Question: What are the definitions of the boot entries I need to add to the 40_custom grub file in order to add android-x86-8.1-r2 to my grub2 boot menu?




Based on the answer below I tried adding the following menu entry to the 40_custom grub file. I also tried changing system.img to system.sfs.



menuentry "Android-x86 8.1-r2" --class android-x86 {
        insmod part_gpt
        search --file --no-floppy --set=root /android-8.1-r2/system.img
        linux /android-8.1-r2/kernel root=/dev/ram0 androidboot.hardware=remix_x86_64 androidboot.selinux=permissive CMDLINE
        initrd /android-8.1-r2/initrd.img
}



Based on How to Install Android in Dual Boot with Linux I also tried adding the following menu entry to the 40_custom grub file.



menuentry "Android-x86 8.1-r2" {
search --set=root --file /android-8.1-r2/kernel
linux /android-8.1-r2/kernel quiet root=/dev/ram0 androidboot.selinux=permissive
initrd /android-8.1-r2/initrd.img
}



Neither of the two menu entries above work. When I update grub it produces the following output which seems to indicate grub isn't recognizing the menu entry, and my computer continues to boot directly into Ubuntu 18.04.



Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.18.0-25-generic
Found initrd image: /boot/initrd.img-4.18.0-25-generic
Found linux image: /boot/vmlinuz-4.18.0-15-generic
Found initrd image: /boot/initrd.img-4.18.0-15-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done



My computer hard drive has a single Linux ext4 partition, and the contents of /android-8.1-r2 are as follows:



drwxr-xr-x 2 root root      4096 Jul 21 09:40 data
-rw-r--r-- 1 root root   1358699 Jun 13 02:11 initrd.img
-rw-r--r-- 1 root root   7437056 Jun 13 02:11 kernel
-rw-r--r-- 1 root root   1424814 Jun 13 02:11 ramdisk.img
-rw-r--r-- 1 root root 877621248 Jun 13 02:11 system.sfs
I determined that grub was actually configured with an option to boot Android, but I wasn't seeing this option because grub was configured to automatically boot Ubuntu. I added the # to the beginning of the following lines in /etc/default/grub, ran "sudo update-grub", and now my computer gives me the option to boot Android.

#GRUB_TIMEOUT_STYLE=hidden
#GRUB_TIMEOUT=0

I also determined the menu entry I added to 40_custom wasn't necessary as it resulted in a redundant option to boot Android in the grub boot menu, so I deleted this menu entry (which I had manually added as described in my question above) from my 40_custom file.