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

Search This thread

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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://xdaforums.com/showthread.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-core/daily/current/raring-core-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/dqn9aa94oeju9kf/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://xdaforums.com/showthread.php?p=37803357
 
Last edited:

onmail

Member
Sep 20, 2006
46
27
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

Senior Member
Mar 27, 2011
1,192
535
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

Member
Sep 20, 2006
46
27
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).
 
Last edited:

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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

Senior Member
Mar 27, 2011
1,192
535
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.
 
  • Like
Reactions: mcpterra

onmail

Member
Sep 20, 2006
46
27
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

Member
Sep 20, 2006
46
27
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 :)
 
  • Like
Reactions: TomTcom

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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

Member
Sep 20, 2006
46
27
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 :)
 
  • Like
Reactions: TomTcom

onmail

Member
Sep 20, 2006
46
27
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 :)

Xubuntu on raring is working without any problems. Now I would like to get the nvidia accelerated drivers working. I have tried 2 or 3 3.1 kernels but still without success. Googling for some help on compiling 3.1 kernel.
 
  • Like
Reactions: TomTcom

TomTcom

Senior Member
Mar 27, 2011
1,192
535
Xubuntu on raring is working without any problems. Now I would like to get the nvidia accelerated drivers working. I have tried 2 or 3 3.1 kernels but still without success. Googling for some help on compiling 3.1 kernel.

Awesome! If you go to the op for x3maniac, you can view his github that has 3.1 kernel source. Take a look and see of it helps.

Sent from my SGH-T999 using Tapatalk 2
 

TomTcom

Senior Member
Mar 27, 2011
1,192
535
Awesome! If you go to the op for x3maniac, you can view his github that has 3.1 kernel source. Take a look and see of it helps.

Sent from my SGH-T999 using Tapatalk 2

By the way, I have instructions for compiling the 2.6.36 kernel in my xda signature if that helps you.

Sent from my SGH-T999 using Tapatalk 2
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
Had an issue mounting raring.img in step 9, had to run sudo fsck.ext4 "path to file" afterwards it mounted smoothly, dont know why tho.
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
Hmmm...did step 8a work ok?

Sent from my SGH-T999 using Tapatalk 2

Afaik it did, gave me the mentioned prompt, and finished without error. Might have something to do with me running a x64 vm ? as i wasnt able to chroot either. Im trying to get this running on my tf300t, but its alot different to installing it on the trusty tf101

Cheers for the guide tho, help me understand the whole process :good:
 
  • Like
Reactions: TomTcom

TomTcom

Senior Member
Mar 27, 2011
1,192
535
Afaik it did, gave me the mentioned prompt, and finished without error. Might have something to do with me running a x64 vm ? as i wasnt able to chroot either. Im trying to get this running on my tf300t, but its alot different to installing it on the trusty tf101

Cheers for the guide tho, help me understand the whole process :good:

I believe our dev x3 mentioned there were differences on a VM so it probably has to do with that.

Glad the guide is helpful. Welcome!

Sent from my SGH-T999 using Tapatalk 2
 
  • Like
Reactions: JoinTheRealms

Kingzak34

Senior Member
Jan 5, 2011
3,097
1,543
South
Google Nexus 4
OnePlus One
Nice guide ! I just crated a 13.04 raring img. ( Used VM Kubuntu 12.04 )

Need some updates but nice :)

And there is a problem with actual release, wpa supplicant is not pre installed and now I'm in the begining of your second guide and cant set up wifi.
I had to download package with chroot, then install with my tab same for nano ;)

Anyway, it's just FYI I dont really need help ;)
 
Last edited:
  • Like
Reactions: TomTcom

TomTcom

Senior Member
Mar 27, 2011
1,192
535
Nice guide ! I just crated a 13.04 raring img. ( Used VM Kubuntu 12.04 )

Need some updates but nice :)

And there is a problem with actual release, wpa supplicant is not pre installed and now I'm in the begining of your second guide and cant set up wifi.
I had to download package with chroot, then install with my tab, and now it doesnt find iwlan0

Anyway, it's just FYI I dont really need help ;)

This guide wasn't designed to use wifi, only to correctly package it for flashing 13.04 directly to the tab. The next guide adds the gui and requires your Android to be set up to copy over the wpa_supplicant file before executing those commands.

Onmail was able to script more changes to the image from "chroot" but I didn't go that far, he was able to get the supplicant and other abilities such as adding to the package better than I did.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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://xdaforums.com/showthread.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-core/daily/current/raring-core-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/dqn9aa94oeju9kf/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://xdaforums.com/showthread.php?p=37803357
    1
    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.
    1
    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 :)
    1
    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 :)
    1
    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 :)

    Xubuntu on raring is working without any problems. Now I would like to get the nvidia accelerated drivers working. I have tried 2 or 3 3.1 kernels but still without success. Googling for some help on compiling 3.1 kernel.