Dual boot android linux

How To Dual-Boot Android-x86 And Ubuntu (With GRUB 2)

Author : Andrew | Posted: March 05, 2012

Notes:

  • All Android-x86 supported filesystems should work (ext2, ext3, fat32 and ntfs)
  • It may work with other Linux distributions that use GRUB 2, but I’ve only tested it with Ubuntu. Some parts of the instructions below may be different for other Linux distributions. Also, the Android-X86 version used in my test was 4.0 Ice Cream Sandwich RC1.

Firstly, here’s a video with all the required steps to dual-boot Android-x86 4.0 and Ubuntu:


(direct video link)

How to dual-boot Android-X86 and Ubuntu

And at the bottom of the file, add this:

There are some changes you’ll need to make to the above menu entry (code above):

  • If you didn’t create an sdcard image, remove the «SDCARD=/data/sdcard.img» part from the 3rd line (make sure you don’t remove anything else!)
  • The above menu entry uses «eeepc» for androidboot.hardware, but you can replace it with your hardware, depending on the ISO you’ve downloaded (use «asus_laptop» for the ASUS Laptop ISO, etc.) or use «generic_x86».
  • If you haven’t installed Android-x86 4.0 RC1 but some other version, replace the lines containing «android-4.0-RC1» with your version.
  • For Android-x86 versions older than 4.0, use «androidboot_hardware» instead of «androidboot.hardware»

Once you make these changes, save the file.

2. Now let’s make the file executable and update GRUB 2:

Источник

How to install Android-x86 from Ubuntu? | Dual-boot

Introduction:

In this blog post, you will get an idea about how to install Android-x86 on your Linux computer. Android-x86 is an android project which allows you to experience Android right on your computer. And the best thing is that you can install it alongside with other operating systems. This is called dual-booting as you can use two OS installed on the same computer. Android-x86 can be installed from a Windows computer or a Linux computer. But this article will focus on installation process from a Linux (Ubuntu) system using Grub2 bootloader.

Pre-cautions:

  • Dual-booting is sometimes tricky and you may end up with a dead computer and all your data lost. Although, this will not happen if you have a bit of early knowledge or follow this article step by step.
  • It good to backup your important data to an external hard drive, USB device or cloud storage before proceeding.

Requirements:

  • Android-x86 image file (ISO). To download go to the official site. Select one of the two mirror file hosting sites. I would suggest to choose from Download from Fosshub. Now, download the appropriate Android-x86 ISO file according to your system architecture.
  • A bootable flash drive (atleast 2GB).

Creating a bootable drive:

We will be using pre-installed Startup Disk Creator to create a bootable Android-x86 drive. In case, you don’t have it installed, type the following command in Terminal to install it: (type you admininstrator password)

I have prebuilt, so it says its the newest version.

  1. Open Startup Disk Creator.
  2. Select the ISO image file you downloaded, browse it from Other… button.
  3. Insert you flash drive. And the flash drive should display in Disk to use section.
  1. Select the flash you want, and choose Make Startup Disk. Select Yes.

Startup Disk Creator

Creating partition for Android-x86:

You can install Android-x86 on your same Linux partition, but preferably one should create a partition for another operating system.

To create partitions, we will use an pre-installed Ubuntu application named GParted. If not installed in your system, type the following command in Terminal:

Now, open GParted. And then, to create a new partition, right click on the required partition and select Resize/Move, then enter the amount of space you want (about 16GB will be good). Type 16384 in New Size(MiB). Then select the green right tick to apply all changes.

Читайте также:  Как изменить звук включения зарядки андроид

As you can see, I have 3 partitions, /dev/sda1 has Linux installed on it. And other two have almost not data in it. So, I just named the /dev/sda3 as Android-x86 without creating partition. You can just create a 16GB partition and that’s it.

Installing Android-x86 from bootable drive:

Now, shut-down your computer. And, then switch the power button. After that you have to open Boot-Menu by pressing suitable key combination.

  1. Now, insert the flash drive. And select it from the boot menu, using Up and Down Arrow keys, then by pressing Enter.
  2. Your, Android-x86 setup should open up. Select Install Android-x86 to harddisk from the menu.

  • Choose the 16GB partition you have created from the menu.

Choose ‘Do not re-format’ to keep existing data. Otherwise, choose a filesystem type to format the data in your partition.

Then, you will be asked to install GRUB bootloader. Select Yes.

Then the installer will ask if you want to install /system directory as read-write. If you want to modify the system for some purposes (e.g., debugging), select Yes. Now, the installation process will begin.

Now, once completed, select Reboot. As we have to manually add GRUB menu entry at startup for the installed Android-x86.

If after reboot, GRUB menu appears, select the first option Ubuntu from it.

Adding GRUB menu entry:

Now, after rebooting to your Ubuntu system. Open Terminal.

