Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,443 Members 39,522 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Has anyone successfully run Complete Linux Installer (or similar)

Tip us?
 
Graeme H
Old
#1  
Junior Member - OP
Thanks Meter 7
Posts: 19
Join Date: Jan 2010
Default [Q] Has anyone successfully run Complete Linux Installer (or similar)

Hi everyone, I'm trying to get a full blown GNU distro of Linux running on my note pro but I've hit a snag. It seems like the device should support it, but every time I try to run a script that creates loopback devices, mounts directories, etc. I get permission errors even though I definitely have root.

Here's where it gets weird. Completel Linux installer fails when it tries to run this command:

Code:
Select Code
mknod /dev/block/loop255 b 7 255
and it gives this error:

Code:
Select Code
mknod: /dev/block/loop255: Operation not permitted
Despite what the error says, the script is being run as root. The app automatically opens the terminal and runs the command as root, but I also tried manually executing su and running the same script but the same error occurs.

As an experiment, I tried manually running just that one mknod commad and it works fine. In fact, if I manually execute every line in the bootscript.sh file it all seems to execute perfectly fine. But if I put the exact same mknod command into a .sh file and execute it like this:

Code:
Select Code
> sh test.sh
Then it gives the same error. Interestingly, if I directly run mknod as a non-root user it does not give me the "Operation not permitted" error, instead it says "Permission denied". I tried some other apps like Debian Kit as well and they seem to give the same error.

Any ideas why it would matter whether I manually enter a command into the terminal or whether I execute the same command indirectly from a file? I tried other terminal apps as well and it made no difference.

Thanks.
 
pheyx
Old
#2  
Junior Member
Thanks Meter 1
Posts: 4
Join Date: Feb 2013
Quote:
Originally Posted by Graeme H View Post
Hi everyone, I'm trying to get a full blown GNU distro of Linux running on my note pro but I've hit a snag. It seems like the device should support it, but every time I try to run a script that creates loopback devices, mounts directories, etc. I get permission errors even though I definitely have root.

Here's where it gets weird. Completel Linux installer fails when it tries to run this command:

Code:
Select Code
mknod /dev/block/loop255 b 7 255
and it gives this error:

Code:
Select Code
mknod: /dev/block/loop255: Operation not permitted
Despite what the error says, the script is being run as root. The app automatically opens the terminal and runs the command as root, but I also tried manually executing su and running the same script but the same error occurs.

As an experiment, I tried manually running just that one mknod commad and it works fine. In fact, if I manually execute every line in the bootscript.sh file it all seems to execute perfectly fine. But if I put the exact same mknod command into a .sh file and execute it like this:

Code:
Select Code
> sh test.sh
Then it gives the same error. Interestingly, if I directly run mknod as a non-root user it does not give me the "Operation not permitted" error, instead it says "Permission denied". I tried some other apps like Debian Kit as well and they seem to give the same error.

Any ideas why it would matter whether I manually enter a command into the terminal or whether I execute the same command indirectly from a file? I tried other terminal apps as well and it made no difference.

Thanks.



try source the script ,eg: . test.sh, this works but i don't know why.
The Following User Says Thank You to pheyx For This Useful Post: [ Click to Expand ]
 
Graeme H
Old
#3  
Junior Member - OP
Thanks Meter 7
Posts: 19
Join Date: Jan 2010
Good idea pheyx! That's a great workaround which basically solves my problem for now... or at least sends me on to the next problem

Thanks for you help.
 
pheyx
Old
#4  
Junior Member
Thanks Meter 1
Posts: 4
Join Date: Feb 2013
Quote:
Originally Posted by Graeme H View Post
Good idea pheyx! That's a great workaround which basically solves my problem for now... or at least sends me on to the next problem

Thanks for you help.
I think I've found the reason. It's due to selinux. The selinux is set to enforced on android from 4.4. I flashed a kernel that sets selinux to permissive and it resolved the issue. Now the complete linux installer ran perfectly without modifying the scripts.
 
Duly.noted
Old
#5  
Senior Member
Thanks Meter 102
Posts: 495
Join Date: Dec 2013
Quote:
Originally Posted by pheyx View Post
I think I've found the reason. It's due to selinux. The selinux is set to enforced on android from 4.4. I flashed a kernel that sets selinux to permissive and it resolved the issue. Now the complete linux installer ran perfectly without modifying the scripts.
how well is Linux running on it for you?

Sent from my SM-P900 using XDA Premium HD app
 
Redsandro
Old
#6  
Member
Thanks Meter 6
Posts: 57
Join Date: Jul 2012
Yeah, how well is it running?

I guess it's out of the question both due to speed (Complete Linux Installer uses laggy VNC remote desktop) and hardware (I guess the stylus won't work pressure-sensitive-ish due to VNC), but I'd love to run MyPaint on NotePRO.
 
pheyx
Old
#7  
Junior Member
Thanks Meter 1
Posts: 4
Join Date: Feb 2013
Quote:
Originally Posted by Duly.noted View Post
how well is Linux running on it for you?

Sent from my SM-P900 using XDA Premium HD app
Quote:
Originally Posted by Redsandro View Post
Yeah, how well is it running?

I guess it's out of the question both due to speed (Complete Linux Installer uses laggy VNC remote desktop) and hardware (I guess the stylus won't work pressure-sensitive-ish due to VNC), but I'd love to run MyPaint on NotePRO.
X Window performance is bad if using VNC, is better when using xsdl x server. Also can use fbdev(or fbturbo) native x server(and the cons is in either case must shutdown android stack),but I have no success using these two linux native x server

Tags
bash, linux
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Monitor What Your Phone’s Camera Sees with Android Wear

Having a smart device strapped to your wrist certainly has its merits. A … more

Mod Lets You Have Stereo Speakers on Your Sony Xperia Z1 (Sort Of)

The stereo speakers onthe Sony Xperia Z2areprobably a relatively large … more

Give Your Screen Some Color with HexaTime Live Wallpaper

We don’t often cover very many live wallpapers here on the XDA Portal. You may … more

Android Wear App Review: Command Google Now with Commandr – XDA Developer TV

OK Google. Make Me a sandwich. How many times have you … more