GRUB2 boot stanza for Android x86 7.1 rc1

4,779 views
Skip to first unread message

Johannes Rohr

unread,
Jul 21, 2017, 6:51:45 AM7/21/17
to Android-x86
Hi, on my machine with Arch Linux I did not want the Android x86 install to automatically install grub2 because I wasn't sure what this would do to my existing grub2 installation. So I manually created the following boot menu entry:


menuentry 'Android x86' {
savedefault
set root='(hd0,msdos1)'
        search --file --no-floppy --set=root /android-7.1-rc1/system.sfs
        linux /android-7.1-rc1/kernel root=/dev/ram0 buildvariant=userdebug SRC=/android-7.1-rc1 DATA= androidboot.hardware=android_x86
        initrd /android-7.1-rc1/initrd.img 
}


But this immediately sends android into reboot after a few seconds. As it does not pause before the reboot, and console messages just keep flashing by quickly, I can't read what the last kernel message before reboot is. 

Does someone see an obvious flaw in this boot stanza? The partition and directory names should be correct, I double and triple checked them. The partition is an ext4 partition, android-86 is installed alongside an existing arch linux 
Message has been deleted

spin877

unread,
Jul 22, 2017, 9:26:23 AM7/22/17
to Android-x86

I did so:

menuentry "Android"{

                        recordfail
                        load_video
                        gfxmode $linux_gfx_mode
                        insmod gzio
                        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
                        insmod part_gpt
                        insmod ext2
                        search --set=root --file /android-2017-07-12/kernel
                        linux /android-2017-07-12/kernel  quiet root=/dev/ram0 androidboot.selinux=permissive vmalloc=192M buildvariant=userdebug
                        initrd /android-2017-07-12/initrd.img
}


With android 7 this: 
androidboot.hardware=android_x86
It's not necessary any more

The partition must be ext4

Chih-Wei Huang

unread,
Jul 24, 2017, 4:16:57 AM7/24/17
to Android-x86
2017-07-21 18:51 GMT+08:00 Johannes Rohr <jor...@gmail.com>:
> Hi, on my machine with Arch Linux I did not want the Android x86 install to
> automatically install grub2 because I wasn't sure what this would do to my
> existing grub2 installation. So I manually created the following boot menu
> entry:
>
>
> menuentry 'Android x86' {
> savedefault
> set root='(hd0,msdos1)'
> search --file --no-floppy --set=root /android-7.1-rc1/system.sfs
> linux /android-7.1-rc1/kernel root=/dev/ram0 buildvariant=userdebug
> SRC=/android-7.1-rc1 DATA= androidboot.hardware=android_x86
> initrd /android-7.1-rc1/initrd.img
> }

You missed androidboot.selinux=permissive.

androidboot.hardware=android_x86 is unnecessary now.
Could be removed.

SRC=/android-7.1-rc1 could also be eliminated
in your case. (it's auto derived from other cmdline)



--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Stephen

unread,
Aug 9, 2017, 3:09:20 AM8/9/17
to Android-x86
I have the similar issue boot from the Grub2Win, the system will stop in there cannot boot success.
My boot menu entry as below:

menuentry 'Android-x86_64 7.1' --class android {
search --file --no-floppy --set=root /android-x86/system.img
linux /android-x86/kernel root=/dev/ram0 buildvariant=userdebug androidboot.selinux=permissive DATA= quiet
initrd /android-x86/initrd.img
}

If you can normal boot, please help to share your boot menu entry for reference.

Thanks for your help! - Stephen
Reply all
Reply to author
Forward
0 new messages