LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 03-17-2021, 03:48 PM   #1
marietto
Member
 
Registered: Aug 2010
Posts: 96

Rep: Reputation: 17
init: execv(“/system/bin/init”) failed / No such file or directory / cyclic reboots while trying to virtualize android on my jetson nano


Hello.

I want to virtualize correctly Android 10 on top of my Jetson nano (arm64) using qemu and kvm on ubuntu 18.04. This is the tutorial that I'm following :


https://github.com/antmicro/kvm-aosp-jetson-nano


Unfortunately it ends with an error that it is a bug. It does not depend on my poor knowledge,even if I have it. There is another user on the nvidia forum that ended the tutorial with the same error. You can see the full log here :


[https://pastebin.com/xwrABAWr]


Unfortunately the developer of the github closed the bug section. This is the script that I use to run it :


Code:
#!/bin/sh -e
  
qemu-system-aarch64 \ 
-machine virt,gic-version=host -cpu host -smp 4 -enable-kvm \ 
-append "console=ttyAMA0,38400 vt.global_cursor_default=0 androidboot.selinux=permissive debug drm.debug=0 androidboot.lcd_density=160" \     
-m 3048 \   
-kernel /root/Desktop/Work/I9/Android-arm/1/Image \
-initrd /root/Desktop/Work/I9/Android-arm/1/ramdisk.img \  
-drive index=0,if=virtio,format=raw,id=system,file=/root/Desktop/Work/I9/Android-arm/1/system.img \  
-drive index=1,if=virtio,format=raw,id=cache,file=/root/Desktop/Work/I9/Android-arm/1/cache.img \ 
-drive index=2,if=virtio,format=raw,id=userdata,file=/root/Desktop/Work/I9/Android-arm/1/userdata.img \ 
-netdev user,id=mynet,hostfwd=tcp::5401-:5555 -device virtio-net-pci,netdev=mynet \    
-device qemu-xhci \   
-device virtio-mouse-pci -device virtio-keyboard-pci \  
-d guest_errors \ 
-serial mon:stdio \ 
-device ramfb
I have compiled the Android files "system-rw.img" and "Image" and "following the instructions on the github and the other files that I have used (cache.img ; userdata.img ; ramdisk.img) are provided by the repo (no need to compile them). I've compiled everything on my Ubuntu 20.10 os. On my jetson nano is running with :


Code:
root@ziomario-desktop:# ./jetsonInfo.py

NVIDIA Jetson Nano (Developer Kit Version)  
L4T 32.5.1 [ JetPack UNKNOWN ] 
Ubuntu 18.04.5 LTS Kernel Version: 4.9.201+ 
Xlib:  extension "NV-GLX" missing on display ":1003.0".  
Xlib:  extension "NV-GLX" missing on display ":1003.0".  
Xlib:  extension "NV-GLX" missing on display ":1003.0". 
CUDA 10.2.89 
CUDA Architecture: 5.3 
OpenCV version: 4.5.0 
OpenCV Cuda: YES 
CUDNN: 8.0.0.180  
TensorRT: 7.1.3.0 
Vision Works: 1.6.0.501  VPI: ii libnvvpi1 1.0.15 arm64 NVIDIA Vision Programming

Someone said to me : As you can see, it tries to boot the system by using the "fstab method". it maybe should be in the /system/etc/fstab. You have to populate the fstab correctly. Any help to understand how to do that ?

Last edited by marietto; 03-17-2021 at 03:51 PM.
 
Old 03-31-2021, 08:52 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,143

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
This error:

Code:
init: execv(“/system/bin/init”) failed / No such file or directory
is logged by the init running in your initrd when it tries to start the init in your actual user space. It can't find that file. Unfortunately, there are a lot of things that can go wrong during boot.

Loop mount the root filesystem and verify that /system/bin/init is present, readable and executable. It has to be in the root filesystem, since fstab hasn't run yet and mounted the other filesystems.

You could also unpack the initrd and look at init, which is likely a shell script or program that should load any needed modules, mount the new root filesystem and pivot to it. The last thing it does is the exec of the new init found on the new root (which fails).

Another possibility is an error in the kernel command line.
 
Old 04-04-2021, 02:43 PM   #3
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
Forget the old error. I've followed the part 2 of the tutorial and this time the error has been different :

Quote:
[ 1.074939] EXT4-fs (vda): couldn't mount RDWR because of unsupported optional features (4000)
[ 1.078049] init: [libfs_mgr]__mount(source=/dev/block/vda,target=/system,type=ext4)=-1: Invalid argument
[ 1.081515] init: Failed to mount /system: Invalid argument
[ 1.084120] init: Failed to mount required partitions early ...
[ 1.096129] init: #00 pc 00000000000e90a0 /init
[ 1.097856] init: #01 pc 000000000006c4d8 /init
[ 1.099631] init: #02 pc 000000000006e930 /init
 
Old 04-05-2021, 11:59 AM   #4
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
It seems that the solution is here :

https://unix.stackexchange.com/quest...l-features-400

he says :

To create a ext4 filesystem without this feature:

Quote:
sudo mke2fs /dev/sdb1 -O ^metadata_csum

Or turn it off on an already created filesystem:

Quote:
sudo tune2fs -O ^metadata_csum /dev/sdb1

good. So,I should modify the right python script which build the system.img file. Anyway I don't know which is the right one. BTW I copied all the python files that have been used to build the android images on my google drive,here :


https://drive.google.com/drive/folde...oI?usp=sharing


what I'm asking is if someone can identify the right python file and if he can modify it a little bit,like suggested on the unix stack exchange site.

Last edited by marietto; 04-05-2021 at 12:00 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Jetson Nano based system can be powered over Ethernet LXer Syndicated Linux News 0 09-30-2020 04:33 PM
LXer: Compact Jetson Nano system has a PoE port LXer Syndicated Linux News 0 06-16-2020 01:02 AM
Failed to build Kernel 4.9 on Jetson Nano jiapei100 Linux - Kernel 1 04-02-2020 10:07 PM
execv("/bin/bash") failed system error: No such file or directory bbrian017 Linux - Desktop 1 08-27-2011 01:05 PM
/usr/bin/find :No such file or Directory errors while trying to compile kernel. Zero-0-Effect Linux From Scratch 2 05-29-2004 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 07:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration