[WIP] [DEV] [HOWTO] Ubuntu on Nook Color! UPDATE 1/5/11

Search This thread
S

sammojohn

Guest
I can't believe how well it works. This is now what is called a true tablet pc.

Sent from my Nook Color
 

devastatorx

Senior Member
Feb 6, 2009
193
128
Indianapolis
SUCCESS!!!

Only reason I tried this was because all I had on hand was a 2GB microSD. I also wondered if performance would be better but i have no way of comparing atm.

I too just tried this and can confirm that this does work. As for performance I will post shortly, currently trying to build a new image to boot from the SD card
 

Divine_Madcat

Retired Forum Moderator
Sep 9, 2005
2,936
2,608
USA
Have you tried running bootubuntu after you get these errors? Some of the errors you will get because it is trying to remove something that isnt there. can you do this from adb and send me the output in a pm?

I get the exact same error the other person posted - nothing special to PM.


# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: chdir(/lib/modules): No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
mkdir failed for /data/local/mnt, File exists
rm failed for -/system/bin/mountonly, No such file or directory
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Value too large for defined data type
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted

Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!

Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net

To enter the Debian Linux console just type 'bootubuntu'



In the adb shell, when i tell ubuntu to exit, i get a failed message, and ubuntu also never exits....

root@localhost:/# exit
exit
exit

Shutting down Ubuntu
failed.
#

I will say that i can VNC into ubuntu, but it is very laggy... not nearly as nice as people are making it out to be on here...
 
Last edited:

urbanengine1

Senior Member
Dec 12, 2010
417
7
Hobart, Tasmania
I get the exact same error the other person posted - nothing special to PM.


# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: chdir(/lib/modules): No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
mkdir failed for /data/local/mnt, File exists
rm failed for -/system/bin/mountonly, No such file or directory
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Value too large for defined data type
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted

Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!

Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net

To enter the Debian Linux console just type 'bootubuntu'



In the adb shell, when i tell ubuntu to exit, i get a failed message, and ubuntu also never exits....

root@localhost:/# exit
exit
exit

Shutting down Ubuntu
failed.
#

I will say that i can VNC into ubuntu, but it is very laggy... not nearly as nice as people are making it out to be on here...

if you want less lag, try lowering the resolution inside ubuntu, it speeds it up alot...
also i dont know much about such things but i think a lot of the lag is due to the VNC connection, BUT mainly because the nook is running two operating systems at a time...
think about using VMware on a computer with the same specs as a nook and youll see what i mean.

Also the ubuntu shutdown fails for everyone (as far as i know) and youll have to reboot your nook to completely shut it down.
 

Divine_Madcat

Retired Forum Moderator
Sep 9, 2005
2,936
2,608
USA
Thanks for the reply! My appologies for not realizing some of my errors. I guess my last question - how do i go about changing the res in the OS?
 

devastatorx

Senior Member
Feb 6, 2009
193
128
Indianapolis
The shutdown error doesn't seem to be an issue when using /media instead of /sdcard (can anyone confirm this for me?). Also I still haven't had a chance to really play around in it while it runs from the device memory..so I still don't have anything to report there yet as far as a performance increase. As of right now the method posted is just to hold everyone over until we can get it booting from the sdcard. Kind of a proof of concept for the moment. Hopefully we have something to show over the next few days. I know that myself and munday are putting a lot of time into this.

-devastator
 

greenmky

Senior Member
Aug 4, 2010
129
7
Midland, MI
Full fledged Ubuntu with usb host...I can imagine the perfect little old console emulation device on the go here. Linux emulators are nice and stable.

No futzing around with pay apps for it on Android either.

Awesome work guys. Watching to see how things work out. I hope at some point we have a grub-style launcher for this thing to switch back and forth easily, that would be awesome ;)
 

Divine_Madcat

Retired Forum Moderator
Sep 9, 2005
2,936
2,608
USA
All the effort is appreciated! I would love to turn this tablet into a full linux machine.. that would be awesome. :)
 

here.david

Senior Member
Jan 6, 2009
423
29
Sonoma, CA
DISCLAIMER: You know the risks, bricking, breaking etc. I'm not, nor is anyone else responsible if something goes wrong with your device, especially should it turn into a cave troll and bludgeon someone to death.

Does anyone have a different link other than MEGAUPLOAD , three times now it is a bad download and takes 30 - 40 mins each time...(I have 5MB DSL download speed so it is not mine DSl service)...9am (Pacific time zone) 1/7/2011...
 
Last edited:

aznblood

New member
Jan 8, 2009
1
1
Good to hear!

I'm currently working on making this a port to the SD card so that with the sd card in it boots into android from power off, and with the sd card out it boots to android then you replace the sd and use it for storage like normal. It will also run a lot snappier....well that's the idea anyway.


Do you work/stay on an IRC channel? I am actually working on a similar OS that uses the android kernel, gnuLibc and Xorg server (with native video driver if possible). The idea is to use the nookcolor as a thinclient and get most applications run through ssh forwarding (tunneling). This idea opens up many personal computing possibilities in using the Nookcolor.
 
  • Like
Reactions: Link3737

devastatorx

Senior Member
Feb 6, 2009
193
128
Indianapolis
Do you work/stay on an IRC channel? I am actually working on a similar OS that uses the android kernel, gnuLibc and Xorg server (with native video driver if possible). The idea is to use the nookcolor as a thinclient and get most applications run through ssh forwarding (tunneling). This idea opens up many personal computing possibilities in using the Nookcolor.

I'll be on and off the #nookcolor channel, nick is devastatorx
 

Latrocinium

New member
Dec 16, 2010
2
0
I am actually working on a similar OS that uses the android kernel, gnuLibc and Xorg server (with native video driver if possible). The idea is to use the nookcolor as a thinclient and get most applications run through ssh forwarding (tunneling). This idea opens up many personal computing possibilities in using the Nookcolor.

This is the real ticket!
I used to work in a dev house that did this.(Not with nooks, outdated PCs) With less than 4 ppl on the server everything screamed. No need to worry about special apps, all hosted on server.
Then you have a full desktop without taxing the nook.
If you have any info on using the xorg passthrough, as opposed to vnc. Please Post!
 

mrintegrity

Senior Member
Dec 3, 2010
58
0
Could someone please make a torrent of the ubuntu.7z as it's going to take hours to download from megadl for me.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    DISCLAIMER: You know the risks, bricking, breaking etc. I'm not, nor is anyone else responsible if something goes wrong with your device, especially should it turn into a cave troll and bludgeon someone to death.

    You will have to be rooted for this to work.

    Update 1/5/11
    Changed the install and loader scripts re-compressed and uploaded, new download link. Stream lined the installation process (removed 5 steps)

    Update 1/4/11

    reflect changes to ubuntu.sh and bootubuntu scripts and streamlining the process. Added screenshots
    _________________________

    I was over at nexusonehacks.net and looking at the ubuntu on nexus one hack and was thinking that this could be ported to the nook color. The idea is to run ubuntu from an img on the sd card.

    The following is a modified version of the "how to" orginally posted here

    http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/

    Credits
    The guys at NexusOneHacks
    xda user munday who has modified the scripts to work for the nook color
    Devs at XDA Developer for the Ubuntu ARM image for HTC HD2
    Saurik (Jay Freeman) for the Debian G1 script, which was hacked for Ubuntu on Nexus One! and then re-hacked for the Nook Color by munday

    Here we go:

    1) Go download the ubuntu file here: http://www.megaupload.com/?d=67BU4Y3T

    2) Extract the contents using 7zip http://www.7-zip.org/download.html

    3) Copy the extracted folder "ubuntu" to the root of your SD card
    4) Unmount the nook from your pc, go into the app NookColor Tools (if you don't have it download it here courtesy of Ben 74 and click All Settings->Development then uncheck Auto Mount. This will prevent the SD card from being mounted automatically when plugged into the PC

    5) Plug the Nook back into your pc and open a command line then navigate to your android sdk folder ie C:\android-sdk or wherever you have it and type
    Code:
    adb devices
    Hit enter and make sure that the nook color comes up (should be the SN of your Nook)

    Note: This can also be done from terminal emulator instead of adb...but it is kind of a pain

    6) Now we want to go into the command line on the nook so type
    Code:
    adb shell
    Hit enter and this should bring up a "#" sign.

    7) Type
    Code:
    su
    hit enter (I do this just as a force of habit)

    8) Now we navigate to the ubuntu folder we just copied to our sd card by entering
    Code:
    cd /sdcard/ubuntu
    hit enter. To confirm you are where you want to be you can type
    Code:
    ls
    and it should list the contents of the ubuntu folder.

    9) Run the setup script ubuntu.sh by entering the following:
    Code:
    sh ./ubuntu.sh
    hit enter

    10) Now type
    Code:
    bootubuntu
    and hit enter

    11) So now we have ubuntu command line up and running which should look like:
    Code:
    root@localhost:/#
    We will need to get some packages to run a gui and then connect to it via VNC client. So we need to update a few things first. Type:
    Code:
    apt-get update
    then
    Code:
    apt-get install tightvncserver
    now we need the gui elements so enter this:
    Code:
    apt-get install lxde

    12) Type the following:
    Code:
    export USER=root
    vncserver -geometry 1024×600

    this sets the resolution...you can change it to play around, but the native resolution for the nook is 1024x600. This is also where you will set the password for your vnc server...make sure to remember it ;)

    13) Next, we are going to add the following to /root/.vnc/xstartup file using cat command: (hit enter after each line and ignore the fact that it looks like it does it twice)
    Code:
    cat > /root/.vnc/xstartup
    #!/bin/sh
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    icewm &
    lxsession
    After hitting enter after the last line press "Ctrl+D" twice then press enter

    14) We need the vnc server to start every time we start ubuntu, type this:
    Code:
    cat > front
    export USER=root
    cd /
    rm -r -f tmp
    mkdir tmp
    cd /
    vncserver -geometry 1024×600
    Same as before, hit enter after each line then after hitting enter for the last line press "Ctrl+D" twice then press enter.

    15) Enter this
    Code:
    cat front /root/.bashrc > temp

    Then
    Code:
    cp temp /root/.bashrc


    16) Now on the nook open up your vnc viewer app (android vnc viewer or PocketCloud...or whatever you use)

    Use the following settings:
    Host Address: 127.0.0.1 (some don't require this)
    Password: the password you set up in step 16
    Port: 5901

    Save and then click connect and you should be up and running on ubuntu! To leave ubuntu type exit from adb. This should kill ubuntu. Exit adb and then you can disconnect the nook from your pc.

    To start ubuntu from the nook open up a terminal emulater and type:

    Code:
    bootubuntu
    Hit enter, this should bring up the root@localhost, hhen press "Home" key and open up your vnc app. Now you are ready to rock your Linux tablet!

    You could also use gscript lite to automate the process of starting ubuntu so you don't have to type it in the terminal everytime. You can get gscript lite from the market or download the file I have attached.

    It does seem a little laggy..just a little...for now anyway ;)

    To exit ubuntu: Disconnect the vnc client then hold the "Home" key (I use button savior which brings up a nice little task manager) and click the Terminal emulator when it pops up under running tasks. Once you are back in the terminal you can type:
    Code:
    exit
    to shut down ubuntu.

    Enjoy and make sure you thank munday and the guys at nexusonehacks and all the devs who helped make it possible.

    -devastator

    EDIT:

    I noticed that after rebooting the nook would hang at the "Future of reading" screen....if this happens turn the device off remove the sd card the turn the nook back on. It should boot fine. After it's finished you can return the sd card and mount it. This is strange and I'm looking into it. I'm not sure if this is limited to me or if it is universal to all nooks. It also still fails at shutting ubuntu down for some reason. I'm still looking into this.g into this.
    6
    After some time off for awhile (dealing with some personal issues) I am back to developing on this project and would like to welcome and thank penkia for stepping up and taking the initiative to push this project forward.

    So what's new?

    Not a lot at the moment. As of right now I have an image which can be booted from the sd card...well kind of. You have to adb in after the device boots and sits at the black screen with the word "Android" and a blinking cursor. At this point a few paths need to be set up and then the X server can be started. There is a link to the image at the bottom of this post.

    Currently penkia reports that he does have the touchscreen and wifi working. The driver for the touchscreen will be included at the bottom of this post.

    I hope to have a fully functioning bootable version up soon with the new work that penkia has put in this should be quite feasible.

    I guess just keep watching, as soon as we have a fully functioning image (plus some bugs...you know there will be bugs) we should have a new topic up with the release and full instructions on how to install to your sd card and get up and running.

    The following files are for development purposes only and are in no way intended for any other use...you know...cause it doesn't exactly "work" yet ;)

    Here are the instructions to boot the image:

    Burn the image to your uSD using Linux (dd if / of) or winImage.
    NOTE: This image is for a 8GB card. It will ERASE ALL THE DATA CURRENTLY ON THE CARD YOU WILL BE USING. You can use a larger card but will have to resize the partitions or create a new one using the blank unformatted space.

    UPDATES: To update the Ubuntu image after burning to your SD card. Boot the nook normally and then using Terminal emulator (good luck) or adb shell in and chroot to the Ubuntu image. Proceed to update or install packages. SIDE NOTE: In some excitement I think I forgot to include the build-essentials package in this image. You will need this (I mean...c'mon you are downloading a development version of a pre-alpha release....you arent doing this just to look at it). You will probably want to grab whatever other packages you think you may need. Also make sure that the files needed for adb are there...like I said...this is early pre-alpha! Maybe even prehistoric alpha...cretaceous even.

    After you finish the updates power off the nook and then boot it back up with the sd card inserted. It will come to a blank screen except for the word "Android" and a blinking cursor. Plug the nook into your pc. Bring up a terminal and adb shell into the device.

    Now let's fix some stuffs

    In the console enter the following commands:
    Code:
    mount -o remount,rw /
    mount -o remount,rw /system
    
    ln -s /system/usr /usr
    ln -s /system/var /var
    ln -s /system/bin /bin
    
    export PATH=$PATH:/system/bin:/system/xbin:/system/usr/bin:/system/usr/sbin
    export FRAMEBUFFER=/dev/graphics/fb0
    export TERM=linux
    export HOME=/root
    export TSLIB_CONFFILE=/system/etc/ts.conf
    export LD_LIBRARY_PATH=/lib:/usr/lib
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_DIR=/system/usr/lib
    export TSLIB_FBDEVICE=/dev/graphics/fb0
    export TSLIB_TSDEVICE=/dev/input/event2
    export TSLIB_PLUGINDIR=/system/usr/lib/ts0
    
    dbus-daemon --system

    After all of that you can do either of the following

    startx

    or

    startxfce4

    The X server should start and you will be at a ubuntu home screen. That's where I am right now. I will start to incorporate the changes that penkia made and they will be reflected in the next release, which will hopefully be a bootable alpha build.

    Enjoy

    More to come...

    Nook Color Ubuntu Filesystem Image
    http://www.multiupload.com/0EWK4V4PO6

    Penkia's Touchscreen Driver (append the following to your xorg.conf to enable the touchscreen)

    Code:
    Section "InputDevice"
    Identifier "touchscreen"
    Driver "mtev"
    Option "Device" "/dev/input/event2"
    Option "SwapAxes" "true"
    Option "InvertY" "true"
    EndSection


    http://www.megaupload.com/?d=LRIYK0LY

    -devastator

    Crazy mad props and thanks to developer penkia for the touchscreen fix and for breathing new life into this project
    6
    My bad people. I've just been really slammed with work lately so my time dedicated has been pretty choppy at best. Have a few hosting options now ironing out a few things and will have a link for download by tomorrow evening. My apologies.

    -devastatorx
    4
    Progress:

    Touchscreen works
    Able to connect to unsecured wireless network


    Currently working on the interface to make it usable for the nook...well its usable...but its kind of a pain at the moment.

    So here is what I am looking at:

    A few more hours to test and tweak a few things, write a howto, and then upload everything.

    The files should be available tonight!

    That's right, ubuntu booting from the SD with wifi and touch screen (both thanks to penkia for the wifi and touchscreen fixes!)

    Will be back soon (couple hours) with a link to the download and instructions. This will be a pre-alpha release and evolve (hopefully, and with the help of anyone who wants to contribute) into alpha, beta, and stable point releases.

    Also, if the image is too big for the free servers, is anyone willing to host? PM if this would be a possibility.

    Thanks

    devastatorx
    3
    I got it going, just needed a few "busybox"-es here and there :D. It needs some work, right now to get X you have to use VNC.
    It's sluggish but a bit more work might just yield something a bit more usable. I'll play more tomorrow night.

    Here's my scripts:

    ubuntu.sh

    Code:
    mount -o remount,rw /dev/block/mmcblk0p5 /system
    busybox modprobe ext2
    
    rm -f /data/local/bin/fsrw
    rm -f /data/local/bin/bootubuntu
    rm -f /data/local/bin/unionfs
    rm -f /data/local/bin/installer.sh
    rm -f /data/local/bin/mountonly
    
    mkdir /data/local/mnt
    
    #busybox clear
    rm  /system/bin/fsrw
    rm  /system/bin/bootubuntu
    rm  /system/bin/unionfs
    rm -/system/bin/mountonly
    
    busybox cp -f fsrw /system/bin
    busybox cp -f bootubuntu /system/bin
    busybox cp -f unionfs /system/bin
    busybox cp -f mountonly /system/bin
    
    
    cd /sdcard/ubuntu
    
    busybox chmod 4777 *
    
    cd /system/bin/
    
    busybox chmod 4777 *
    
    cd /
    
    #busybox clear
    
    echo " "
    echo "Ubuntu Chroot Bootloader v0.1"
    echo "Ubuntu Bootloader is now installed!"
    echo "This process does NOT damage Android OS!"
    echo " "
    echo "Original Installer by Charan Singh"
    echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
    echo " "
    echo "To enter the Debian Linux console just type 'bootubuntu'"


    bootubuntu

    Code:
    mount -o remount,rw /dev/block/mmcblk0p5 /system
    export kit=/sdcard/ubuntu
    export bin=/system/bin
    export mnt=/data/local/mnt
    export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
    export TERM=linux
    export HOME=/root
    busybox mknod /dev/loop2 b 7 0
    mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
    mount -t devpts devpts $mnt/dev/pts
    mount -t proc proc $mnt/proc
    mount -t sysfs sysfs $mnt/sys
    busybox sysctl -w net.ipv4.ip_forward=1
    echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
    echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
    echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
    echo "Setting localhost on /etc/hosts "
    echo "127.0.0.1 localhost" > $mnt/etc/hosts
    echo "READY TO ROCK AND ROLL BABY! "
    echo "Brought to you by NexusOneHacks.net and the open source community! "
    echo " "
    busybox chroot $mnt /bin/bash
    
    #After exit command is executed clear it all up
    echo " "
    
    echo "Shutting down Ubuntu"
    umount $mnt/dev/pts
    umount $mnt/proc 
    umount $mnt/sys 
    umount $mnt


    Then just followed the instructions at nexusonehacks.
    note: to run bootubuntu i had to use sh and the use the full path:
    Code:
    # sh /system/bin/bootubuntu

    other note: I was using adb not a term app on the nook.

    Obligatory video
    I can't post links yet so check: youtube.com/watch?v=TnXfZ6aagn8 for a really boring video

    EDIT: switched the names, DOH!