After that Gedit Editor open, type the following to add a menuentry:

The file should look like somewhat like the image below:

Now, before continuing you have to change (hd0,3) with that of yours. It represents /dev/sda3. Open GParted and see what is the partition where Android-x86 is installed. If you have /dev/sda6 then change (hd0,3) to (hd0,6).

Change android-9.0-r2 with the name of the version you have downloaded. Open Files, then Other Locations and the the partition where Android-x86 is installed. And then copy the name as found there and replace in the file with the name.

Now, type the following commad to apply all changes and update bootmenu entry:

Now, you have successfully created a bootmenu entry.

Using GRUB bootloader:

Now reboot your computer and then press Left Shift to display GRUB bootloader. And at last you will find the menu entry you have created, select it and you will successfully boot into Android-x86. Now everytime you boot your computer just hold down Shift key and select Android-x86 to open it.

Источник

How to Dual Boot Ubuntu on Your Android Device

Canonical has been developing Ubuntu for Devices for a while. Unfortunately, it hasn’t exactly been easy to play around with it. However, if you’ve wanted to try it (and own a recent Nexus device), it’s never been easier to dual boot.

Recently, Canonical announced an update to its Ubuntu Dual Boot app —which allows you to run Ubuntu and Android side by side—that makes it easier to update Ubuntu for Devices (the name for the phone and tablet version of Ubuntu) directly on your device itself. This means that not only can you try out Ubuntu without ruining your phone, but you can see all the sweet new changes as they happen without much fuss. Sounds like a win-win for tinkerers.

Disclaimers: Ubuntu for Devices is still in a Developer Preview right now. As such, it is probably not feature complete enough to be your daily driver. Hence why we’re dual-booting. Naturally, you should expect some bumps in the road. Additionally, Ubuntu uses HTML5 for its apps, but many «apps» on the platform are actually just the regular mobile sites. Even some of the included ones (like Twitter). At the time of this writing, some «apps» prompt you to install an Android app when you first run them. Don’t do this. Ubuntu is not built on Android and Android apps won’t run on it. Attempting to install them—or even opening a link to the app—can break things.

Читайте также:  Языковой пакет для android

What You’ll Need

To get started installing Ubuntu Dual Boot (and subsequently Ubuntu itself), here’s what you’ll need:

Источник

[GUIDE][Dual Boot][TheEasyway] How to setup Linux RootBind Method [Updated May 16th]

Kingzak34

Senior Member

Hello everyone ! I made this guide for all who want to try to dualboot Android and Ubuntu using the RootBind method.
But first, what is RootBind ?

Actually, the RootBind method consist to have a Linux file system, living in a folder of our Android partition.
The default location for this linux file system is /data/linuxroot.
The way to switch between Android and Linux is to flash an Android kernel or the linux kernel. That’s all.
It means you’ll be able to have a linux installation, without erasing Android ( Still available, not touched at all ) and it means that you can easily manage your Linux installation.
You dont want it anymore ? Just delete a folder. You want to try another version, but you dont want to lose your current data ? Just do a zip of the folder, and extract a new version instead.

DualBoot setup. Linux installation

First of all, here is all what you’ll need :

  • The last rootbind kernel : Download Here Take the zip version.
    [*]WARING : Note that if you use the last kernel ( 15 one ) YOU MUST TAKE MODULES AND EXTRACT IT IN /lib/modules/ when installation is done
  • The last Linux IMG of your choice, DjDill made imgs for this method with everything pre working here : DjDill images thread / TravellingGuy Image thread / jrohwer 14.04 Kubuntu IMG
  • Kernel for booting back Android You can find the KatKiss kernel there for exemple : KatKernel
  • A terminal emulator in Android or ADB Shell
  • If you dont want to use one of DjDill img, you’ll need the bcm4329 tar from there : http://forum.xda-developers.com/showpost.php?p=43203818&postcount=569
  • You need to have a rooted device with a custom recovery. Check by here or by there
  • This method works on any TF101

Note that all command can be done with ADB shell aswell.

If you choose to install one of DjDill img :

  • Boot to Android as usual
  • Copy all download files to your tab. You can rename the kernel zip to Linux_Loader.zip and Android_Loader.zip to be clearer.
  • Now, I assume you have files in internal storage ( change sdcard0 by sdcard1 if it’s on microSD )
  • We will now ensure terminal has root permissions :
  • Open Terminal emulator
  • Type su then Enter
  • SuperUser will ask terminal emulator root permission, allow it.
  • If you have an error with this command, your device may not be properly rooted.
  • Now we will setup installation location and extract our linux tar.gz ( Be aware it may take a while ) :

If you don’t choose to install one of pre configured img :

  1. Boot to Android as usual
  2. Copy all download files to your tab. You can rename the kernel zip to Linux_Loader.zip and Android_Loader.zip to be clearer.
  3. Now, I assume you have files in internal storage ( change sdcard0 by sdcard1 if it’s on microSD )
  4. We will now ensure terminal has root permissions :
  5. Open Terminal emulator
  6. Type su then Enter
  7. SuperUser will ask terminal emulator root permission, allow it.
  8. If you have an error with this command, your device may not be properly rooted.
  9. Now we will setup installation location and extract our linux tar.gz ( Be aware it may take a while ) :

  • The setup is now complete.

In order to boot your linux installation, flash the linux kernel.
To get back to Android, flash the Android kernel.

Kingzak34

Senior Member

How to change the linux location / How to have multiple linux installations

Here we are, so in order to have multiple linux instllations or change defaut linux installation location, you will need a Linux computer. ( Or a Virtual Machine, that’s what I use, with Virtual Box for exemple.

You will need 3 tools to get it done too.

You can get it there abootimg, blobpack and blobunpack files at the end of first post ( Thanks to @shaola ).
I post the zip in attachement for mirror.

Now you have to get in the Rootbind kernel, the blob file. Blob file in Asus ROM can contain any partition of the device ( System, kernel, recovery etc ). In this kernel blob, there is only the kernel partition. Soooo, here we go for some commands.

  • Open your linux computer
  • Place all four files in same place ( better to have a folder created for this ). I’ll take exemple of

/kerneltf/ It’s a exemple, so adapt in consequencies of course.

  • Now you have your four files in same place, blobunpack, blobpack, and abootimg-i686 so let’s start with commands :
  • Go to the desired place :

    This will create 3 files, bootimg.cfg, zImage and initrd.img

  • The file we want to edit is bootimg.cfg. so open it with a text editor.
  • You’ll see the last line is a cmdline. At the end we have the location of linux system place.
  • For exemple here : root=/dev/mmcblk0p7 bind=/linuxroot that means, the folder takes place in mmcblk0p7 ( /data partition of device ) and is placed in /linuxroot folder. So with Android layout it means /data/linuxroot.
  • You can now change the location of your folder, so you have some choices :
  • 1-Change the folder location or name. ( This can be used to have multiple linux systems )

    So you have this part : root=/dev/mmcblk0p7 bind=/linuxroot
    If you want to change folder place/name change this part : bind=/linuxroot into whatever you want
    For exemple root=/dev/mmcblk0p7 bind=/linuxroot2 or root=/dev/mmcblk0p7 bind=/linuxroot3 ( To have more linux systems )

    Or root=/dev/mmcblk0p7 bind=/Linuxroot/Linux1

    ATTENTION as said in rootbind thread : Make sure, however, not to put the Linux rootfs to the «internal storage» (/data/media) or any subdirectories thereof. This plays havoc with the Android media scanner when re-booting into Android and your tablet may slow down to a crawl.

    2-Change the folder location in order to have it on an other partition like SDCard

    For this choice, a 2nd partition on your SDcard is greatly recommended and should be in ext4. ( Must be the second partition, it is better for general use of SDcard )
    So root=/dev/mmcblk0p7 bind=/linuxroot will become root=/dev/mmcblk1p2 ( can be p3 p4 or more if you have more than 2 partitions in your sdcard to have several systems on your SDcard ) the bind argument must be deleted as it will not be used.

    3-Change the folder location in order to have it on first partition on SDCard

    The problem here if you want your linuxroot folder in you SDcard with your other files, is that sdcard MUST be formatted in ext4 and so will not be recognized directly by Windows ( Using MTP in the TF will work but not Storage Mount ) cause Windows doesnt support ext4 partition. It’s definitively the worse choice IMHO. The precedent process is definitively better choice. More than that it could make MediaScanner in Android going crazy too ( a .nomedia can maybe do the trick but not sure ).

    More again, it hasnt been tested at all so you’re the only responsible, but if you want to do it :

    For exemple, to put folder on SDcard, you should change root=/dev/mmcblk0p7 bind=/linuxroot to root=/dev/mmcblk1p1 bind=/linuxroot
    This means your folder is in sdcard ( The one in the tab ) at root in /linuxroot folder. ( /storage/sdcard1/linuxroot in android )
    THIS HAS NOT BEEN TESTED YET, I CANT TELL YOU IF IT WORKS OR NOT.

    Sooo, now you seted up your new location ( BE SURE TO DONT TOUCH ANYTHING ELSE ON THE CMDLINE, ONLY THIS PART ):

    • We will now repack the kernel to get it flashable.
    • Once again, be sure that you didnt make mistake with the file, and you only edited root=/dev/mmcblk0p7 bind=/linuxroot this part without deleting something or got a typo error.
    • We will now update the new bootimg :

    Источник

    Читайте также:  Как посмотреть свое передвижение андроид
    Оцените статью