Installation in an Android Chroot

Install Arch Linux ARM on other devices.

Re: Installation in an Android Chroot

Postby sironitomas » Thu Jul 21, 2011 3:50 am

I've followed exactly your steps.

When I try to do:
$this->bbcode_second_pass_code('', 'mount -t ext2 /dev/loop1 arch/')
It says: "mount: Device or resource busy"

Why does it say that?

Regards.
sironitomas
 
Posts: 12
Joined: Sun Jul 17, 2011 3:23 am

Re: Installation in an Android Chroot

Postby bogen » Fri Jul 22, 2011 5:04 am

what is the output of mount (no arguments) ?

It is possible /dev/loop1 is already in use.

If that is the case you will need to create a different loop back device.

loop1 is actually supposed to be 7 1. loop0 - loop7 are 7 0 - 7 7

$this->bbcode_second_pass_code('', '
mknod /dev/loop7 b 7 7
')

use loop7 (or whatever is free to use) rather than loop1 if loop1 was already in use.
bogen
 
Posts: 5
Joined: Fri Jul 22, 2011 4:59 am

Re: Installation in an Android Chroot

Postby sironitomas » Fri Jul 22, 2011 6:40 pm

bogen's solution did the trick. Thanks!

However, there are a few problems in the next steps.
$this->bbcode_second_pass_code('', 'mount -o bind /dev/ /sdcard/Arch Linux ARM/dev')
should be
$this->bbcode_second_pass_code('', 'mount -o bind /dev/ /sdcard/arch/dev')

Once I chroot, the $PATH is not correctly set, because the commands don't work. I have to actually type /bin/mount /usr/bin/pacman and so...

There are weird errors like: "error: command failed to execute correctly" or
$this->bbcode_second_pass_code('', '[root@localhost /]# /usr/bin/top
TERM environment variable not set.
')

An off-topic question. Why is the output of pacman so poor?
sironitomas
 
Posts: 12
Joined: Sun Jul 17, 2011 3:23 am

Re: Installation in an Android Chroot

Postby kmihelich » Fri Jul 22, 2011 7:54 pm

Define "poor."
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Installation in an Android Chroot

Postby sironitomas » Fri Jul 22, 2011 9:27 pm

$this->bbcode_second_pass_quote('kmihelich', 'D')efine "poor."


Poor compared to the Arch Linux Pacman. This one only show: "downloading [pkgname]".

There is no progression bar, nor percentage, nor installation output. Why?
sironitomas
 
Posts: 12
Joined: Sun Jul 17, 2011 3:23 am

Re: Installation in an Android Chroot

Postby kmihelich » Fri Jul 22, 2011 10:08 pm

That would most likely be in relation to the TERM environment variable not being set, from your output above. Progress bars and all that require a certain type of terminal (or emulation) to actually display. If it doesn't find something compatible, it defaults back to non-pretty mode, which is universally compatible.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Installation in an Android Chroot

Postby sironitomas » Fri Jul 22, 2011 10:41 pm

$this->bbcode_second_pass_quote('kmihelich', 'T')hat would most likely be in relation to the TERM environment variable not being set, from your output above. Progress bars and all that require a certain type of terminal (or emulation) to actually display. If it doesn't find something compatible, it defaults back to non-pretty mode, which is universally compatible.


I understand. Maybe doing$this->bbcode_second_pass_code('', ' source /etc/profile')could solve the problem? I can't try because I'm not at home right now.

Regards.
sironitomas
 
Posts: 12
Joined: Sun Jul 17, 2011 3:23 am

Re: Installation in an Android Chroot

Postby kmihelich » Fri Jul 22, 2011 11:07 pm

Possibly, if that sets all the required environment parameters. Remember this is only a chroot install, not an actual running copy. It's purpose is more a proof of concept.. "it can be done".. rather than as a standard. As a chroot install it's also bound to whatever limitations of the system you're chrooting from. You're essentially just running a separate root, but you retain the same kernel and devices, and it's not a full system in the same sense as our supported platforms. As such, it's not within the realm of full support from us since it's not an independently running installation on hardware we support and have worked to iron quirks out of. It's something to play with, experiment, but by no means any form of permanent solution.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Installation in an Android Chroot

Postby sironitomas » Sat Jul 23, 2011 1:51 am

This is what I did after I chrooted:
$this->bbcode_second_pass_code('', '
source /etc/profile
export TERM=xterm
export HOME=/root
mount /dev/pts # in order to be able to use ssh (otherwise, "PTY allocation request failed on channel 0")
')

I think those are all things the arch automatically do through scripts like rc.sysinit, but since we never actually boot here, none of that ever happen.

After that, most of the things work correctly. I could run sshd, vsftpd, etc.

A more experienced user should recommend which scripts to run to simulate a boot and set everything correctly in a chroot installation (since https://wiki.archlinux.org/index.php/Chroot has no further details).

@kmihelich: I understand that, but I don't see why not to run services or even a tightvnc server to be used from a local client. This should have a little bit more support, IMHO.

Thanks.
sironitomas
 
Posts: 12
Joined: Sun Jul 17, 2011 3:23 am

Re: Installation in an Android Chroot

Postby kmihelich » Sat Jul 23, 2011 1:57 am

There is a reason why this is filed under community supported devices. Support comes from the community. The official development time is spent on devices we actually boot from.. devices that are open to development or can be flashed to comply. If you want more from a chroot, you're more than welcome to contribute.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Next

Return to [Please read announcement] Community-Supported Devices

Who is online

Users browsing this forum: No registered users and 2 guests