Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported CPU Architecture (i686) in proot-distro #6

Closed
ghost opened this issue Aug 29, 2020 · 4 comments
Closed

Unsupported CPU Architecture (i686) in proot-distro #6

ghost opened this issue Aug 29, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Aug 29, 2020

Now. I have Android 7.1 x86 installed with Termux on it. But the issue is that Ubuntu 20.04 isn't supported on i686.

It would be useful if you just use Ubuntu 18.04/16.04 LTS instead of Ubuntu 20.04 for Android x86

I am a Ubuntu User. proot-distro is easier to use. I use Ubuntu on my Phone using proot-distro more often.

@ghost ghost transferred this issue from termux/termux-app Aug 29, 2020
@ghost ghost added the enhancement New feature or request label Aug 29, 2020
@poVoq
Copy link

poVoq commented Aug 29, 2020

Funny coincidence, but just today I got the same error.

I am trying to install Ubuntu20.04 or Arch Linux on my x86 Zenfone2.

Can I somehow force a i386 image which should work also? I think AMD64 might not work on the Zenfone2 as it is a strange hybrid with 64bit Linux Kernel, but 32bit Android user space.

@ghost
Copy link
Author

ghost commented Aug 30, 2020

You need to setup chroot/proot environment with qemu-user. but it may cause segfault. and some programs may not work.. but x86 is fine

@michalbednarski
Copy link

You could add Ubuntu18 by going into /data/data/com.termux/files/usr/etc/proot-distro and creating new file (example for Ubuntu 18.04 (based on ubuntu.sh (for Ubuntu 20.04) from this repo), name new file for example ubuntu18.sh, name will be used in proot-distro commands, omit case and directly echo single URL if you want to force version):

##
## Plug-in for installing Ubuntu Focal (18.04).
##

DISTRO_NAME="Ubuntu 18.04"

# Returns download URL.
get_download_url() {
	case "$(uname -m)" in
		aarch64)
			echo "https://partner-images.canonical.com/core/bionic/current/ubuntu-bionic-core-cloudimg-arm64-root.tar.gz"
			;;
		armv7l|armv8l)
			echo "https://partner-images.canonical.com/core/bionic/current/ubuntu-bionic-core-cloudimg-armhf-root.tar.gz"
			;;
		i686)
			echo "https://partner-images.canonical.com/core/bionic/current/ubuntu-bionic-core-cloudimg-i386-root.tar.gz"
			;;
		x86_64)
			echo "https://partner-images.canonical.com/core/bionic/current/ubuntu-bionic-core-cloudimg-amd64-root.tar.gz"
			;;
	esac
}

# Define here additional steps which should be executed
# for configuration.
distro_setup() {
	# Hint: $PWD is the distribution rootfs directory.
	#echo "hello world" > ./etc/motd

	# Run command within proot'ed environment with
	# run_proot_cmd function.
	# Uncomment this to do system upgrade during installation.
	#run_proot_cmd apt update
	#run_proot_cmd apt upgrade -yq
	:
}

I think you cannot (without qemu) run x86_64 on 32-bit Android even with 64-bit Linux as Android would set seccomp policy which would prevent 64-bit programs from executing any syscall.


I guess it'd be question to @xeffyr if script I've pasted above should be bundled with proot-distro

@ghost
Copy link

ghost commented Sep 3, 2020

Now proot-distro provides both Ubuntu 18.04 and 20.04. If you need to install v18.04, then do proot-distro install ubuntu-18.04. Version 20.04 has alias ubuntu (as previously) and ubuntu-20.04.

@ghost ghost closed this as completed Sep 3, 2020
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants