Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,424 Members 35,995 Now Online
XDA Developers Android and Mobile Development Forum

Guide for building your own custom Raring Ubuntu-Core IMG.

Tip us?
 
TomTcom
Old
(Last edited by TomTcom; 10th April 2013 at 01:23 AM.)
#1  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Tutorial Guide for building your own custom Raring Ubuntu-Core IMG.

Guide to making a Raring Ubuntu-core image on a Linux PC/laptop (NOT a virtual machine (VM)) for the purpose of installing it on your TF101.

All credit goes to the time and consideration x3maniac took to assist me with doing this!

OP for Tubutnu by x3maniac

This guide allows you to create a CORE Ubuntu image on your Linux box and then install it using the Tubuntu application for Windows. ***Please note, a CORE image does not contain a GUI. The gnome-core guide in the next link will walk you through the steps of installing the gnome-core GUI after you have made your fresh Raring Ubuntu-Core image.***

http://forum.xda-developers.com/show...php?p=37803357

***Why do I want to do this when the OP by x3maniac already has a Raring image for download? This guide is helping you make your own UPDATED image. There are daily builds of Raring and the image in the OP by x3maniac is over 2 months old as of this last update to this post.***

Please note that I am using a stock Ubuntu 12.10 laptop. I believe any variant of Ubuntu on a laptop or PC should work with this guide just fine.

Download the files first and then open Terminal to input our commands.
Download: http://cdimage.ubuntu.com/ubuntu-cor...e-armhf.tar.gz
(You may optionally choose any date time from the Ubuntu-core folders. Ensure you are using the armhf tar.gz file.

Download (Recommended): https://www.dropbox.com/s/dqn9aa94oe...modules.tar.gz
Alternate Download: http://goo.im/dev/x3maniac/mod_firm_ext.zip
Alternate Download: http://www.novaspirit.com/downloads/mod_firm_ext.zip

After the downloads are complete, open Terminal and let’s get the image built!

A side note, I did not know that using ~ represented the user folder so if you do great, if not it will help you understand that /home/thomas can be represented using ~. So any subfolders of /home/thomas are included using the ~. I will specify my full paths and you can substitute the directories you wish to use. (Linux is still new to me too, I know enough to be dangerous!)

1. mkdir /home/thomas/images/ubuntu-raring

2. cd /home/thomas/images/ubuntu-raring

3. sudo apt-get install qemu

4. sudo apt-get install qemu-user-static

5. Now type this command: qemu-img create raring.img 200M

a.The Ubuntu Raring core image is approximately 186MB. So you understand at 186MB you only have 14MB available of extra stuff you can put into the image. You can resize up later but never down. You may specify any MB size you wish to use for the image. Experiment later, for now just make it 200M.

6. fdisk raring.img (you will see an error about invalid flag, this is ok, step 7 below is w for write, do proceed to step 7)

7. Type w to quit

8. Determine the file system you want (I used ext4)

a. Now type: mkfs.ext4 raring.img (according to config file of Tubuntu app, the partition is set up as ext3, you can use that as well)

b. A warning that your image is not a block special device (when choosing ext4) hit Y to proceed.

c. From /Ubuntu-raring directory type: mkdir mount

9. Now type: sudo mount –o loop ./raring.img ./mount

10. Now type: cd mount

10a. Now type: ls (you are only listing the mount directory to verify you have the lost+found directory) Go up one directory to /home/thomas/images/ubuntu-raring

11. Now type: cp /home/thomas/Downloads/raring-core-armhf.tar.gz /home/thomas/images/ubuntu-raring

12. Now type: sudo tar xvvf raring-core-armhf.tar.gz –C ./mount (you should not be in the mount directory)

13. Now type: sudo tar xvvf modules.tar.gz -C ./mount (you should not be in the mount directory)

14. sudo cp /usr/bin/qemu-arm-static /home/thomas/images/ubuntu-raring/mount/usr/bin (enter)

15. Now type: sudo chroot mount (if successful you will see /#)

16. Now type: passwd and make a password and confirm it.

17. Now type: exit

18. Now type: sudo umount ./mount

19. You should now be in the /home/thomas/images/ubuntu-raring/ directory. From here use the ls command and see your raring.img file.

20. You will need to copy this file your Windows box and use the Tubuntu installation application OR wheelie and nvflash commands. (Wheelie and nvflash commands are for more advanced users).

21. Click on this link for the next guide: http://forum.xda-developers.com/show...php?p=37803357
The Following 3 Users Say Thank You to TomTcom For This Useful Post: [ Click to Expand ]
 
onmail
Old
#2  
Member
Thanks Meter 23
Posts: 35
Join Date: Sep 2006
Hi, I have no problems creating the image and mounting it. But when chrooted:

apt-get update
0% [Working]qemu: Unsupported syscall: 374
Err http://ports.ubuntu.com raring Release.gpg
Something wicked happened resolving 'ports.ubuntu.com:80' (-11 - System error)...

I am on Ubuntu 12.10 64-bit. What could it be? qemu & qemu-user-static installed, qemu-arm-static copied...

Thank you and sorry for my CZ-english
 
TomTcom
Old
#3  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Quote:
Originally Posted by onmail View Post
Hi, I have no problems creating the image and mounting it. But when chrooted:

apt-get update
0% [Working]qemu: Unsupported syscall: 374
Err http://ports.ubuntu.com raring Release.gpg
Something wicked happened resolving 'ports.ubuntu.com:80' (-11 - System error)...

I am on Ubuntu 12.10 64-bit. What could it be? qemu & qemu-user-static installed, qemu-arm-static copied...

Thank you and sorry for my CZ-english
I need to update my guide. After the image is created on your Linux box you then install it on your tablet using tubuntu application. From the tab is where you run apt get commands. Sorry about that.

Sent from my SGH-T999 using Tapatalk 2
 
onmail
Old
(Last edited by onmail; 9th April 2013 at 07:36 PM.) Reason: typo
#4  
Member
Thanks Meter 23
Posts: 35
Join Date: Sep 2006
Quote:
Originally Posted by TomTcom View Post
I need to update my guide. After the image is created on your Linux box you then install it on your tablet using tubuntu application. From the tab is where you run apt get commands. Sorry about that.

Sent from my SGH-T999 using Tapatalk 2
Oh, I see, but I think I will not be able to install apt-utils wpasupplicant if the wlan0 adapter is not working (I mean when wpasupplicant is not installed in the image).
 
TomTcom
Old
#5  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Quote:
Originally Posted by onmail View Post
Oh, I see, but I think I will not be able to install apt-utils wpasupplicant if the wlan0 adapter is not working (I mean when wpasupplicant is not installed in the image).
Yes you will because the core image has everything you need except the supplicant. You can make your own supplicant or copy from your working dual booted prime image of android. Let me try and update the guide later tonight.

Sent from my SGH-T999 using Tapatalk 2
 
TomTcom
Old
#6  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Quote:
Originally Posted by onmail View Post
Oh, I see, but I think I will not be able to install apt-utils wpasupplicant if the wlan0 adapter is not working (I mean when wpasupplicant is not installed in the image).
Ok, made several changes to my guide. Here's a couple things to note in case you missed them.

1. This guide helps you make an image of Raring Ubuntu-Core. This means there is no GUI and an additional post I have linked to for installing Gnome-Core (your actual desktop environment) for Raring.

2. After the Raring.img is made, you need to start on the Raring Gnome-Core guide and follow those instructions. That installation takes about 2 hours to download and answer questions because it is such a core install.

3. About the wifi, you will be using x3maniac's Tubuntu Windows installation application and starting from fresh with Prime Android and your new Raring image and if you follow the second guide it will walk you through setting up your wifi (do make sure you boot into Prime Android and set up your wifi first before booting to Raring.

4. Please familiarize yourself with the OP I have linked to for the x3maniac Tubuntu application.

It's not as hard as it may seem. After you do it a few times it's rather quick. Installing gnome-core by yourself is kind of slow and a bit tedious but the purpose of doing this was to have complete control of your image.

Later on if you are brave you can also build your own kernel as well and make changes. See my guide in my xda signature.

Hope this helps, thanks for using my guide. Hit the thanks button a couple of times and I'll make sure you get up and running.
The Following User Says Thank You to TomTcom For This Useful Post: [ Click to Expand ]
 
onmail
Old
#7  
Member
Thanks Meter 23
Posts: 35
Join Date: Sep 2006
Quote:
Originally Posted by TomTcom View Post
Ok, made several changes to my guide. Here's a couple things to note in case you missed them.

1. This guide helps you make an image of Raring Ubuntu-Core. This means there is no GUI and an additional post I have linked to for installing Gnome-Core (your actual desktop environment) for Raring.

2. After the Raring.img is made, you need to start on the Raring Gnome-Core guide and follow those instructions. That installation takes about 2 hours to download and answer questions because it is such a core install.

3. About the wifi, you will be using x3maniac's Tubuntu Windows installation application and starting from fresh with Prime Android and your new Raring image and if you follow the second guide it will walk you through setting up your wifi (do make sure you boot into Prime Android and set up your wifi first before booting to Raring.

4. Please familiarize yourself with the OP I have linked to for the x3maniac Tubuntu application.

It's not as hard as it may seem. After you do it a few times it's rather quick. Installing gnome-core by yourself is kind of slow and a bit tedious but the purpose of doing this was to have complete control of your image.

Later on if you are brave you can also build your own kernel as well and make changes. See my guide in my xda signature.

Hope this helps, thanks for using my guide. Hit the thanks button a couple of times and I'll make sure you get up and running.
OK, thanks a lot, I will try. I have been playing with Tubuntu for some weeks and now I just started playing with building the image (and thinking about kernel...). Just now I am on Lubuntu (with xfce4 which I prefer) with 2.6 kernel and I am trying on my son's TF101 Raring with Gnome and 3.1 kernel. I am just thinking about the possibility when one system is "fine tuned" if it would be possible to copy it from one TF to the other one (I mean just the Linux partition).
 
onmail
Old
#8  
Member
Thanks Meter 23
Posts: 35
Join Date: Sep 2006
Quote:
Originally Posted by onmail View Post
Hi, I have no problems creating the image and mounting it. But when chrooted:

apt-get update
0% [Working]qemu: Unsupported syscall: 374
Err http://ports.ubuntu.com raring Release.gpg
Something wicked happened resolving 'ports.ubuntu.com:80' (-11 - System error)...

I am on Ubuntu 12.10 64-bit. What could it be? qemu & qemu-user-static installed, qemu-arm-static copied...

Thank you and sorry for my CZ-english
Replying to my own post because I must say - sorry, I am ehm an idiot... Because the only problem was - I have not edited the /etc/resolv.conf in the mount/etc directory. So now I can easily apt-get anything in the chroot! So it seems I can easily "prepare" an image with everything inside
The Following User Says Thank You to onmail For This Useful Post: [ Click to Expand ]
 
TomTcom
Old
#9  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Quote:
Originally Posted by onmail View Post
Replying to my own post because I must say - sorry, I am ehm an idiot... Because the only problem was - I have not edited the /etc/resolv.conf in the mount/etc directory. So now I can easily apt-get anything in the chroot! So it seems I can easily "prepare" an image with everything inside
Did it work? I couldn't not without finding a way to inject VI into the image for editing the file. You can mess with permissions but it ultimately doesn't work from the Linux box.

If you are able to do it without the tab, post the instructions and I'll add it to my OP and give you the credit.

Sent from my SGH-T999 using Tapatalk 2
 
onmail
Old
#10  
Member
Thanks Meter 23
Posts: 35
Join Date: Sep 2006
Quote:
Originally Posted by TomTcom View Post
Did it work? I couldn't not without finding a way to inject VI into the image for editing the file. You can mess with permissions but it ultimately doesn't work from the Linux box.

If you are able to do it without the tab, post the instructions and I'll add it to my OP and give you the credit.

Sent from my SGH-T999 using Tapatalk 2
It works I am just in the middle of installing xubuntu-desktop... I have made a quick & dirty bash script which will help to set hostname for the new TF101, root password, make a new user with password and add him to sudo group, automatically enable all the deb repos (universe etc.), set cpu freqs in rc.local and install some usefull utils (sudo cpufrequtils bash-completion wpasupplicant nano mc net-tools). And there is a second script you can run on the first run on TF101 which will resize the linux partition to its limit, copy the wpa_supplicant.conf from the android partition and starts wlan0 I will send this to you asap but will test this first. Hope my English is understandable

The Following User Says Thank You to onmail For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes