[development] Ubuntu as an app on Nook Tablet

Search This thread

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,826
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
This is a development thread. Do not post "good job", or "great idea", or "cool, i'm trying this now".. I want feedback.

Introduction
This is a precursor to a possible way of running a custom kernel and ROM on the Nook Tablet in a chroot environment. I've been working on an Android app and almost have a usable installer for my AndBuntu project. If we are sucessful, this installer can be converted to a Un-Nook-er app "AndNook" which may be used to install custom kernels and ROMs with additional work.

So, with that said, lets get to it.

You will need:
This is all the software you will need to run this script. If you don't have a Debian Linux based computer, you can dual boot, install Ubuntu within Windows, or run it from a memory stick.
Getting started
The basic process will go like this.. Generate an image in Ubuntu, put that on your /sdcard/Ubuntu folder and then execute a script
  1. On the Linux computer execute the following code block
    Code:
    cd ~/Desktop
    sudo apt-get install rootstock
    sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh --fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0  --doswap --swapsize 256M
    This will take a while, and it will generate a image file with a bunch of charactors like ***************.img.
  2. rename this file "ubuntu.img" without the quotes
  3. create a folder on the Nook Tablet called "/sdcard/ubuntu". (that's internal storage folder "/ubuntu/")
  4. copy the "ubuntu.img" file to the folder
  5. copy THIS SCRIPT to your sdcard/ubuntu/ folder and name it "uboot".
  6. launch the terminal emulator and execute the following code block
    Code:
    su
    sh /sdcard/ubuntu/uboot
  7. Paste the output of that command here. If it failed stop. If it worked, keep going
  8. in the Ubuntu environment execute the following code block
    Code:
    /firstRun
    tightvncserver
    tightvncserver may ask you for a password
  9. Launch your VNC Viewer app
  10. Specify 127.0.0.1 as the connection address. Use your password which you selected in previous code block.

Please note, the script is designed for a Samsung Android device. There is a line in the SH script
Code:
export UbuntuLoopFS=/sdcard/ubuntu/ubuntu.img
This line may require modification.

I'm looking for feedback. If you cannot understand what's going on, please don't post. This is not user friendly.


I take no responsibility or liability for anything which may happen to your device. This may force your device into a boot loop 8 times and your device will be factory restored. If it does, please let me know and I will make changes accordingly.
 
Last edited:

little8020

Senior Member
Aug 12, 2010
126
14
Attalla, AL
I am interested in trying this but
How much data will need to be downloaded, I currently only have "borrowed" WiFi and cell phone
And does this give you a fully usable ubuntu with desktop and ability to install linux apps
thanks for info
 

liquidzoo

Senior Member
Mar 17, 2010
1,025
209
Florence, AZ
Not sure if it makes a difference, but the NT mounts the sdcard at /mnt/sdcard

Any way, though, I have a Linux Mint (based on Ubuntu) distro installed through VirtualBox, and I'll throw together an Ubuntu installation as well right now. I'm more than willing to help out.
 

LouZiffer

Senior Member
Mar 16, 2010
117
43
(misinterpreted the meaning of 'feedback'. Apologies.)

EDIT 2: Turning this into a useful post. Hopefully this is the kind of bull**** you want. If not, I'll try again! :)

Tried the image build on a system running Oneiric. Receive segfaults when attempting to add CA certs to java.

Code:
Setting up ca-certificates-java (20100412) ...
creating /etc/ssl/certs/java/cacerts...
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
/var/lib/dpkg/info/ca-certificates-java.postinst: line 40: 16110 Segmentation fault      LANG=C LC_ALL=C keytool -importcert -trustcacerts -keystore $KEYSTORE -noprompt -storepass "$storepass" -alias "$alias" -file "$cacertdir/$pem" > $log 2>&1
/var/lib/dpkg/info/ca-certificates-java.postinst: line 40: 16113 Segmentation fault      LANG=C LC_ALL=C keytool -importcert 
trustcacerts -keystore $KEYSTORE -providerClass sun.security.pkcs11.SunPKCS11 -providerArg '${java.home}/lib/security/nss.cfg' -noprompt -storepass "$storepass" -alias "$alias" -file "$cacertdir/$pem" > $log 2>&1
error adding brasil.gov.br/brasil.gov.br.crt

Many segfaults follow. One for each cert it tried to install. Image build abends shortly after with an error code 1 in sub-process /usr/bin/dpkg.

At first I thought this might be due to my use of OpenJDK. I removed OpenJDK, installed Sun/Oracle JDK and experienced same. This may be Oneiric-specific. For giggles I'm trying oneiric as the dist in a follow-up build on this machine, and also moving to a second Ubuntu box that's running Maverick for another try at the original instructions. Will edit this post with future updates.
 
Last edited:

jeph36

Member
May 28, 2009
44
3
Cedar Falls, IA
[*]On the Linux computer execute the following code block
Code:
cd ~/Desktop
sudo apt-get install rootstock
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0  --doswap --swapsize 256M
This will take a while, and it will generate a image file with a bunch of charactors like ***************.img.

Arg, I let this go for ~an hour on my netbook and got a long way through the process before I got:
Code:
/usr/bin/stat: cannot read file system information for `/home/UserUser': No such file or directory
Segmentation fault

Can this be done on a 64-bit installation of ubuntu? I have that on the more powerful desktop downstairs.
 

dragon_76

Senior Member
Apr 21, 2007
618
100
Chicago, IL
You know that this is already in the market... Ubuntu install guide. An image of 10.10 for Arm is linked in the app along with the script to start it. I have it installed and running. Only issue I have is that the resolution is lower than Blaze as the image is designed for phones.


Sent from my BNTV250 using xda premium
 

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,826
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
Not sure if it makes a difference, but the NT mounts the sdcard at /mnt/sdcard

Any way, though, I have a Linux Mint (based on Ubuntu) distro installed through VirtualBox, and I'll throw together an Ubuntu installation as well right now. I'm more than willing to help out.
mint will work.


Personally I'd like the option of a slimmed down version that doesn't include the overhead of X/VNC, though I can understand the advantages of a GUI from a usability standpoint. That's a simple matter of generating an image without those options, but you might want to consider it if you're offering pre-generated images or scripts for download at some point.

Sent from my HTC Evo Design 4G using XDA Premium
This is the kind of bull**** I don't want in this thread. Congratulations on wasting a post.
Arg, I let this go for ~an hour on my netbook and got a long way through the process before I got:
Code:
/usr/bin/stat: cannot read file system information for `/home/UserUser': No such file or directory
Segmentation fault

Can this be done on a 64-bit installation of ubuntu? I have that on the more powerful desktop downstairs.
you need to log in as a full user. UserUser is not a valid user. Useruser does not have a home folder.
 

jeph36

Member
May 28, 2009
44
3
Cedar Falls, IA
you need to log in as a full user. UserUser is not a valid user. Useruser does not have a home folder.
It actually was "/home/jeph36/" where 'jeph36' is my normal ubuntu login. When I posted I thought maybe I should change it for some privacy reason, only to later realize that it is my xda user name anyway. I assume by "full user" you just mean the user that I use to login.

Edit: I tried again on the same computer with the same result. I am not sure what is missing. Unfortunately I can not stay up later to try on a different computer or with a new install (new 3-day old baby, work tomorrow, etc). Hopefully someone else has this working by tomorrow afternoon/evening, but if not I will get on it then.
 
Last edited:

Montisaquadeis

Senior Member
Nov 16, 2011
352
35
This is a development thread. Do not post "good job", or "great idea", or "cool, i'm trying this now".. I want feedback.

<QUOTE SNIP>

.

Saw a few mistakes such as "sh /sdcard/uboot" Shouldnt it be "sh /sdcard/ubunbtu/uboot"? I am currently n the proccess of getting ubuntu up and running in virtualbox and will be trying this out once i get this up and running for you.

Edit: The rootstock command did not work for me on ubuntu 10.04 it just spits out the command usage spill. IT installed rootstock just fine tho. so I am lost at the moment until I get some feedback of my own here. do I need to iunstall anything ontop of my fresh ubuntu install to get this working?

Edit got the command working but its still flawed big time as it keeps kicking out errors at me. You are going to want to take a good look at it and fix it.

Ed ok I managed to create the image file and here is the command i used to do it

Code:
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -f localhost --l ubuntu --p ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0

Not sure if it will work correctly or not but I am going to find out soon.

Edit: Ok got it transfered over and ran the "sh /sdcard/ubuntu/uboot" Command and this is the output from it

Code:
: permission denied
"
"
"
"
"
"
"
"
"
The command executed failed. please search for this command on Google. IF that fails, try [url]www.ubuntuforums.org[/url].
: permission denied
"
"
"
Setting up environmental variables
test: permission denied
Environmental is:
/sdcard/ubuntu/uboot: 96: Syntax error: "else" unexpected (expecting "then")
 
Last edited:

diamond_lover

Senior Member
Apr 2, 2009
1,579
117
Top Secret
Saw a few mistakes such as "sh /sdcard/uboot" Shouldnt it be "sh /sdcard/ubunbtu/uboot"? I am currently n the proccess of getting ubuntu up and running in virtualbox and will be trying this out once i get this up and running for you.

Edit: The rootstock command did not work for me on ubuntu 10.04 it just spits out the command usage spill. IT installed rootstock just fine tho. so I am lost at the moment until I get some feedback of my own here. do I need to iunstall anything ontop of my fresh ubuntu install to get this working?

Edit got the command working but its still flawed big time as it keeps kicking out errors at me. You are going to want to take a good look at it and fix it.

Ed ok I managed to create the image file and here is the command i used to do it

Code:
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -f localhost --l ubuntu --p ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0

Not sure if it will work correctly or not but I am going to find out soon.

Edit: Ok got it transfered over and ran the "sh /sdcard/ubuntu/uboot" Command and this is the output from it

Code:
: permission denied
"
"
"
"
"
"
"
"
"
The command executed failed. please search for this command on Google. IF that fails, try [url]www.ubuntuforums.org[/url].
: permission denied
"
"
"
Setting up environmental variables
test: permission denied
Environmental is:
/sdcard/ubuntu/uboot: 96: Syntax error: "else" unexpected (expecting "then")

try as superuser.. I'm downloading right now, later I'll tell if work :)
 

