How to set up smartphones and PCs. Informational portal

Installing linux on an android tablet. Changing a robot to a penguin, or how to install Linux on a tablet

Despite the abundance of operating systems, several are the most popular and generally accepted. If for a computer most often users choose between Windows or Mac OS, then for mobile devices it is Android or iOS. Nevertheless, the number of adherents of the free Linux operating system is growing all over the world. If it is more or less known, then there are very few tablets based on it, literally several models.

The installation process differs depending on the operating system of the tablet.

There are a large number of Linux distributions, but one of the most famous, and very stable, is Debian. If installing it on a computer is relatively simple, then you have to tinker with a tablet. We propose to consider step by step how Debian is installed on a tablet based on various operating systems. In addition, we will take a look at how to properly install a deb package on an installed Debian or iOS with a jailbreak.

Installing Debian on a Windows Tablet

Although the Linux and Windows kernels differ significantly, most tablets running Windows 10 can be used with both systems without problems. If the manufacturer does not equip its devices with some exotic components, then there should be no problems with driver support. Processors are used on the basis of the Intel platform, and this is the main condition, because the Linux kernel is primarily compiled for this platform.

To install the Debian operating system on a Windows tablet, it must meet the following requirements:

  • Have sufficient processor power and RAM.
  • Be able to select a boot device in the BIOS or UEFI settings (some manufacturers block this option).
  • Have an external keyboard connected via USB.

If the basic requirements are met, we proceed with the installation.


Installing Debian on an Android Tablet

While there shouldn't be any special problems with installation on a Windows device, then with Android everything is far from so simple. It can be argued for a long time that both Debian and Android are based on the Linux kernel, but in fact they are practically incompatible. The fact is that in Android tablets, in the vast majority of cases, processors on the ARM architecture are used. And even if the tablet has an Intel processor (such is often installed, for example, Asus), other components do not have universal compatibility with other systems. Perhaps connoisseurs will point to the official Debian port for the arm64 architecture, but it is still under development and is unstable. So what does it take to install Debian on Android?

Prerequisites for a complete installation

  • The tablet kernel must be compatible with Linux. The standard does not provide such capabilities, so you need to find and install a custom one.
  • An archive with an operating system ported to a mobile architecture.
  • Operating system loader.
  • Memory card.
  • Computer or laptop with Linux installed.

There is no universal method, each case is considered separately and may differ on a separate device. In addition, don't even count on the fact that without programming skills, you can install Debian instead of Android without a headache. Here is just an example algorithm.


Look for more detailed information on specialized forums in the branches dedicated to a specific tablet model. We warn you, if you do not understand programming at all, you better do not risk it!

Linux Deploy

The most faithful and reliable, and often the only available option. In fact, this is not a full-fledged installation of Debian, but its emulation. You will be required to comply with certain conditions and the installed program. The Linux Deploy application itself (https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy&hl=ru) mounts the created disk image on a USB flash drive or other media and installs the selected operating system distribution into it. Thus, two operating systems will operate in parallel on the device. Installation is performed by downloading the necessary files from official resources via the Internet.


In this way, you can almost fully use Linux. But again, no one can give a 100% guarantee of success. Everything is at your own peril and risk.

Complete Linux Installer

Another application for emulating Debian installations and other Linux distributions. You will need internet to download files and root rights.


Running and installing deb packages

On a tablet with Linux installed

After installing a new operating system, there is a need for applications. If you've managed to make your tablet compatible with Debian, there is an app store in the menu. In addition, the distribution kit comes with a certain set of built-in applications and most of the necessary programs are already there. However, some have to be reinstalled already in the process. This can be done in several ways: through the app store and using deb packages.

In the first case, you need to enter the program on the tablet, enter the name of the required software in the search bar and click "Install". The system will automatically install the selected package. In the second, you will have to find the program package with the .deb extension and install it as a normal application or through the terminal (analogue of the command line). The only disadvantage of this method is that you will need to download the necessary dependencies.

On iPad with jailbreak

Another area where you may need to install a deb package is installing tweaks, or settings, on a jailbroken iPad. After the hacking procedure, the Cydia application store will appear, through which programs and settings for hacked devices are distributed (here is how to use it). But sometimes there is no fast Internet at hand, or the required repository is simply not connected, and the necessary setting is distributed through some site in the form of deb packages.

To install it this way, you will need:

  • Computer with iFunBox or iTools file manager installed.
  • Jailbreak iOS device.
  • Connection cable.

The deb package installation process is carried out in several stages:

  1. Download the deb package to your computer or laptop.
  2. Connect the cable between the device and the PC.
  3. Using a file manager, copy the deb package to the / var / root / Media / Cydia / AutoInstall folder.
  4. Reboot your device.

You can do without a computer if the iFile file manager is installed on the jailbroken iPad. When downloading packages, the system will automatically offer to install the tweak. You just need to reboot.

Conclusion

Installing the Debian operating system and using deb packages requires some knowledge. In some cases, it is simply impossible for you to do without knowledge of programming. If you are not confident in your abilities, study all possible situations on specialized resources.

We hope you succeed. Write in the comments about your successes.

As an inveterate lover of OS Linux, I would certainly like to have a phone with this operating system. But unfortunately you can't find such a phone in the store. But still there are craftsmen who manage to install Linux on the phone.

To do this, they create special firmware, usually for a specific phone model. In this case, we have an ordinary phone, on which you can buy, if anything, spare parts, and if we don’t go for something, return the phone to its original appearance.

On which phone models can you install Linux, for example? The www.linuxmobile.org website has firmware for at least a few models. These models can be installed with Android based firmware. If you didn't know, Android is also Linux.

On which phones it can be installed linux?

Motorola Atrix Motorola Razr HD Cyanogen Mod 10 Cyanogen Mod 9 Cyanogen Mod 7

Perhaps some of these models are in your store and you can buy this phone and install Linux on it. How will it look like? This is what a stripped-down Android looks like Linux on the phone:

Of course, the developers warn that you use these firmware at your own peril and risk, and this is understandable. But on the other hand, would an ordinary user undertake to install Linux on a phone? He simply does not need it, this is the lot of people who are well versed in the topic. Yes, it would be great to have Linux installed on my old phone, sorry it's not on the list….

Linux on a tablet - is it worth it?

Linux on a tablet is the dream of many Linux lovers. I wrote some time ago that I had already made a tablet with Ubuntu, but so far in small quantities and buy a tablet with Linux today is not so easy. But this is just the beginning, as there is no doubt that in the future, new mobile phones and tablets will increasingly use Linux on their devices. But today everyone can install Lynx on a tablet, if he is, of course, from Linux to you.

The first question that arises for those who want to boot Linux into a tablet is the question of which Linux to install? Here you should immediately take off your rose-colored glasses: any Linux that you put on a regular computer cannot be installed on a tablet.

The fact is that most tablets today are made on the basis of processors that have an ARM structure. Therefore, the easiest way to install Linux on your gadget is to buy a tablet with the usual x86 architecture. Calculating such a tablet is not difficult, since it will most likely have Windows 7 or something similar preinstalled on it. By purchasing such a tablet, you can install any Linux on it.

But finding such a tablet today is not so easy, and having found it, you may not like it externally or in terms of characteristics.

Running Linux on Android

What is the way out? And there is only one way out: find OS Linux, which has already been ported to the ARM processor. There are not many such developments today, and one of the options is Kali Linux. But this is just one of the options. If you type "Linux ARM" in a search engine, you can see which Linux are already running on this processor. Here are some of them:

Arch LinuxARM Debian Linux on the ARM Ubuntu Linux on the ARM Gentoo Linux on the ARM

So there is a choice and you can try to install Linux on your tablet. But my question arose: have you ported enough Linux programs for this platform? Is the game worth the candle? After all, it is not enough just to port Linux, it is also important to port applications for it.

And I, in general, admire the abundance of applications for Android, which are no less than for Linux. And I would like to see many of them in Linux as well. But won't it turn out that by installing Linux on a tablet, I will deprive myself of this variety of applications that Android has?

In general, you need to think a thousand times before installing Linux on your tablet. Maybe his time has not come yet?

18+ © Seclub.org 2003-2018

As part of this article, we will tell you in detail how to install Linux to your Android device. To install and fully operate the alternative system, you will need: a smartphone or tablet, a software emulator, root rights and several gigabytes of free space.

