Question on installation of android-x86-8.1-r2.x86_64.rpm on Ubuntu 18.04


Question

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


Answer

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.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes