Checked out android-7.1.1_r4_x86vbox_ch08_r1 from the github and able to start up Virtualbox and was able to boot up kernel but when it tried to get into Android it is stuck in the following line
Let's try to use NAT only. Can you help to verify two things?
1. Set the NFS IP to 10.0.2.2
2. Will you be able to on another virtual machine and try to mount NFS share 10.0.2.2::/media/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product
If both are ok, we can debug further.
What I mean is are you able to verify that NFS path "10.0.2.2:/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product" can work? If I want to verify it, I will install an ubuntu with NAT network connection only. Inside Ubuntu, I will test it using NFS mount like: $ sudo mount -t nfs 10.0.2.2:/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product /mnt/test
If this can work, it means the NFS share setup has not problem in the host.
Another difference is that, if there is only NAT connection, the following log looks not correct. [ 10.594638] nameserver0=192.168.1.1, nameserver1=8.8.8.8
It should something like: [ 10.594638] nameserver0=10.0.2.3
In NAT connection, DHCP server and gateway is 10.0.2.2 and DNS/naming server is 10.0.2.3. TFTP server is 10.0.2.4.
In VirtualBox NAT connection, the gateway is 10.0.2.2 so it is also your host IP. The NFS share is on the host so the NFS share should be 10.0.2.2:/{your host NFS shared folder}.
Last edit: Roger Ye 2017-05-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Checked out android-7.1.1_r4_x86vbox_ch08_r1 from the github and able to start up Virtualbox and was able to boot up kernel but when it tried to get into Android it is stuck in the following line
Detecting Android-x86......................................
seems like it cannot find the root for some reason. Following are the /etc/exports content
nanik : /media/AOSPDrive/AndroidEmbeddedSystemChapter$ sudo exportfs
/media/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product
<world>
nanik : /media/AOSPDrive/AndroidEmbeddedSystemChapter$ cat /etc/exports
/media/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product/ *(rw,sync,insecure,no_subtree_check,async)
Any idea ?
Following content of pxelinux.cfg
prompt 1
default menu.c32
timeout 100
label 1. NFS Installation (serial port) - x86vbox
menu x86vbox_install_serial
kernel kernel
append ip=dhcp console=ttyS3,115200 initrd=initrd.img root=/dev/nfs rw androidboot.hardware=x86vbox INSTALL=1 DEBUG=2 SRC=/x86vbox ROOT=192.168.56.1:/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product nfsroot=192.168.56.1:/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product
label 2. x86vbox (ROOT=/dev/sda1, serial port)
menu x86vbox_sda1_S3
kernel kernel
append ip=dhcp console=ttyS3,115200 initrd=x86vbox/initrd.img androidboot.hardware=x86vbox DEBUG=2 SRC=/android-x86vbox ROOT=/dev/sda1
label 5. x86vbox recovery (ROOT=/dev/sda2)
menu x86vbox_recovery
kernel kernel
append ip=dhcp console=ttyS3,115200 initrd=ramdisk-recovery.img androidboot.hardware=x86vbox DEBUG=2 SRC=/android-x86vbox ROOT=192.168.56.1:/media/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product
The virtualbox is configured with 2 network
Adapter 1 - NAT
Adapter 2 - Host-only Adapter (using vboxnet0)
Let's try to use NAT only. Can you help to verify two things?
1. Set the NFS IP to 10.0.2.2
2. Will you be able to on another virtual machine and try to mount NFS share 10.0.2.2::/media/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product
If both are ok, we can debug further.
Below is my configuration.
Create a new vm inside virtualbox and tried
ROOT=10.0.2.2:/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product
and event
ROOT=10.0.2.15:/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product
as the IP 10.0.2.15 is reported as the IP from DHCP by the kernel log below
[ 10.060720] rtc_cmos rtc_cmos: setting system clock to 2017-05-17 01:08:58 UTC (1494983338)
[ 10.382107] Sending DHCP requests ., OK
[ 10.445036] IP-Config: Got DHCP answer from 10.0.2.2, my address is 10.0.2.15
[ 10.591700] IP-Config: Complete:
[ 10.591992] device=eth0, hwaddr=08:00:27:43:ae:31, ipaddr=10.0.2.15, mask=255.255.255.0, gw=10.0.2.2
[ 10.592870] host=10.0.2.15, domain=home, nis-domain=(none)
[ 10.593423] bootserver=10.0.2.4, rootserver=10.0.2.4, rootpath=
[ 10.594638] nameserver0=192.168.1.1, nameserver1=8.8.8.8
[ 10.661695] Freeing unused kernel memory: 704K (d8425000 - d84d5000)
[ 10.721270] Write protecting the kernel text: 5844k
[ 10.830721] Write protecting the kernel read-only data: 2904k
but it still does not work. Configured only 1 adapter now using NAT
Sorry what you mean by
What I mean is are you able to verify that NFS path "10.0.2.2:/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product" can work? If I want to verify it, I will install an ubuntu with NAT network connection only. Inside Ubuntu, I will test it using NFS mount like:
$ sudo mount -t nfs 10.0.2.2:/AOSPDrive/AndroidEmbeddedSystemChapter/out/target/product /mnt/test
If this can work, it means the NFS share setup has not problem in the host.
Another difference is that, if there is only NAT connection, the following log looks not correct.
[ 10.594638] nameserver0=192.168.1.1, nameserver1=8.8.8.8
It should something like:
[ 10.594638] nameserver0=10.0.2.3
In NAT connection, DHCP server and gateway is 10.0.2.2 and DNS/naming server is 10.0.2.3. TFTP server is 10.0.2.4.
In VirtualBox NAT connection, the gateway is 10.0.2.2 so it is also your host IP. The NFS share is on the host so the NFS share should be 10.0.2.2:/{your host NFS shared folder}.
Last edit: Roger Ye 2017-05-17
Fixed this issue due to some kind of permission issues.
The solution is to copy the whole product/ directory from the Android /out folder to another drive or directory