LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
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

Reply
 
LinkBack Search this Thread
Old 07-23-2012, 06:52 PM   #1
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 934

Rep: Reputation: 245Reputation: 245Reputation: 245
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.
 
Old 07-23-2012, 08:14 PM   #2
TheCoffeMaker
LQ Newbie
 
Registered: Jul 2012
Location: Argentina
Distribution: Debian
Posts: 1

Rep: Reputation: Disabled
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
 
Old 07-23-2012, 09:03 PM   #3
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 934

Original Poster
Rep: Reputation: 245Reputation: 245Reputation: 245
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.
 
Old 07-23-2012, 10:37 PM   #4
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 934

Original Poster
Rep: Reputation: 245Reputation: 245Reputation: 245
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.
 
Old 07-24-2012, 04:06 PM   #5
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 934

Original Poster
Rep: Reputation: 245Reputation: 245Reputation: 245
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).
 
Old 08-04-2012, 07:25 PM   #6
justboo2u
Member
 
Registered: Feb 2011
Distribution: Ubuntu, Debian(ARM),XP,W7,CP/M
Posts: 126

Rep: Reputation: 20
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!
 
Old 08-04-2012, 07:32 PM   #7
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 934

Original Poster
Rep: Reputation: 245Reputation: 245Reputation: 245
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!
 
Old 08-12-2012, 06:19 PM   #8
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 934

Original Poster
Rep: Reputation: 245Reputation: 245Reputation: 245
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.
 
  


Reply

Tags
android, debian, debootstrap, tablet


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem regarding MID tablet running on Android 2.2. tailinlinux Linux - Mobile 3 04-19-2012 04:59 AM
android tablet will not shut down rng Linux - Mobile 6 04-13-2012 06:48 PM
Problem on MID Tablet Running on android 2.2. tailinlinux Linux - Newbie 2 04-10-2012 09:17 AM
Is there any howto for installing/upgrading android on a tablet linx win Linux - Mobile 1 05-06-2011 11:03 AM
android tablet sherwiner Linux - Newbie 1 04-19-2011 06:21 PM


All times are GMT -5. The time now is 03:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration