Linux - MobileThis forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm trying to install Debian on an Android tablet. I'm following this guide (it's in Spanish, but you can easily check the commands to know what are the steps involved). Basically, it consists in creating a directory on the computer and debootstrap a basic Debian system inside it specifying the architecture (armel) and the Debian branch (I chose Sid). The contents of this basic file system are copied to the microsd card and later it is inserted on the tablet. Then, the installation is finished from the adb shell. The problem I have is, when I execute /debootstrap/debootstrap --second-stage, I get the following after a period of about 2 or 5 minutes, and then I'm returned to the command prompt:
BTW, according to the guide I must chroot debian (from the adb shell), invoking /bin/bash, but I'm not sure how to install bash on the tablet, so I simply chrooted it with the default shell (/bin/sh, if I'm not wrong). Could it be related? Or in any case, does anyone have any idea what might be wrong?
Like debootstrap's parameter suggest, it's a two stages process ... the first stage is the one that involves the first debootstrap will not do a full debootstrap ... it will prepare the filesystem for debootstrapping, just downloading the files required to perform the second stage, where you must continue the debootstrap from your device. This is because it can't complete the debootstrap process for an ARM architecture running on a x86 based architecture.
To be able to perform the other steps, you must have your tablet rooted and with busybox installed ... busybox is a great tool it provides a good bunch of gnu commands like chroot.
Hi TheCoffeeMaker, you are the one who wrote the guide, right? (Thanks for the guide, btw!).
My tablet is rooted and has busybox installed, but not bash (well, it sort of has bash installed, since I installed the Terminal IDE application that has bash, but must be used from the application itself). I used busybox chroot /data/debian/ /bin/bash in order to chroot the debian file system from the adb shell, but when I checked which shell I was using (with 'echo $SHELL'), it returned '/bin/sh'. Then I set the environmental variables you describe in the guide, then the debootstrap second stage command, but that's when I get the warning I posted before.
By the way, both, the base-passwd and the base-files packages are inside /var/cache/apt/archives, but for some reason dpkg can't install them. Do you think it's possible that the environmental variables are not being set because I don't have bash installed? Also, how did you installed bash on the phone?
Oh, and something else: after partitioning the microSD card the tablet says it's damaged (though I still can access it from the adb shell), do you know how to make it recognize the card properly?
Ok, upon further investigation, I realized this is due to the debian file system inside the sdcard being mounted read-only. I umounted it and then mounted it again read-write with the following command:
busybox mount -o rw,exec,dev /dev/block/mmcblk0p2 /data/debian
I checked with 'mount' and it was mounted rw, then I attempted the debootstrap --second-stage command again 3 times. Sometimes it fails with the same error as my first post, and other times it fails with an error saying something like "cannot install into target '/', mounted with noexec or nodev". After that, I checked and the file system is mounted read-only; I have no idea why it changes itself to read-only, though, since I mounted it rw (and with the 'exec' and 'dev' options). I'm not sure if this is related but the tablet's firmware is formatted in cramfs which is a read-only file system, but I suppose it shouldn't matter since I'm working with the debian file system inside the microSD card which is formatted in ext3. Any ideas?
TheCoffeeMaker, by the way, I think there's a small typo in the guide: when setting the $PATH variable you wrote:
Well, I've kept looking into this issue and here seems to be the answer. Apparently the Android in this tablet doesn't have ext3 support and that is why it tells that my sd card is damaged when I insert it (though I can access it from the adb shell and from Linux just fine), so as a protective measure the tablet remounts the sd card read only after a while (and the Debian installation stops, since it can't alter the file system).
The question is, is there a way to install ext3 support into the tablet? Maybe there's an app that allows to have access to ext3-formatted devices? I searched the android market and found an app named NTFS Mounter which supposedly allows to mount ext3-formatted sd cards, but it says it's not compatible with my device. (This tablet has Android 2.3.1, by the way).
Well, I made a secondary partition on the sd card formatted in ext2, then made a first stage Debian installation on it from my laptop (with debootstrap), then inserted the card on the tablet and attempted to mount the ext2 partition from the adb shell. This is what I got:
# busybox mount -t ext2 /dev/block/mmcblk0p2 /data/debian
mount: mounting /dev/block/mmcblk0p2 on /data/debian failed: No such device
Sometimes it says "no such device" and other times it says "Invalid argument". The directory /data/debian is there. I used fdisk to make sure the device exists and it is there too:
# busybox fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 31.4 GB, 31499223040 bytes
255 heads, 63 sectors/track, 3829 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 3438 27614208 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 3438 3830 3145728 83 Linux
The weird thing though is that the tablet does use internal file systems in ext3, but when I insert a sd card formatted in ext3 or ext2 it says the card is damaged.
I think I'm giving up... maybe next time I buy a tablet I'll get a better and more updated one (this one has android 2.3.1 and the manufacturer has not released upgrades).