1. Installation annexes complete linux installer

We enter the word “emulator” into the Google Play search menu and get a list of several dozen approximately the same utilities. They are all good, but we focused on the Complete Linux Installer app. It is completely free, beautifully localized and provided with detailed instructions for beginners.

The program can be downloaded from http://goo.gl/5C6Xa. The installation algorithm for Complete Linux Installer is no different than installing any other software, so we will not dwell on this point.

2. Working with the Complete Linux Installer application

Before starting to work with the program, I would like to emphasize again: what we are describing in this article is not installing Linux instead of Android, and emulation of the work of one system in another.

So, we launch the application and agree to the installation of additional software components. It is the work with these modules that will make it much easier for you to use the Linux operating system later.

As mentioned earlier, Complete Linux Installer requires root privileges for full functioning, which the application will remind you of in a pop-up window.

We provide the program with full access to the system functions of the mobile device.

This completes the initial preparation of the emulator for work. The main menu of the application will open in front of you. We pass to the sub-item "Installation Guide".

The emulator will scan the hardware of your gadget and give you a list of operating systems that are guaranteed to run on your mobile device. Let's take Ubuntu 13.10 as an example.

From this point on, the program begins to "guide" you through the stages of installing the operating system, accompanying each necessary action with detailed instructions. For example, after familiarizing yourself with the requirements of the emulator in the first step, be sure to install “Terminal” and “VNCViewer” on the second. Only after that select the item “Download image”.

Read the description of the differences between Linux distributions and choose the one you need.

Create a folder with the name of the future system in the root of the external drive of the gadget. This will make it much easier for the program to find the files it needs. In our case, we are creating the “ubuntu” directory. Unpack the downloaded archive into this folder.

As a result, two files should appear in the “ubuntu” directory. One of them is with the .img extension.

Can I install Linux on my phone?

This is the image of the Linux system being launched.

After completing the above steps, go to the “Run” sub-item of the Complete Linux Installer main menu and click the “Settings” auxiliary menu in the upper right corner of the window. After selecting the "Change" option, give the application the full path to the system executable file. Confirm your choice by clicking on the “Save changes” button.

This completes the next stage of installing an alternative operating system into the memory of your gadget. Feel free to choose the "Start Linux" option.

The application will launch a terminal in the background to execute test commands and request root access for it to the system functions of the device. We allow.

Now your smartphone or tablet will be able to work as an emulator of the Linux operating system and you will have access to all the features of the operating system with a penguin on the logo - from executing the simplest commands in the terminal to installing a full-fledged graphical environment. Linux installation on Android is now complete.

Why :

So this is so that you can clearly understand the difference between an actively developing system in a relatively high profitable market and a decaying platform for hairy.

It's just that android has a lot of things and interfaces in the form of file systems are actively used.

Happenes.

Can I install Linux on my phone?

Development is always through mistakes.
Maybe just not doing that?

Anywhere. This is more an android question than a unix forum. The absence of lines in fstab does not prohibit mounting with a simple command.

As part of this article, we will tell you in detail how to install Linux to your Android device. To install and fully operate the alternative system, you will need: a smartphone or tablet, a software emulator, root rights and several gigabytes of free space.

1. Installation annexes complete linux installer

We enter the word “emulator” into the Google Play search menu and get a list of several dozen approximately the same utilities. They are all good, but we focused on the Complete Linux Installer app. It is completely free, beautifully localized and provided with detailed instructions for beginners.

The program can be downloaded from http://goo.gl/5C6Xa. The installation algorithm for Complete Linux Installer is no different than installing any other software, so we will not dwell on this point.

2. Working with the Complete Linux Installer application

Before starting to work with the program, I would like to emphasize again: what we are describing in this article is not installing Linux instead of Android, and emulation of the work of one system in another.

So, we launch the application and agree to the installation of additional software components. It is the work with these modules that will make it much easier for you to use the Linux operating system later.

As mentioned earlier, Complete Linux Installer requires root privileges for full functioning, which the application will remind you of in a pop-up window. We provide the program with full access to the system functions of the mobile device.

This completes the initial preparation of the emulator for work. The main menu of the application will open in front of you. We pass to the sub-item "Installation Guide".

The emulator will scan the hardware of your gadget and give you a list of operating systems that are guaranteed to run on your mobile device. Let's take Ubuntu 13.10 as an example.

From this point on, the program begins to "guide" you through the stages of installing the operating system, accompanying each necessary action with detailed instructions. For example, after familiarizing yourself with the requirements of the emulator in the first step, be sure to install “Terminal” and “VNCViewer” on the second. Only after that select the item “Download image”.

Read the description of the differences between Linux distributions and choose the one you need.

Create a folder with the name of the future system in the root of the external drive of the gadget. This will make it much easier for the program to find the files it needs. In our case, we are creating the “ubuntu” directory. Unpack the downloaded archive into this folder.

As a result, two files should appear in the “ubuntu” directory. One of them is with the .img extension. This is the image of the Linux system being launched.

After completing the above steps, go to the “Run” sub-item of the Complete Linux Installer main menu and click the “Settings” auxiliary menu in the upper right corner of the window. After selecting the "Change" option, give the application the full path to the system executable file. Confirm your choice by clicking on the “Save changes” button.

This completes the next stage of installing an alternative operating system into the memory of your gadget. Feel free to choose the "Start Linux" option.

The application will launch a terminal in the background to execute test commands and request root access for it to the system functions of the device. We allow.

Now your smartphone or tablet will be able to work as an emulator of the Linux operating system and you will have access to all the features of the operating system with a penguin on the logo - from executing the simplest commands in the terminal to installing a full-fledged graphical environment. Linux installation on Android is now complete.

It wasn't long after the first Android smartphones were released until enthusiasts learned to run full-fledged Linux distributions on them. Techniques for installing Linux distributions on Android devices are widely known today, and there are even automated systems for installing and running Linux in the Google Play repository. In this article, I will try to accumulate all the accumulated experience of working with Linux on smartphones, tell you why you need it, and show you how to avoid possible pitfalls when porting Linux to a smartphone or tablet.

What for?

At first glance, it may seem strange that someone is trying to run an operating system on a mobile device that, in principle, is not designed to work with a small screen and without a sufficiently accurate manipulator (mouse) and keyboard. However, don't jump to conclusions. A Linux distribution can provide a smartphone owner with many advantages, including a set of old proven tools such as command line utilities, advanced editors, FTP and SSH servers, networking tools, and application development tools. By running Linux without a graphical shell on a smartphone with a hard keyboard (Motorola Droid, for example), you can comfortably use all of this right on the go without having to leave Android itself. All tools are available at any time, and the smartphone continues to be a smartphone, allowing you to receive calls and listen to Internet radio.

The second argument for installing Linux on a smartphone is the ability to use it as a portable workstation that can be connected to any PC and immediately access the terminal using an SSH / Telnet client or VNC / RDesktop client. By definition, this is better than flash drives with Linux installed, since there is no need, firstly, to reboot the machine, and secondly, to drive data back and forth; the results of your work will be available immediately after you disconnect your smartphone from your computer.

Finally, Linux gives the greatest gain on tablets, the screen of which allows you to work more or less tolerably in a graphical environment, and the ability to connect a mouse and keyboard via an OTG cable generally gives you a chance to turn a tablet into a full-fledged workstation. At the same time, there is no particular difference between installing a Linux distribution on a tablet and a smartphone.

How?

Porting Linux to Android is really easy, and the Linux kernel plays a major role here. Any Linux distribution is a collection of applications and libraries that run on top of the Linux kernel, and since Android itself is based on an almost unmodified Linux kernel, these applications and libraries can be run inside the Android environment without any problems. You just need to find a distribution kit for which there is a port on the ARM platform (do not forget that 99% of all Android devices run on ARM), install it using an ARM emulator on a virtual hard disk (that is, to a file), upload this file to SD card device, open terminal, mount image as loopback device and chroot inside. Everything! It's as easy as running an FTP server in a chroot environment - a simple and proven method for decades.

The only stumbling block when you decide to run a Linux distribution inside Android is the graphical environment. While there are no difficulties with access to the console due to the presence of a full-fledged terminal emulator, problems begin with graphical applications - there is no native X server for Android, and it is impossible to run a regular X server inside the distribution kit due to fundamental differences in the graphics architecture subsystems of the green robot. Despite the fact that it basically uses a standard Linux Framebuffer, on top of which you can run an X-server, the exclusive right to use it initially belongs to the higher-level Android libraries, so it remains to either download the Linux distribution instead of Android (which is completely impractical), or come up with workarounds. ...

