Page 1 of 10 123 ... LastLast
Results 1 to 10 of 94
Like Tree6Likes

Thread: Run Ubuntu linux natively (not chrooted version) on the Vega

  1. #1
    Regular
    Join Date
    Jun 2011
    Posts
    110
    Thanks
    31
    Thanked 26 Times in 11 Posts

    Dual boot Ubuntu/VegaICS on the Advent Vega

    EDIT:- I'm having problems loading screenshots. I'll investigate this later. In the meantime you can download the complete document from Dropbox:- http://db.tt/qyU6nJAJ

    UPDATE 1 (15:10 GMT 9/3/12) How to remove the need to use Drive mount - See page 12, post #68

    Introduction

    Cass found an old thread that showed a way of running Ubuntu linux natively (not a chrooted version) on the Vega without affecting your android rom; the Ubuntu system is installed on your SD card. I tried it and it works. Without a suitable bootloader it is not possible to have a multi-boot startup option, so moving from android to linux and back again is a little clunky, but it works. There is an open-source bootloader called "U-Boot" that has been ported to Tegra2 devices so multi-boot may be possible in the future.

    The Ubuntu system monitor
    Ubuntu system monitor.JPG

    The Ubuntu Unity 2D desktop
    Ubuntu Unity desktop.JPG

    The history of this project

    The thread at MoDaCo (Ubuntu Linux 11.04 (natty) on Vega (update 13/4) - Android @ MoDaCo) that started this project was short-lived. It was started on 22 February 2011 and effectively finished on 14 July 2011. The final updated image that we are using was posted on 13 April 2011. There have been no significant posts since July; merely some expressions of interest that have received no replies. Having read all the posts it seemed to me that for the few people who were actively involved in the project, it simply worked well enough for their needs, and they moved on to other things. I visited hybr1d's personal website and saw that he now has an Asus Transformer, and has therefore probably lost all interest in Vegas. There was no mention of this project that I could find in any of his archives. I also found a post by Zebrahead, another active contributor, saying that he also no longer had a Vega.

    Overview of procedure

    What I have done is to reduce the information in the MoDaCo thread down to a few simple steps. First you must create an ext3 partition on your SD card. Then download or locate the four files you will need. Once everything has been installed you need to enter a simple set of commands in the android Terminal Emulator that will flash the linux kernel to the Vega's boot partition, and then reboot. You will eventually find yourself looking at the Ubuntu Unity 2D desktop. To return to VegaICS you must enter a similar set of commands in the linux terminal that will flash the VegaICS boot image to the boot partition. When you reboot you will find yourself back in VegaICS. As I said, without a bootloader that can multi-boot, switching between android and linux is clunky.

    The nightmare scenario

    There is a nightmare scenario that you should be aware of. The first time I tried this I forgot to put the Vega boot image into the ext3 partition. This meant I had no way to flash the Vega's boot partition with the ICS boot.img. No worries, I thought. I'll just connect the Vega to my PC with the USB cable, go into recovery and reinstall Beta1. Wrong! One second after you press the power button the linux boot sequence starts up. I solved that problem by putting my SD card into my linux box and copying the missing file to it.

    However, it raised the possibility that if something goes wrong with the boot sequence and you can't get to a linux prompt to flash the VegaICS boot image, then your Vega is effectively bricked. There may be another way of getting into recovery mode, but if there is I don't know it. As we all know by now, our Vegas can behave differently and just because everything worked for me doesn't mean that it will work for you. You have been warned.

    NOTE: Having said that I've now been round the android->linux->android loop dozens of times with no problem. Just make sure that your battery is charged.

    A possible safer method for the future

    One of the posts in the MoDaCo thread suggested a possible alternative procedure that doesn't have the nightmare scenario, but nobody reported trying this. It involves flashing the linux-kern.img to the recovery partition used by clockworkmod, instead of the Vega's boot partition. There may be problems with this approach that I am unaware of. We shall have to ask Cass about this.

    In principle this means that when you use the recovery.apk, instead of booting into cwm you boot into linux. When you exit linux and reboot you will boot into ICS because the original boot partition was not changed. So even if you have a problem with linux not booting, the Vega will start normally if you power down and restart. I don't use cwm every day so I would be happy to use this method. There is bound to be a way of easily re-installing cwm for those occasions that you need it to flash updates. I've also seen scripts to make and restore nandroid backups from your PC using adb, but I haven't tried them yet.

    Partitioning your SD card

    The Ubuntu image is 1.8GB in size and you will need space for the vega_root.tgz file as well, so the minimum size for the new partition is about 2.5GB, and it must be formatted as ext3. I would recommend 4GB to give yourself some space. The usability of this installation is dependent on the speed of your SD Card. I have a 32GB Class10 card and I made a 6GB partition; this gives me 4GB free disk space when running Ubuntu.

    The pre-built Ubuntu image expects to find it's ext3 partition as the second partition on the card (mmcblk0p2); there can be other partitions after it if you need them. Use whatever is your favourite partition manager to create a new partition; clockworkmod should be able to do this, but I haven't tried it. At this point test the card on your Vega. You will need Drive Mount to do this (https://market.android.com/details?i...ach.drivemount - if you don't already have it). In Drive Mount turn off device filtering and then use the re-scan icon. The partitions on the SD card should appear on the left. Select mmcblk0p2 and tap the mount icon. If it mounts it will show up on the right (see screenshot). I find that sometimes I have to hit mount twice before it shows up. Now check this by going to File Manager and tap the mnt icon. You should see mmcblk0p2 listed.

    It would be nice to have this partition auto-mount at boot, but that would require adding an entry to vold (Volume Daemon for GNU/Linux) in the r/o system, so again we are going to have to ask someone to do it for us.

    Drive Mount showing mmcblk0p2 mounted
    3) mmcblk0p2 mounted in Drive Mount.JPG

    File Manager also showing mmcblk0p2 mounted
    4) mmcblk0p2 listed in File Manager.JPG

    Gather the images and software you will need

    Download the two Ubuntu files you are going to need. They are linux-kern.img and vega_root.tgz, available here:- Index of /vega. Some people seem to have corruption problems downloading large files on the Vega so I would suggest doing it on your PC.

    Download flash_image.zip from here:- [GUIDE] Flash any recovery easily on the phone using flash_image - xda-developers. It's at the bottom of the first post.

    Find the VegaICS-Beta1 boot image. Go to the file VegaICS-Beta1.exe you used to install ICS. In Windows right-click on the exe and extract the files within. You should see an image file for each of the Vega's partitions.

    The files inside VegaICS-Beta1.exe
    [SCREENSHOT]

    Unzip flash_image.zip. There is only one file in it - the binary, flash_image (26KB).

    Place this, the vega_root.tgz file, the linux-kern.img file and the VegaICS boot image into a directory on your SD card first partition.

    Preparing the Ubuntu filesystem

    Copy all four files to the empty ext3 partition you created. The default File Manager can't do this. I use Root Explorer to go to /mnt/mmcblk0p2 and set it to r/w and then files can be copied into it, other file managers may also work. This is also a simple way to copy files to/from your linux once it's working.

    If you don't already have it, download and install Terminal Emulator (https://market.android.com/details?i...roidterm&hl=en). Mount your new partition (see above). Start Terminal Emulator and issue the command "su" to gain root privileges. Then move to the new partition with "cd /mnt/mmcblk0p2". Enter the command "ls" to list the contents to make sure that all four files are there. If they are not all there do not proceed.

    I tried extracting vega_root.tgz on one of my linux boxes, but it failed with errors that seemed to me to indicate that this must be done on the hardware it expects to run on, so we are going to do it in the terminal session that's still running. Enter the command "tar xvf vega_root.tgz". A load of file names will fly past as they are extracted. Go and make a cup of your favourite beverage. If there are no errors you will eventually find yourself back at the prompt. Try "ls" again and you should see the linux filesystem directories appear. If there are any error messages do not proceed; delete all the files and try again.

    The linux filesystem showing in Terminal Emulator
    [SCREENSHOT]

    Booting into Ubuntu

    Now we are ready to start to use Ubuntu (please read the Disclaimer before you start).

    Make sure that mmcblk0p2 is mounted and start the Terminal Emulator (it may still be running) and enter the command "./flash_image boot linux-kern.img && reboot". This flashes the Vega's boot sector with the linux-kern.img and reboots the tablet.

    The command to flash linux-kern.img to boot partition
    [SCREENSHOT]

    What happened to me when I first did this is that the backlight came on and nothing happened! I allowed a few minutes in case it had to a lot of housework on the first boot, but still nothing happened! So I held down the power button until the backlight went off, counted to ten, and held down the power button until the backlight came on again. This time (after a short while) a couple of linux penguins (tux) appeared and then a lot of scrolling text as it went through its boot sequence. Then there was another period of blank screen before the Ubuntu Unity 2D desktop finally showed up (Unity just takes a long time to load). So if you have a problem with booting, just power down and try again. This may be a quirk in the system; it happens to me every time.

    Booting back into VegaICS

    I'd advise you to test this before you do anything else; certainly before making any changes to the installation. The virtual keyboard (Florence Virtual Keyboard) drove me crazy after about 30 seconds, so I tried a USB keyboard. This works fine, and if you are going to use this Ubuntu at all you are going to need one. Mine is a £10 chiclet keyboard that I bought when I got my Vega. To toggle florence on/off tap the keyboard icon on the status bar at the top right.

    Drag the pointer with your finger to the Ubuntu control button at the top left and tap it (only single touch is implemented in this image). When the large icons appear select "More Apps". When more apps appear select "Terminal".

    Now enter "su" and enter the password "root". Then enter the command "flash_image boot boot.img && reboot". This flashes the boot partition with the VegaICS boot.img, and when you reboot you will be back in ICS. It seems to take a long time to boot into ICS, but it does happen eventually. If you find that the tablet doesn't reboot, hold the power button down for 10 secs to fully power down. Wait a few seconds then try powering on again.

    Command to flash boot.img to boot partition
    [SCREENSHOT]

    Using this Ubuntu image

    In this howto I've concentrated on installing Ubuntu and moving between android and linux. This has left me with little time to try out the image itself. Ideally I'd rather use the Gnome desktop, which I'm familiar with, or a lightweight desktop like LXDE. If they are all installed you normally select which you want to use for your session at the login screen. Unfortunately the image was created so that you auto-login and don't see this screen. The way to get back to a login screen is to use the power option icon at the top right. But in this image, although the icon reacts to the pointer, no menu drops down. So for the moment you have to learn to use Unity; there are many online tutorials (e.g. Introduction To The Ubuntu Unity Desktop | HowtoForge - Linux Howtos and Tutorials and How To Bring App Icons Back Into Unity’s System Tray - How-To Geek). From a terminal it is possible to uninstall Unity and install Gnome or LXDE instead, but I haven't had time to try this.
    The default user's name (you) is "ubuntu" and the password is "ubuntu". The root password (for when you use "su" in the terminal) is "root".

    The posters on the MoDaCo thread say that a USB mouse works and so do a wireless keyboard and mouse, but I haven't got any of these to test with. All I can vouch for is that a USB keyboard works, and you can "drag and click" the onscreen pointer. The only other essential to get things started is wifi.

    Wireless connection

    Wireless does not work out of the box! The GUI tools I am used to using in Gnome are either not installed or not working. So I've had to learn how to set up wireless from a command line. My network is WPA secured, so I had to find a method that works for me. For WEP secured and unsecured networks the procedure will be different. My starting point was a post in the MoDaCo thread (page4/post67). I entered these two lines in the terminal (su, password, commands); ESSID is the name of the network (mine is linksys_SES_54124 ) and PASS is your password (mine is bessiebrown):-

    wpa_passphrase ESSID PASS >> mywireless.conf
    wpa_supplicant -i wlan0 -c mywireless.conf

    [SCREENSHOT]

    Once it showed "CTRL-EVENT-CONNECTED", I opened another tab in the terminal in order to get back to a prompt (tap title bar to bring up "File" and other menu options). I logged in as root again, and then issued this command to get an IP from my router:-

    dhclient wlan0

    [SCREENSHOT]

    Now I started Firefox and it connected.

    [SCREENSHOT]

    For other than WPA secured networks, to set up a wireless connection from the command line, start a terminal session as root. First enter the command "iwconfig"; this will confirm that the ar6000 module is loaded.

    [SCREENSHOT]

    Once it's been set up your wireless interface will be wlan0. I'm afraid that now you're largely on your own. Help each other out. Eventually I found this page (How to connect to a wireless network from the Ubuntu command line – t+1), which helped enormously. To test whether or not you have successfully created a connection you will have to try running Firefox (or any other application that needs network access). Note that even when connected no network icon appears in the status bar. You can probably change this behaviour (How To Bring App Icons Back Into Unity’s System Tray - How-To Geek).

    Break the task down into two parts. First test that wlan0 is working by issuing this command; it will show networks within range:-

    iwlist wlan0 scan

    Once you can see networks, any networks, it means that your tablet is talking to your router. The second part of the task is to make a connection. When you have connected for the first time stay connected and install a graphical network manager to make life easier. "wcid" might be a good choice. You can install new programs by using the Ubuntu Software Centre (on the launcher), the Synaptic Package Manager (also installed), or by issuing this command in a terminal as root:- apt-get install [PACKAGE NAME]. For wicd the command would be:-

    apt-get install wicd

    [SCREENSHOT]

    apt is a very useful and powerful command (https://help.ubuntu.com/8.04/serverguide/C/apt-get.html). This page is a good place to see how to install some popular programs using apt:- To Do List After installing Ubuntu 11.04 aka Natty Narwhal « The Indexer. There are some packages that are not in the official repositories, and apt comes in handy in these situations.

    Where do we go from here?

    To progress with this project we are going to need some skilled help. The open-source bootloader U-Boot (WebHome < U-Boot < DENX and http://free-electrons.com/doc/u-boot.pdf and Das U-Boot - Wikipedia, the free encyclopedia) does work on Tegra2 devices, so a multi-boot option is a realistic possibility. To upgrade the Ubuntu image to version 12 (12.10 is available now and 12.04 LTS will be released in April) is going to need someone with some real linux skills; e.g. finding/writing/patching drivers, and creating new images. We also need to implement the missing features in this image (notably sound and bluetooth according to one post; I've not tested these) and add new ones, such as multi-touch. I have no skills whatsoever in any of these areas. Cass and Eduardo have their hands full at the moment, but if we ask them nicely they might know of someone who can help. If nothing more than a working multi-boot bootloader comes out of this project it will have been worthwhile.

    Credits

    The credits go to hybr1d for starting the MoDaCo thread, the others who helped him, especially Zebrahead, and to Cass for pointing it out to me.

    Disclaimer

    This project should be regarded as an experiment. I shall not feel responsible if you brick your Vega (see the Nightmare Scenario, explained above). As we all know by now, our Vegas can behave differently, and just because everything worked for me doesn't mean that it will work for you. You have been warned.

    Congratulations!

    If you have read this far, and have read all of the MoDaCo thread, then you now know as much as I do. This is my first howto, so please excuse any errors or omissions.

    EDIT:- I'm having problems loading screenshots. I'll investigate this later. In the meantime you can download the complete document from Dropbox:- http://db.tt/qyU6nJAJ
    Attached Images Attached Images
    Last edited by xathras; 03-09-2012 at 08:01 AM.

  2. The Following 9 Users Say Thank You to xathras For This Useful Post:

    aitsch (03-09-2012), DeAndi (03-09-2012), docck (12-17-2012), glococo (03-12-2012), morthyr (01-06-2013), orensnake (03-05-2012), Osman Argueta (03-06-2012), slient (03-08-2012), tjelfe (03-07-2012)

  3. #2
    Member
    Join Date
    Feb 2012
    Posts
    72
    Thanks
    11
    Thanked 7 Times in 7 Posts
    I'm game for sure. XBMC on my Viewpad 10s, proper native Firefox and Flash? YES PLEASE.

  4. #3
    Member
    Join Date
    Jul 2011
    Posts
    6
    Thanks
    4
    Thanked 2 Times in 1 Post
    Definitely up for this

  5. #4
    First Post
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Count me in...

  6. #5
    Member
    Join Date
    Jan 2012
    Posts
    11
    Thanks
    7
    Thanked 0 Times in 0 Posts
    very good thread

  7. #6
    Member
    Join Date
    Feb 2012
    Posts
    50
    Thanks
    3
    Thanked 2 Times in 2 Posts
    looking forward to this!!

  8. #7
    Member
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Me too :-)

  9. #8
    Member
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    1
    Thanked 1 Time in 1 Post
    I´m game. Count me in.

  10. #9
    Regular
    Join Date
    May 2011
    Posts
    147
    Thanks
    8
    Thanked 22 Times in 14 Posts
    I'd been starting to look into this myself using the page on modaco and htc-linux.org as a jumping of point. I know your not answering questions atm but is the filesystem your using within a partition or within a .ext file? (Have ubuntu as a .ext2 filesystem running natively from sdcard on my hd2).

  11. #10
    Member
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am very interested in this. Probably this has been also been picked up by Canonical in "Ubuntu for Android" ( Ubuntu for Android | Ubuntu , Ubuntu on Android becomes real, looks to take on Moto's Webtop experience | Android Central ). Canonical seems to respect open source developers behind the "Get in touch" button of first URL.

Page 1 of 10 123 ... LastLast

Similar Threads

  1. Replies: 142
    Last Post: 11-29-2012, 12:15 PM
  2. How to setup and test Fastboot & ADB on Ubuntu Linux with Toshiba Thrive
    By zerofeel in forum Toshiba Thrive General Development
    Replies: 7
    Last Post: 12-22-2011, 01:44 PM
  3. Porting of Ubuntu Linux on Adam
    By TechGeek in forum Adam ROM Development
    Replies: 84
    Last Post: 11-09-2011, 11:22 AM
  4. Nvflash official Dell 3.2 Wifi only version - Debian GNU Linux
    By ugh in forum Streak 7 Frequently Asked Questions
    Replies: 0
    Last Post: 10-25-2011, 09:57 AM
  5. Factory Restore Wifi only version - Debian GNU Linux
    By ugh in forum Streak 7 Frequently Asked Questions
    Replies: 0
    Last Post: 09-01-2011, 08:14 PM

Search tags for this page

advent vega linux

,
advent vega native ubuntu
,

advent vega ubuntu

,
android chroot linux native
,
how to install native ubuntu on android tablets?
,
install linux on a phone no sd card no chroot
,
linux rom for android tablet
,
no chroot linux for android
,
run linux natively on android tablet
,

ubuntu for advent vega

Click on a term to search for related topics.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •