Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, LiMo, Maemo, MeeGo, Openmoko, Ubuntu Mobile, WebOS, Firefox OS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org |
| Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-23-2012, 06:52 PM
|
#1
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 820
Rep: 
|
Problem installing Debian on my Android tablet.
Hi guys,
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:
Code:
/debootstrap/debootstrap --second-stage
I: Installing core packages...
W: Failure trying to run: dpkg --force-depends --install /var/cache/apt/archives/base-files_6.11_armel.deb /var/cache/apt/archives/base-passwd_3.5.26_armel.deb
(Google returns nothing for this error).
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?
Thanks in advance.
Last edited by odiseo77; 07-23-2012 at 06:55 PM.
|
|
|
|
07-23-2012, 08:14 PM
|
#2
|
|
LQ Newbie
Registered: Jul 2012
Location: Argentina
Distribution: Debian
Posts: 1
Rep: 
|
Hi odiseo77,
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.
Regards!
TheCoffeMaker
|
|
|
|
07-23-2012, 09:03 PM
|
#3
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 820
Original Poster
Rep: 
|
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?
Thanks in advance!
Last edited by odiseo77; 07-23-2012 at 09:05 PM.
|
|
|
|
07-23-2012, 10:37 PM
|
#4
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 820
Original Poster
Rep: 
|
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:
Code:
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:
Code:
export PATH=/bin:/sbin:/usr/bin:/usr:sbin:$PATH
I think it should be:
Code:
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PATH
Regards.
Last edited by odiseo77; 07-23-2012 at 10:38 PM.
|
|
|
|
07-24-2012, 04:06 PM
|
#5
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 820
Original Poster
Rep: 
|
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).
Thanks in advance (and sorry for triple posting).
|
|
|
|
08-04-2012, 07:25 PM
|
#6
|
|
Member
Registered: Feb 2011
Distribution: Ubuntu, Debian(ARM),XP,W7,CP/M
Posts: 117
Rep:
|
You would likely have better (easier?) luck moving everything from the ext3 f/s into an ext2 f/s...
mount the ext3 image bwo loop and tar it...
then mount a new ext2 image and untar it...
I think that would save ya a BUNCH of asprin! 
|
|
|
|
08-04-2012, 07:32 PM
|
#7
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 820
Original Poster
Rep: 
|
Had not thought about it, but sounds like it could work (if the tablet doesn't get funky and remounts the sd card read-only). Will try it as soon as I have some time and let you know.
Thanks for the help!
|
|
|
|
08-12-2012, 06:19 PM
|
#8
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 820
Original Poster
Rep: 
|
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:
Code:
# 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:
Code:
# 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).
Thanks for the help, though.
Cheers.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:59 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|