Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,893 Members 42,591 Now Online
XDA Developers Android and Mobile Development Forum

[Q] DUAL BOOT UBUNTU And JELLY BEAN AND GUIDE

Tip us?
 
ericerk
Old
#41  
ericerk's Avatar
Senior Member
Thanks Meter 56
Posts: 847
Join Date: Jun 2010
So is there a method to dual boot?
Click Here!!!
 
Raudi1
Old
#42  
Senior Member
Thanks Meter 22
Posts: 328
Join Date: Jun 2008
Location: Ostwestfalen
Check out http://forum.xda-developers.com/show....php?t=2011403
It's already working.
HTC Prophet(sold)-->HTC TochHD(not in use anymore)-->HTC HD2 running CyanogenMod(lent to cousin)--> Samsung Galaxy S II running CyanogenMod + Nexus 7
 
AEblefisk
Old
#43  
Junior Member
Thanks Meter 1
Posts: 21
Join Date: Aug 2012
Location: Odense
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.
Phone: HTC Desire running CM10 VJ Jelly Bean 4.1.2 v3.0
(Retired: Nokia E51, SE W880i, SE K600i, SE Z1010, Siemens S55, Ericsson T65, Ericsson SH888 and a Motorola Microtac)
Minicomputer: Nexus 7 dual boot stock JB/Ubuntu, Asus Transformer Tab TF300T running stock JB (Hijacked by wife )
(Retired: Nokia n810, Palm Tungsten TE, Philips Velo)
The Following User Says Thank You to AEblefisk For This Useful Post: [ Click to Expand ]
 
technolust109
Old
#44  
Senior Member - OP
Thanks Meter 18
Posts: 335
Join Date: May 2011
Location: Melbourne

 
DONATE TO ME
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.


Devices
HTC One M8 (Floptus) > HTC One M7 >Samsung Galaxy S4 i9505 Vodafone Australia>
Samsung Galaxy S3 i9300> HTC ONE X> Samsung Galaxy Nexus> iPhone 4 16GB Black GSM> Motorola Xoom 32gb Verizon Wifi> Samsung Galaxy Nexus GSM> Sony Ericsson Xperia Play GSM> Sony Ericsson Xperia x10 Mini Pro GSM> HTC Wildfire GSM> HTC Desire HD> HTC HD2 T-Mobile> Motorola Razr GSM> HTC Sensation> iPad 2 16GB 3G
 
AEblefisk
Old
#45  
Junior Member
Thanks Meter 1
Posts: 21
Join Date: Aug 2012
Location: Odense
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.
Phone: HTC Desire running CM10 VJ Jelly Bean 4.1.2 v3.0
(Retired: Nokia E51, SE W880i, SE K600i, SE Z1010, Siemens S55, Ericsson T65, Ericsson SH888 and a Motorola Microtac)
Minicomputer: Nexus 7 dual boot stock JB/Ubuntu, Asus Transformer Tab TF300T running stock JB (Hijacked by wife )
(Retired: Nokia n810, Palm Tungsten TE, Philips Velo)
 
lardman
Old
(Last edited by lardman; 30th November 2012 at 07:30 PM.)
#46  
Senior Member
Thanks Meter 28
Posts: 124
Join Date: Oct 2007
Location: Bath
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
 
AEblefisk
Old
(Last edited by AEblefisk; 24th December 2012 at 09:44 PM.) Reason: New info
#47  
Junior Member
Thanks Meter 1
Posts: 21
Join Date: Aug 2012
Location: Odense
Quote:
Originally Posted by lardman View Post
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.
Phone: HTC Desire running CM10 VJ Jelly Bean 4.1.2 v3.0
(Retired: Nokia E51, SE W880i, SE K600i, SE Z1010, Siemens S55, Ericsson T65, Ericsson SH888 and a Motorola Microtac)
Minicomputer: Nexus 7 dual boot stock JB/Ubuntu, Asus Transformer Tab TF300T running stock JB (Hijacked by wife )
(Retired: Nokia n810, Palm Tungsten TE, Philips Velo)
 
Nikguy
Old
#48  
Member
Thanks Meter 5
Posts: 59
Join Date: Sep 2012
Quote:
Originally Posted by Raudi1 View Post

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?...
 
Raudi1
Old
#49  
Senior Member
Thanks Meter 22
Posts: 328
Join Date: Jun 2008
Location: Ostwestfalen
Quote:
Originally Posted by Nikguy View Post
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.
HTC Prophet(sold)-->HTC TochHD(not in use anymore)-->HTC HD2 running CyanogenMod(lent to cousin)--> Samsung Galaxy S II running CyanogenMod + Nexus 7
 
Nikguy
Old
#50  
Member
Thanks Meter 5
Posts: 59
Join Date: Sep 2012
Quote:
Originally Posted by Raudi1 View Post
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.

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

Advanced Search
Display Modes