![]() |
[Maemo 5] Problems with Rootsh
Hi all, I've tried to send a PM to QWERTY12, the guy who has ported to N900 the ROOTSH. I cant send the PM to him, i hope he can see here or anyone can help me. Here is my problem (A copy of message i tried to send to QWERTY12)
" Hi, I've been talking with a lot of members of maemo.talk, and i cant solve my problem. I just reflashed my N900 (First the flash image, then the EMMC, without rebooting, all goes good there). Then, i tried to install rootsh (1.5 and 1.8), it says install sucessfull but i can use it well. When i use sudo <command> sometimes it say i dont have permissions, other times prompt for password. I've this problem since last 4 days, i'm getting crazy, the only thing i make was reflash my device :( If i do this on x-terminal: sudo gainroot dpkg -l rootsh The output is: BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso26+0m5) built-in shell (ash) Enter 'help' for a list of built-in commands. /home/user # dpkg -l rootsh Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii rootsh 1.8 Enable root access, via the "sudo gainroot" /home/user # I've tryed already to: sudo gainroot dpkg --purge rootsh apt-get install rootsh But stills the same problems, stills the same information with erros. Can you please help me..i'm so tired, my last 62 hours was reading and talking with people, no one can help me. I just reflash my device, i've tried to do again 2 ou 3 times, but the same problem. Qwerty12..please can you help me..i'll be appreciat to the rest of my life :( I'm so sad..help me please.." |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
install rootsh (you've done that)
sudo gainroot (gets you a root shell) that is all.. it doesn't do any thing else. sudo other-command won't work because only a few commands are defined in /etc/sudoers.. From what you've posted, I can't see a problem.. it looks like it is working correctly you can ONLY use sudo gainroot |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
I dont rly see a problem too dude.
|
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
I cannot use some commands for exemple, from here:
http://talk.maemo.org/showpost.php?p...postcount=2718 sudo rm -f /etc/default/kernel-power sudo ln -s /usr/share/kernel-power-settings/ideal /etc/default/kernel-power sudo /usr/sbin/kernel-load It returns me: ~$ sudo /usr/sbin/kernel-load Password: ~$ ~$ sudo rm -f /etc/default/kernel-power Password: ... So, have i to type Sudo <command> or not? :( is there..in the wiki..and i do that before reflash.. I already put 'user ALL = PASSWORD: ALL' on the sudoers file, for testing..ok, password disapear, but it says permission denied. Please..i know my english is not so good, but..i know what i do on my n900 before reflash and now..i cant do anything...please help..yes its a problem...that dpkg output for rootsh its wrong..just try on your phones.. Please..help me :'( Quote:
|
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Just type root, hit enter, and type the command without the sudo part.
|
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
The post said:
"Ideally, you would install it and then as user (remove "sudo" before the command if you are root)" Edit: Man you're fast. |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
nokian-series:
I would just forget the sudo stuff if I were you. Just do this. 1. Open xterm. 2. Type root and hit enter. You are root now and can do commands without sudo. Just to make sure type whoami and hit enter. You should get the response that you are root. |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
I've tryed to do:
sudo gainroot then the commands: /usr/sbin/kernel-load /usr/share/kernel-power-settings/ideal (ok, conky is showing + Mhz) but, if i try to: rm -f /etc/default/kernel-power ln -s /usr/share/kernel-power-settings/ideal /etc/default/kernel-power /usr/sbin/kernel-load Then reboot..when i boot up..i have the default config. to 600 Mhz max. I can't apply those commands as root (yes, i've done whoami, it says root). I think it's here something really strange :( After reflash, i can do all of this. But, tell me, can anyone do in your phone who have rootsh installed: sudo gainroot dpkg -l rootsh and put here the output? I might have filesystem corrupted or something strange :S |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Quote:
Make sure you always use the visudo command as root rather than directly editing the file and it will warn you of syntax errors. To get the behaviour you seem to want you need to change the line above (using visudo) to: user ALL = NOPASSWD: ALL It seems that rootsh is doing it's job correctly, i.e. giving you root access when you type root or sudo gainroot. The output from dpkg -I rootsh tells you this (the ii in the first column means installed). It seems your only problem is with your clock settings resetting to default when you reboot - are you sure this isn't expected behaviour? If it's not you'll probably find much more informed help on the overclock thread than here. Cheers, Jan |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Quote:
Did you really ever have been asked for a password when typing "sudo gainroot" as you said in your first post? |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Quote:
When i do like it is on: http://talk.maemo.org/showpost.php?p...postcount=2718 sudo rm -f /etc/default/kernel-power it asks me for a password. Before reflashing, it not ask, i can do those commands with success, now, i can't, thats my problem! :( |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
It has been mentioned a few times..
sudo rm won't work sudo ls won't work sudo some-other-command won't work ONLY: sudo gainroot will work This gives you a root shell.. from that you can run whatever you like sudo gainroot # NOW YOU ARE ROOT rm -f /etc/default/kernel-power If you run sudo rm sudo has not been configured to allow you to run rm, so it asks for a password or tells you permission denied.. |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
If Sudo <Command> dont work, why can i do that before reflash ?!
If Sudo <Command> dont work, why is it here http://talk.maemo.org/showpost.php?p...postcount=2718 and everyone use it sucessfull ? Sorry but dont make sense...I'm not crazy, i know what i've done before on X-terminal. Before reflash, i save .txt files with my script commands, and theres a lot of 'sudo <command>' that worked.. Maybe some software i've installed with an old version..not chroot or rootsh..other software..dont know.. : \ Quote:
|
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Ohh..and here, on the WIKI: http://wiki.maemo.org/Overclocking
At "Set maximum CPU frequency", it says: From root terminal: rootsh echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq | echo "" It gives me permission dennied too ! . . . |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
What happens if you
Open an xterm Type root and hit enter Type whoami and hit enter ? |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
You do know that rootsh's description says to use "root", right? It does not mention anything about sudo.
The uninstall thing? Well, that was me being a tosser. I did fix it in later versions, however. |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Sounds like the real "problem" is that rootsh doesn't work like you want it to.
Either run "sudo gainroot" for a root shell or "rootsh (command)" to run one command as root. Sudo doesn't work in maemo like it does in other linux distros. |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
My first thought would be it was shorthand, or a ploy to stop inexperienced users from doing things to their phone.
If you don't understand that sudo rm /etc/somefile and sudo gainroot rm /etc/somefile are conceptually the same things, then you've fallen at the first hurdle!! There are very few commands you can run using sudo on Maemo5.. rm is not one of them, nor is echo From root terminal: rootsh echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq | echo "" Is actually nonsensical and would NEVER work unless you were already root If you need to do things that report "permission denied", run sudo gainroot first and you will be fine.. |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
When I just tried that rootsh command as listed in message #14 above, I got a response that it was deprecated.
|
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Quote:
root is a super user and have more privileges than normal user. In other systems you normaly need a password to become that user.. that is not needed in Maemo. Just type root or sudo gainroot and you become root. Why Titan writes sudo in his explanations i do not know.. probably just to tell you that you need to be root and have root privileges. Why the OC'ing are working for everyone is because they go root when they need to do it. They know not to sudo before the commands. Of what i understand you have successfully OC'd with the temporary settings but need to do them permanent. So you are doing something wrong when attempting doing them permanent. |
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Quote:
If you want to try to see which application it is be my guest. Quote:
|
Re: QWERTY12 (ROOTSH) - I Need help PLEASE
Quote:
But no one knows it.. hum .. right... |
Re: [Maemo 5] Problems with Rootsh
Hey all..
I think i discover the problem. Somehow, before reflash, my \sys\* is on read\write\execute to my user. But actualy, i cant modify it (i can, but before restart, everything goes back to read only). Any one knows how to change it ? I've googled a little but..nothing.. |
Re: [Maemo 5] Problems with Rootsh
Quote:
|
Re: [Maemo 5] Problems with Rootsh
I'm trying to change the value on, for exemple:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq with this command: sudo echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq using: queen beecon widget Please dont tell me it doesent work..i've donne it before re-flash my device as you can easly see by editing my queen_beecon file on: http://www.4shared.com/dir/37234484/...on_Widget.html If that permissions are set by kernel-modules..maybe..before i was using maemo 23 i thing with OC ..now i'm using maemo25 (are that modules included on that you're talking?) |
Re: [Maemo 5] Problems with Rootsh
/sys is a virtual file system where you cannot store files. it is just for the communication with the kernel.
changing permissions on /sys is pointless. there were no changes on /sys in the different kernels version. I have removed the remaining occurrences of "sudo" before commands in my tutorials - it was a mistake. sudo works only with specific commands but not with echo etc. If you really want to use "sudo" with scripts, create a script which will run as root (i.e. no sudo in the script) and put an entry in /etc/suders.d so that can run the script using "sudo script" |
Re: [Maemo 5] Problems with Rootsh
Actualy, what i need is to use Queen Beecon Widget with some CMDs like: echo 900000 > /sys/devices/.../scaling_max_freq.
So, what it's needed to do ? Add the executable of Queen Beecon Widget t Sudoers file? It's that? If is...what to put in suddoers, please. Actualy, to use the "scripts" i've created on Queen Beecon Widget, i need to change permissions on that files /sys/devices/.../scaling_max_frq , and thats boring because when i reboot the phone, i need to set them again and again. Queen Beecon Widget dont allow you to put CMDs with root or sudo gaind root. * I still dont undurstanding why i can do it before re-flash, but, if i go throught the problem..dont worrie * Thank you all for helping. Quote:
|
Re: [Maemo 5] Problems with Rootsh
Quote:
Try "echo 1000000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" You may need to add "tee" to the sudoers configuration first. |
Re: [Maemo 5] Problems with Rootsh
just used:
echo "echo 900000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" | sudo gainroot it works...so, finaly, i've back my own Overclock UI..like i had before reflash my n900. Still strange why it works before and this time it takes 4 times (x) more commands, but..just fine..it works...hardly, but..it works... thank you for all of you that help me sugesting me to try some commands and explaining me some things. Sorry to QWERTY12, maybe not a rootsh problem ( : Cheers to all. Thread may be closed! SOLVED. (Workarrounded but solved, aftar 5 days without sleep.. : \ lol :P ) |
| All times are GMT. The time now is 09:37. |
vBulletin® Version 3.8.8