Post Reply

[Q] DUAL BOOT UBUNTU And JELLY BEAN AND GUIDE

28th November 2012, 02:40 AM   |  #41  
ericerk's Avatar
Senior Member
Thanks Meter: 56
 
852 posts
Join Date:Joined: Jun 2010
More
So is there a method to dual boot?
28th November 2012, 10:58 AM   |  #42  
Senior Member
Flag Ostwestfalen
Thanks Meter: 22
 
328 posts
Join Date:Joined: Jun 2008
More
Check out http://forum.xda-developers.com/show....php?t=2011403
It's already working.
28th November 2012, 10:51 PM   |  #43  
Junior Member
Flag Odense
Thanks Meter: 1
 
21 posts
Join Date:Joined: Aug 2012
More
Thumbs up
Finally my version of dual-booting Android and Ubuntu is working too! It seems I was almost there when I had the bootloops when trying to boot Android.

It's been a lot of trial-and-error, but as far as I see these were the important steps which made my Nexus 7 dual-boot Android/Ubuntu. Try them at you own risk:

Start with updating to 4.2 and unlocking. Maybe 4.2 isn't essential, but it should be something for which you have the boot image.
Flash a custom recovery using fastboot, boot it and mount /data
Extract rootfs.tar.gz from the Ubuntu rootfs.img (using simg2img to convert it to ext4 and mounting the ext4 image as a loop filesystem)
Copy rootfs.tar.gz to /data
Reboot to bootloader
Flash the Ubuntu boot.img to recovery using fastboot.
Start recovery. Ubuntu will now install.
(It seems the Ubuntu install touches the boot partition at this point, making it unable to boot Android.)
Reboot to bootloader.
Flash the original boot image (mine was 4.2) to boot using fastboot.

Now enjoy dual boot! Normal boot will start Android, recovery boot will start Ubuntu.

There may be an easier way to do this, but this is more or less what worked for me.
The Following User Says Thank You to AEblefisk For This Useful Post: [ View ]
29th November 2012, 07:19 AM   |  #44  
OP Senior Member
Flag Melbourne
Thanks Meter: 19
 
335 posts
Join Date:Joined: May 2011
Donate to Me
More
awesome! you mind making some kind of easier or video tutorial for those that arent reallysure about what you mean? also, with the both OS on the tab, is there any issues with it sharing the same user partition? thanks.
29th November 2012, 09:36 PM   |  #45  
Junior Member
Flag Odense
Thanks Meter: 1
 
21 posts
Join Date:Joined: Aug 2012
More
I think I know how to make this process more simple. Maybe both the custom recovery and the simg2img conversion can be avoided, if the remaining steps are rearranged a bit. Once I try it (and if it works) I'll try to make a more user-friendly tutorial.

I tried playing around with both OS'es today and everything seems to work like it would in single boot Android or Ubuntu, so they seem to co-exist quite well once installed. But I'd like to know why Android on boot breaks when installing Ubuntu to recovery, so boot has to be re-installed. If the Ubuntu installation is trying to write something to its own boot image I'd like to redirect it to the new location in recovery.
30th November 2012, 07:24 PM   |  #46  
Senior Member
Flag Bath
Thanks Meter: 28
 
124 posts
Join Date:Joined: Oct 2007
More
The Ubuntu installer carries out the following commands in this order:

fastboot erase boot
fastboot flash boot ./boot.img
fastboot erase userdata
fastboot flash userdata ./rootfs.img
fastboot reboot

I guess that changing the first one to replace boot with recovery might fix the issue.

What's the deal with userdata then? From Android does one see the Ubuntu filesystem? /me goes to read exactly what the partitions are used for.


Ah, what I've said above isn't so important, it's what the on-device setup does that's important. /me goes back to sleep
Last edited by lardman; 30th November 2012 at 07:30 PM.
1st December 2012, 01:22 AM   |  #47  
Junior Member
Flag Odense
Thanks Meter: 1
 
21 posts
Join Date:Joined: Aug 2012
More
Quote:
Originally Posted by lardman

Ah, what I've said above isn't so important, it's what the on-device setup does that's important. /me goes back to sleep

Right. I did a fresh install of Ubuntu now. It's boring to watch the screen as Ubuntu is installed - no fancy animated presentation of the blessings of this new OS, like we usually get at a time like this. But after maybe 10 minutes, right at the end of the install, I noticed it wrote something about flashing initrd to mmcblk0p2. When I was back in Android I checked /dev/block/platform/.../by-name/ and saw mmcblk0p2 is marked LNX, so at the end of the install Ubuntu flashes a new boot image! It doesn't seem to work, since I get bootloops when trying to boot normally afterwards, but still I'd like to find where in the Ubuntu install process this is done.

The installation boot image (which I flash to recovery instead) starts up Ubuntu just fine, so there's no need for flashing a new boot at that time, but maybe the new boot is better or I may break Android if updating the Ubuntu kernel?

---------- Post added at 02:22 AM ---------- Previous post was at 01:48 AM ----------

Here's a less complicated procedure for getting dual boot Android/Ubuntu. This will erase your data, void your warranty etc. It might even blow up your device and curdle the milk in your fridge. It worked OK for me, but now you've been warned!

Start with updating to 4.2.1 and unlocking. 4.2.1 isn't essential, but it should be something for which you have the boot image.

Download the Ubuntu boot and root files using the Ubuntu installer, but don't let it install.

Flash Ubuntu
Code:
fastboot erase recovery
fastboot erase userdata
fastboot flash recovery ~/Downloads/UbuntuNexus7/boot.img
fastboot flash userdata ~/Downloads/UbuntuNexus7/rootfs.img
Start recovery. Ubuntu will now install.
(The Ubuntu install flashes the boot partition at this point, making it unable to boot Android.)

Reboot to bootloader.

Flash the original boot image (mine was 4.2.1) to boot using fastboot.
Code:
fastboot flash boot nakasi-jop40d/boot.img
As before, normal boot will start Android, recovery boot will start Ubuntu.

If the Ubuntu install should want to update its initrd at some later time, it will probably flash to boot instead of to recovery. That has to be looked into.
Edit: I found the culprit. In /usr/share/flash-kernel/functions the last partition with a working boot image is picked for flashing the new boot image. Since recovery is in mmcblk0p1 and boot is in mmcblk0p2 the latter is chosen.
And since the abootimg call only updates the boot image instead of creating a new one, a mix of Android and Ubuntu is created which explains why I got bootloops.
Now I just have to figure out how to modify the script so it picks the right partition. Maybe abootimg can determine if the existing image is Android or Ubuntu? But I'll save that fun for another night


Edit again: This procedure no longer works. I tried installing a new 13.04 Ubuntu but now the installation boot.img won't serve as an ordinary boot. It stops if the initial tarball has already been unpacked. So the script above must be modified and run so mmcblk0p1 is updated with an ordinary boot image.
Last edited by AEblefisk; 24th December 2012 at 09:44 PM. Reason: New info
15th December 2012, 04:35 AM   |  #48  
Member
Thanks Meter: 5
 
59 posts
Join Date:Joined: Sep 2012
More
Question
Quote:
Originally Posted by Raudi1

Check out http://forum.xda-developers.com/show....php?t=2011403
It's already working.


Just discovered this, finished the entire process and am now just waiting for ubuntu to boot.

... But man its been several minute on the "Preparing the root filesystem, please, this will take a few minutes ...." will it always take this long or am i actually stuck on some boot loop thing?...
15th December 2012, 12:23 PM   |  #49  
Senior Member
Flag Ostwestfalen
Thanks Meter: 22
 
328 posts
Join Date:Joined: Jun 2008
More
Quote:
Originally Posted by Nikguy

Just discovered this, finished the entire process and am now just waiting for ubuntu to boot.

... But man its been several minute on the "Preparing the root filesystem, please, this will take a few minutes ...." will it always take this long or am i actually stuck on some boot loop thing?...

First Boot takes a while.
15th December 2012, 08:13 PM   |  #50  
Member
Thanks Meter: 5
 
59 posts
Join Date:Joined: Sep 2012
More
Quote:
Originally Posted by Raudi1

First Boot takes a while.

Yeah I figured that out thanks.
Does anyone else have trouble setting up a Bluetooth keyboard?
The Ubuntu build still seems pretty sketch, but awesome none the less.

Post Reply Subscribe to Thread

Tags
dual, nexus, ubuntu
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 7 Q&A, Help & Troubleshooting by ThreadRank