liquidzoo

Senior Member
Mar 17, 2010
1,025
209
Florence, AZ

Excellent, I will do this tonight and post results.

Edit: Ok got it transfered over and ran the "sh /sdcard/ubuntu/uboot" Command and this is the output from it

Code:
: permission denied
"
"
"
"
"
"
"
"
"
The command executed failed. please search for this command on Google. IF that fails, try [url]www.ubuntuforums.org[/url].
: permission denied
"
"
"
Setting up environmental variables
test: permission denied
Environmental is:
/sdcard/ubuntu/uboot: 96: Syntax error: "else" unexpected (expecting "then")

I believe it should be sh /mnt/sdcard/ubuntu/uboot (though it appears that may be what you input), and it should be done as root.
 

Montisaquadeis

Senior Member
Nov 16, 2011
352
35
Ok after giving terminal emulator root access all those permisson denied turn into not found. so that script dont work either way. the rest of that output stayed the same.
 

Montisaquadeis

Senior Member
Nov 16, 2011
352
35
The script must be edited to the absolute path for the Ubuntu image.

I have the image on the sdcard in a folder called ubuntu and the file name is ubuntu.img

I would assume that is where the script is looking for the image and its there on the sdcard in the folder named ubuntu and the file is ubuntu.img
 
Last edited:

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,826
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
The image parameters were wrong..

sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh, -fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104 --locale en_US.UTF-8 --serial ttyS0 --doswap --swapsize 256M

should have been
Code:
sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh -fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0  --doswap --swapsize 256M

See that? I didn't either... the comma after "ssh" should not be there.
 

liquidzoo

Senior Member
Mar 17, 2010
1,025
209
Florence, AZ
Not sure if it's going to make a difference, but I am getting an error when running the (corrected) rootstock command:

Unable to open a folder for 4.0 GB Filesystem

No application is registered as handling this file

It's still running, so maybe it won't matter. This is on a 20GB (total, split 500M /boot, 10G /, 9.5G /home) VirtualBox Mint system.
 

Montisaquadeis

Senior Member
Nov 16, 2011
352
35
And they are still wrong it should be -f localhost --l ubuntu --p ubuntu not -fqdn localhost --login ubuntu --password ubuntu
 

liquidzoo

Senior Member
Mar 17, 2010
1,025
209
Florence, AZ
And they are still wrong it should be -f localhost --l ubuntu --p ubuntu not -fqdn localhost --login ubuntu --password ubuntu

-f and --fqdn are interchangeable, but you're right, if you use fqdn it needs another dash, though you're wrong about --l and --p, it's either --login and --password or -l and -p Again, they're interchangeable.