Checking the operation of the required modules

Keep in mind that support for loopback devices and ext2 / ext3 file systems required to mount an image is not available in all Linux kernels installed on smartphones running Android. You can check for support using the lsmod | grep -e loop -e ext2.

Enthusiasts have gotten out of this situation by using a simple "remote" desktop connection method using any VNC client available for Android. Inside the chroot environment, the Xvnc X server is launched and all applications run under it. The user only needs to install the VNC client, drive in the local address - and voila, a full-fledged desktop appears on the screen.

The only bottleneck when using Remote Desktop is performance. Even working locally, VNC cannot provide the proper level, which would be sufficient for smooth scrolling or movement of windows without lags. It has not yet been possible to solve this problem, projects for developing a native X-server that would use the Android graphics subsystem are still very raw and cannot be used to run full-fledged graphical environments. However, no one forbids using them; for example, the X Server from Darkside Technologies Pty Ltd (goo.gl/ap3uD) is fine for running simple software.

Initially, Linux for Android existed only in the form of an image with an already installed system, as well as explanatory instructions on how to connect and use this image. Then scripts appeared that automated the process of mounting an image and launching Linux, but they also required some head work. Finally, recently there have been installers available on Google Play (for example, goo.gl/RSA1j), to some extent automating the process of launching the distribution, although, in fact, this is still the same installation guide, but interactive, with direct links to downloading images and scripts.

Alternative options

I have already mentioned above that the Linux distribution may well be loaded instead of Android, thanks to which it will be possible to use Framebuffer for direct access to the video adapter and significantly speed up the work of the graphical interface. However, doing this on a smartphone is practically pointless - Linux is unsuitable as the main system on small screens, and besides, it will be impossible to receive calls and use the Internet. But on a tablet, Linux will look quite decent.

Usually, on a device originally running Android, the so-called native version of a Linux distribution is installed as follows. An additional partition is created on the tablet's internal NAND drive, onto which the Linux distribution is copied. The U-Boot bootloader (which is used in most tablets) is then configured to use this partition as the boot partition. As a result, the tablet will automatically boot the Linux system after turning on the power.

To keep Android booting, the U-Boot loader is reconfigured so that the Linux partition is not the main one, but acts as a "Recovery Mode", accessible by turning on the device with the volume key pressed (the same which is used to flash the device and perform various recovery operations). Thus, it is possible to get a device with a dual boot: Android by default and Linux distribution when booted in recovery mode. At the same time, Recovery Mode itself remains accessible only with the help of special tools.

If NAND memory is not enough to accommodate a full-fledged Linux system, parts of it (usually the / usr partition) are moved to an image or a partition on an SD card. By the way, the ext2 partition on the memory stick can also be used to install Linux running in a chroot environment.

Installing a native Linux distro is more difficult than running in a chroot environment, but it's worth it if you have a tablet and an OTG cable that you can use to connect a keyboard and mouse.

Practical lesson

As I said, only distributions ported to the ARM architecture are suitable for running on Android. First of all, these are Ubuntu and Debian, and the former, for obvious reasons, is of much greater interest among robots. It is also possible to install Gentoo and several specialized distributions such as Backtrack. Let's consider the most typical case, that is, installing Ubuntu according to the standard scheme, without using any automated installers and other things.


First, we need a hard disk image with the installed distribution kit. You can create it yourself using the QEMU emulator, however, due to the fact that the installation procedure is absolutely standard and typical, I will not describe it, but simply send you to goo.gl/9nvBi. There is an archive with an image on which Ubuntu 12.04 is preinstalled with the LXDE graphical environment (it would be unwise to run Unity / Gnome on a phone / tablet). The archive should be unpacked and the ubuntu.img file should be placed on a memory card.

Next, you need to mount the image and chroot into the distribution environment. To do this, you need root rights, firmware with support for block loopback devices and an installed busybox (we are looking for “busybox installer” in the Market, CyanogenMod has it by default). Sequencing:

  1. Open the terminal emulator in Android (if not, you can install Terminal Emulator from the Market)... Or we connect the smartphone / tablet to the computer and get access to the terminal using adb: $ cd path-to-Android-SDK / platform-tools $ sudo ./adb shell

    Do not forget that the debug mode in this case must be enabled: "Settings -> For Developers -> Debug Android".

  2. We get root rights:$ su
  3. Create a block loopback device, connect a disk image to it and mount it:# mknod / dev / block / loop255 b 7 255 # mount -o remount, rw / # mkdir / mnt / ubuntu # mount -o loop, noatime -t ext2 \ /sdcard/ubuntu.img / mnt / ubuntu

    The contents of the image should appear in the / sdcard / ubuntu directory. Make sure it is so.

  4. We connect all the virtual filesystems necessary for the operation of the distribution:# mount -t proc proc / mnt / ubuntu / proc # mount -t sysfs sysfs / mnt / ubuntu / sys # mount -o bind / dev / mnt / ubuntu / dev
  5. We configure it so that you can get full access to the Network from the chroot environment:# sysctl -w net.ipv4.ip_forward = 1 # echo "nameserver 8.8.8.8"> /mnt/ubuntu/etc/resolv.conf # echo "nameserver 8.8.4.4" >> /mnt/ubuntu/etc/resolv.conf # echo "127.0.0.1 localhost"> / mnt / ubuntu / etc / hosts
  6. Go to the chroot environment:# chroot / mnt / ubuntu

Actually, this is where the installation ends. Now you can run console software, update the system, start network services and do almost everything that can be done with a regular desktop Linux system, not forgetting, of course, that some software that directly interacts with hardware and various specialized pseudo-devices will not work. Also, do not forget that virtual filesystems should be unmounted after completion of work.

Now we need to install and run the Xvnc X server, which exports display and input devices using the VNC protocol. TightVNCserver is already in the presented image and is even configured, but in order for you to better understand the process and be able to solve the problems that have arisen, I will describe in detail the process of installing and launching it.

  1. Update and install TightVNCserver:# apt-get update # apt-get install tightvncserver
  2. Create a file /root/.vnc/xstartup and write the following into it:#! / bin / sh xrdb $ HOME / .Xresources xsetroot -solid gray export XKL_XMODMAP_DISABLE = 1 icewm & lxsession

    The third command is needed here to fix problems that may arise due to the physical absence of a keyboard on the device.

  3. Launch Xvnc using the vncserver wrapper as root:# export USER = root # vncserver -geometry 1024x800

    As a result of executing the last command, a request for a password to access the VNC server will be displayed on the screen, it is better to specify something simple like "123". You can set virtually any resolution, but it is better if it matches the physical resolution of the device screen.

  4. Install the AndroidVNC application on the smartphone, launch it, specify the IP address and port 5901, and connect. The LXDE desktop should appear on the screen.

In order not to bother with manually entering all commands, you can use the ubuntu.sh script located here: goo.gl/xSpK4. Just put it and the ubuntu.img image in the ubuntu directory on your SD card and run the script with sh ubuntu.sh, and after 5-10 seconds connect to your desktop using AndroidVNC. Keep in mind that the script will mount the image to the / data / local / mnt directory.


Installing Gentoo on an ext2 partition

So we installed Ubuntu using the filesystem image and loopback chroot wizardry. It turned out to be easy to do, and using scripts is generally very easy, but what if we go further and install a more hardcore distribution, and not using images, but on a dedicated ext2 partition on a memory card? So we can solve the problem of some firmware and kernels without support for loopback devices, and besides, we can enjoy a normal distribution kit established by all the rules.


