Boot android-x86-6 from GRUB2 (USB/PXE)

873 views
Skip to first unread message

Beeblebrox

unread,
Jun 8, 2017, 11:03:08 PM6/8/17
to Android-x86
Hello,
I'm trying to boot android-x86-6.0-r2 with Grub2 from USB or PXE. All of below fail at same with getting stuck on "Detecting Android-x86.......". I use PXE because it's easier to modify grub.cfg than when using USB stick.

I already have my dhcp/tft configured to boot many diiferent iso's from the http server, so no suggestions like "use serva" or non-Grub bootloaders please. USb sticks also have grub as bootloader as I don't want to dd= out the whole stick for each distro. 

Tried Methods:
* Grub loopback iso on USB or PXE
* Untarred iso placed in /$path/ on USB or PXE
The problem is essentially the same for USB or PXE. Kernel loads but gets stuck on Detecting Android.

The grub.cfg entry:
menuentry "Android_x86 iso" --class android --class linux -class os {
  set ip="192.168.1.1"
  set path="/pub/tftp/android/"
  set file="android-x86-6.0-r2.iso"
  loopback loop0 (http,$ip)$path$file
  linux (loop0)/kernel fetch=http://$ip$path$file noswap verbose fromiso=$fi
le root=/dev/ram0 toram=ramdisk.img toram=system.sfs androidboot.hardware=andr
oid_x86 video=-16 INSTALL=1 DEBUG=2 SRC="$ip$path"
  initrd (loop0)/initrd.img  }

The $path (/pub/tftp/android) above has both the iso and the extracted contents (so ramdisk.img & system.sfs are there). This is just an example as I get the same result with USB stick.

DEBUG is no help, as tty switch is unresponsive.

Thanks& Regards

Chih-Wei Huang

unread,
Jun 8, 2017, 11:14:57 PM6/8/17
to Android-x86
I don't know PXE or how to make it work.
For USB, you can put the iso to USB and
boot from it directly:

menuentry 'Android-x86_64 6.0-r3 iso' --class android-x86 {
insmod loopback
insmod iso9660
set isofile=/iso/android-x86/android-x86_64-6.0-r3.iso
search --no-floppy -f ${isofile} --set=root --hint hd0,msdos2
loopback loop0 ${isofile}
linux (loop0)/kernel iso-scan/filename=${isofile}
initrd (loop0)/initrd.img
}

For 7.1, remember to set selinux mode
which is necessary:

menuentry 'Android-x86_64 7.1 iso' --class android-x86 {
insmod loopback
insmod iso9660
set isofile=/iso/android-x86/android-x86_64-7.1-rc1.iso
search --no-floppy -f ${isofile} --set=root --hint hd0,msdos2
loopback loop0 ${isofile}
linux (loop0)/kernel androidboot.selinux=permissive
iso-scan/filename=${isofile}
initrd (loop0)/initrd.img
}

If the iso is on the network server,
I think the init script needs to be modified
to find it.


> The $path (/pub/tftp/android) above has both the iso and the extracted
> contents (so ramdisk.img & system.sfs are there). This is just an example as
> I get the same result with USB stick.
>
> DEBUG is no help, as tty switch is unresponsive.
> This post did not help:
> https://groups.google.com/forum/#!topic/android-x86/vGsmcFn82zo


--
Chih-Wei
Android-x86 project
http://www.android-x86.org
Reply all
Reply to author
Forward
0 new messages