The shorter way would be:

sudo rootstock -d maverick -s lxde,tightvncserver,openoffice.org,gimp,ssh, -f localhost -l ubuntu -p ubuntu -i 3800M --notarball -n "Ubuntu for Android" --kbmodel pc104 -x en_US.UTF-8 --serial ttyS0 --doswap --swapsize 256M

Though, for some reason, the -s switch doesn't seem to work (on my version) in place of --seed
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    This is a development thread. Do not post "good job", or "great idea", or "cool, i'm trying this now".. I want feedback.

    Introduction
    This is a precursor to a possible way of running a custom kernel and ROM on the Nook Tablet in a chroot environment. I've been working on an Android app and almost have a usable installer for my AndBuntu project. If we are sucessful, this installer can be converted to a Un-Nook-er app "AndNook" which may be used to install custom kernels and ROMs with additional work.

    So, with that said, lets get to it.

    You will need:
    This is all the software you will need to run this script. If you don't have a Debian Linux based computer, you can dual boot, install Ubuntu within Windows, or run it from a memory stick.
    Getting started
    The basic process will go like this.. Generate an image in Ubuntu, put that on your /sdcard/Ubuntu folder and then execute a script
    1. On the Linux computer execute the following code block
      Code:
      cd ~/Desktop
      sudo apt-get install rootstock
      sudo rootstock --dist maverick --seed lxde,tightvncserver,openoffice.org,gimp,ssh --fqdn localhost --login ubuntu --password ubuntu --imagesize 3800M --notarball --fullname "Ubuntu for Android" --kbmodel pc104  --locale en_US.UTF-8 --serial ttyS0  --doswap --swapsize 256M
      This will take a while, and it will generate a image file with a bunch of charactors like ***************.img.
    2. rename this file "ubuntu.img" without the quotes
    3. create a folder on the Nook Tablet called "/sdcard/ubuntu". (that's internal storage folder "/ubuntu/")
    4. copy the "ubuntu.img" file to the folder
    5. copy THIS SCRIPT to your sdcard/ubuntu/ folder and name it "uboot".
    6. launch the terminal emulator and execute the following code block
      Code:
      su
      sh /sdcard/ubuntu/uboot
    7. Paste the output of that command here. If it failed stop. If it worked, keep going
    8. in the Ubuntu environment execute the following code block
      Code:
      /firstRun
      tightvncserver
      tightvncserver may ask you for a password
    9. Launch your VNC Viewer app
    10. Specify 127.0.0.1 as the connection address. Use your password which you selected in previous code block.

    Please note, the script is designed for a Samsung Android device. There is a line in the SH script
    Code:
    export UbuntuLoopFS=/sdcard/ubuntu/ubuntu.img
    This line may require modification.

    I'm looking for feedback. If you cannot understand what's going on, please don't post. This is not user friendly.


    I take no responsibility or liability for anything which may happen to your device. This may force your device into a boot loop 8 times and your device will be factory restored. If it does, please let me know and I will make changes accordingly.