Take Gentoo as a test case. To install it on an ext2 partition, we need a memory card with a capacity of at least 2 GB and a rooted smartphone with busybox installed. The sequence of actions is as follows.

  1. We make a backup of data from a memory card and create an additional partition on it, at least two gigabytes in size... This can be done using any program for partitioning disks, but keep in mind that if you want to continue to use the SD card for its intended purpose, then create a FAT32 partition at the beginning of the card, so that it becomes the first, and an additional partition for installation of the distribution should be the second.
  2. We format the sections of the SD card:$ sudo mkfs.vfat / dev / sdc1 $ sudo mkfs.ext2 / dev / sdc2
  3. We take the phone, go to "Settings -> About phone" and see which processor is installed. Next, go to the goo.gl/PRfux page and download stage3 for the desired architecture, for example stage3 for ARM v7 is in the current-stage3-armv7a directory.
  4. We mount the ext2-partition of the memory card on the computer and unpack the contents of the resulting archive into it:$ sudo mount / dev / sdc2 / mnt $ sudo tar -xxpf stage3 - *. bz2 -C / mnt

    We immediately edit the configs and everything that is needed to our liking, including editing /etc/resolv.conf according to the sample from the previous section.

  5. Launch the terminal emulator (or execute "adb shell"), mount everything you need and go to chroot (almost the same as in the case of Ubuntu): # mount -o remount, rw / # mkdir / mnt / gentoo # mount / dev / block / mmcblk0p2 / mnt / gentoo # mount -t proc proc / mnt / ubuntu / proc # mount -t sysfs sysfs / mnt / ubuntu / sys # mount -o bind / dev / mnt / ubuntu / dev # sysctl -w net. ipv4.ip_forward = 1 # chroot / mnt / gentoo

Access to the desktop is done in the same way as in Ubuntu, except that now you have to collect a bunch of software right on the phone :). However, you can set up an environment for cross-compilation on a computer, but this is a topic for a separate article.

Native installation

When you run Ubuntu using a VNC server, you will notice the slowness of its work, which is associated with the costs of the VNC protocol for transferring images "over the network". To avoid this problem, you can install Ubuntu as your primary system alongside Android so that it can use the video adapter directly. Unfortunately, there is no universal way to do this. Each device is unique in its own way, including different tables of NAND-memory partitions to be installed on, different devices and drivers for their operation.


Fortunately, the installation process for the native version of the distribution is well described for many devices in Russian-language forums, so it won't be difficult to find instructions. It is worth, however, to immediately pay attention to several features of this type of installation:

  • A separate or primary NAND partition. The Linux distribution can be installed both in a pre-created partition in NAND memory, and in the main boot partition. In the first case, the firmware developer usually leaves the option to boot Android using a special script or by booting the Linux distribution in recovery mode, in the second it will be installed instead of Android and to restore the ability to download the robot, you will have to reflash the device again.
  • Dual boot option. If the Linux distribution will be installed on a separate partition, the developer can leave the option to download Android. However, you should immediately pay attention to how this download occurs: using the recovery mode or a script launched from a regular computer. Still, the second method will be inconvenient on the road.
  • Hardware support. The original Linux kernel of the Android firmware already includes all the necessary drivers that may be needed to run a full-fledged Linux system, but not all Linux firmware will start by itself. Often there are problems with the Wi-Fi adapter and the touch screen, which does not respond adequately to touch. Therefore, before installing the firmware, you should carefully read about the possible complications.

In any case, be prepared for the fact that during the installation of the Linux distribution all your data will be destroyed. You can't do without it.

What's next

A Linux distribution installed alongside the original Android system can be a very handy working tool, but at the moment "Linux within Android" is considered more of a toy and a way to show off to friends than a serious decision. I am sure that soon, when a full-fledged implementation of the Wayland graphical server appears for Android, the situation will begin to change and we will see distributions with an interface adapted for small screens, as well as full-fledged Linux applications distributed in the form of regular APK packages. Also, do not forget about the project "Ubuntu for Android" - within its framework, work is underway on the official port of Ubuntu for Android, which will allow using a smartphone as a portable system unit that can be connected to any monitor.

November 12, 2011 at 03:17 AM

Relocating the soul: linux on android tablet

  • * nix

Good day, everyone.

My story begins with reading, after which I decided to purchase the miracle of Chinese tablet making: superpad. This tablet was taken as a toy for "digging a little", in combination, a reader, a pairing player and a watchman for a long journey ... Immediately, I note that I have two usb hard drives for 500 GB and 1 TB, on which all the most important things for a fun life are stored , and they are split into ntfs and ext4. And, of course, the tablet does not see them.

Here is my volunteer

This is the first reason to dig deeper. After viewing 200 pages of the forum on xda-developers.com, certain

At this stage, all attempts to open this tablet were put on the back burner. Until a glorious student time - sessions. And since at the session students do absolutely everything, just not in the subject, then funny night gatherings on the Internet on obviously bourgeois sites have resumed. And I came up with a brilliant idea to put Orthodox linux on this tablet, in my case - ubuntu.
What came of this, see below.

It is clear that it will not be possible to simply take and install ... well, where ours did not disappear ...

We will need:

Let's look at the main stages of loading android and linux
1. Power on and boot ROM code execution Power on and boot ROM code execution
2. The boot loader The boot loader
3. The Linux kernel The Linux kernel
4. The init process The init process
5. Zygote and Dalvik console (bash, zsh ...) / wm (kde, gnome ...)
6. The system server Boot completed
7. Boot completed

As you can see, the differences start at the init stage.
The easiest way to change it is.

Honestly, I thought that only Hadroid's init could be used and that it was tightly screwed to the core. And even having received an example of a working ramdisk from another tablet, I did not think that it would start ...

ramdiska contents
bin dev etc home init init.rc lib linuxrc mnt newroot opt ​​proc root sbin sys tmp usr var
/ Bin contains busybox, / sbin contains switch_root with a link to it.
The init code from the ramdisk by zt-180

#! / bin / sh echo Starting from initram image. Echo Waiting for SD-CARD wake up ... sleep 3 echo "Mounting new rootfs" mount -t ext2 / dev / mmcblk0p2 / newroot && echo OK echo Hold on, switching root ... exec switch_root / newroot / sbin / init echo hrm, have a shell instead exec / bin / ash

It remains to flash the ramdisk into memory (I used burntool under xp) and - voila, the boot stage. Yes, I was flashing instead of recovery, so to start Linux you have to hold down the keys at startup.

So, the loading stage has been passed and it is worthwhile to be patient, since the console does not show signs of life, and everything is loaded quite slowly.

Configuring auto login on the first console
In /etc/init/tty1.conf replace the last line with exec / bin / login -f Yor_Login< /dev/tty1 >/ dev / tty1 2> & 1 then in your ~ / .bashrc you can write commands that will start at automatic login.
Fighting the x-server
He definitely wasn’t friendly with the touchscreen, xorg.conf and xterm ... removed the synaptic driver, put the following in ~ / .xinitrc:
#! / bin / bash # $ Xorg: xinitrc.cpp, v 1.3 2000/08/17 19:54:30 cpqbld Exp $ # / etc / X11 / xinit / xinitrc # # global xinitrc file, used by all X sessions started by xinit (startx) # invoke global X session script #. / etc / X11 / Xsession xclock -geometry 50x50-1 + 1 & exec xterm -geometry 80x66 + 0 + 0 -name login
Dealing with the work environment
I wanted to install kde, as I really like the rendering of graphics with the qt library. I'll tell you right away: yes, it was installed and started, but HOW ...
First, I immediately set up autologin:
in / etc / kde4 / kdm / kdmrc we find and change the following for ourselves
AutoLoginEnable = true # If true, auto-login after logout. If false, auto-login is performed only # when a display session starts up. # Default is false # AutoLoginAgain = true # The delay in seconds before automatic login kicks in. # Default is 0 AutoLoginDelay = 3 # The user to log in automatically. NEVER specify root! # Default is "" AutoLoginUser = Login # The password for the user to log in automatically. This is NOT required # unless the user is logged into a NIS or Kerberos domain. If you use this # option, you should "chmod 600 kdmrc" for obvious reasons. # Default is "" AutoLoginPass = Password
and, as written, we do chmod 600 kdmrc in the console under the root, so that bad people do not spy on our password.
Secondly, at the entrance, the splash screen hung for a suspiciously long time, and I, having doubts, called startkde from the console. After a long and tedious display of all sorts of errors, the plasma finally loaded in netbook mode. Graphic effects are turned off, since we are sitting under a framebuffer, and there are some wild brakes, but still this is kde and it loaded!
Fine-tuning everything and everything for yourself
Each has its own, I have not yet carried out the optimization, but there is a lot to be done: speed up loading, optimize the workspace. I'm looking in the direction of the lighter wm - e16 - but haven't made the main one yet. you also need to calibrate the touchscreen, since the virtual keyboard is already in kde.
I look towards openbox +

Top related articles