![]() |
Becoming Root
I was just reading the guide to becoming root from maemo web site. Is it possible to become root without flashing to enable rd mode. I mean, cant i just use x term to copy the /usr/sbin/gainroot to /media/mmc1 and then modify it and recopy it back.
|
You need root privileges to do the copy, so nope. You need to flash it. But flashing to rd doesn't mean that your system get's wiped out. It only triggers the system to rd mode. So, it's safe to do at any time. You just need a linux distro to do it. If you already don't have one, I recommend downloading knoppix or similiar rebooting with the cd to linux, download flasher to desktop and then follow instructions on how to enable rd mode. It's really 5 mins tops. Highly recommended!
|
it let me copy the gainroot but i havent tried to recopy it back. also can you help me clarify what to comment out. here is what my gainroot looks like.
#! /bin/sh -e trap exit SIGHUP SIGINT SIGTERM PATH=bin:/bin/usr/bin:/sbin:/usr/sbin MODE='/usr/sbin/chroot mnt/initfs cal-tool --get-rd-mode if [ x$MODE = enabled ] then echo "Root enabled" /bin/sh else echo "Enabled RD mode if you want to break your device" fi How do you do the alternative and modify etc/sudoers |
If you're not comfortable editing files: DON'T! Leave it enabled in R&D mode, or switch to and from when you require it.
Commenting lines out of /usr/sbin/gainroot is much more "dangerous" (in terms of leading to a complete reflash) than anything else, IMHO. To repeat: if you need to ask "can you help me clarify what to comment out"[1] then leave it alone! HTH, Andrew [1] I'm not saying you shouldn't be helped to learn how to get around in Linux, or learn shell scripting - but /usr/sbin/gainroot is entirely the wrong file to be playing with. |
Quote:
I just went through the process of modifying gainroot the other day and I'd offer that the instructions are pretty vague on the point c_legaspi is asking about. Having just gone through this whole ordeal recently (successfully, as far as I can tell), I was going to provide an answer that I thought would help clarify the instructions and explain the theory behind which lines to comment out to the extent I understand that theory (which isn't very deeply). Can you explain your warning any futher or are you just reiterating the warnings provided with the instructions? I'd be honestly surprised if anyone read the already existing warnings and thought that these modifications presented no risk. |
Well, there have been a number of people who've edited it wrongly and lost the ability to become root full-stop, and had to reflash.
Also, I've not yet seen a clear reason why R&D mode should be disabled anyway. Leave it enabled, unless you don't like spanners & green text when booting. 50p (about 92 cents) to anyone who can convince me why R&D mode should be disabled; after editing /usr/sbin/gainroot to disable the R&D check. |
I agree with aflegg. I put it to rd mode and it's been running on it ever since. Flashing the latest version has no effect on the rd mode, so if you rd mode enabled on the 2005 version, when you install 2006, it will retain it in rd mode.
|
i am unsure and thats why im asking. i would like to have root access without having to go thru the reflashing all the time. which lines do i comment out. the maemo instructions are unclear to me
if this is dangerous, then give an alternative solutions. |
Quote:
|
thanks, at least it will give me some kind of ideal. Yeah, leaving it in RD is another option. just want to weigh all my options
|
As I said, noone's convinced me (or other "power" users, if I may speak for them) as to why you'd ever disable R&D mode.
Leaving it in R&D mode all the time is a lot safer than editing the gainroot script and gets you funky debug text written over your boot screen! How could you lose?! ;-) |
Quote:
Although debuging text does sound like it could be useful, maybe I'll reflash. |
Yeah, but whoever added the "disable R&D mode after editing gainroot" step to the wiki didn't explain why, or has come forward to say why (AFAIK).
To me it just makes the process more complex and error-prone for non-technical users; and since this seems to be the growing consensus, the wiki will probably be edited to reflect this. Cheers, Andrew |
sorry it took a while to post it. Actually forgot until halfway though watching doctor who.
#!/bin/sh -e trap exit SIGHUP SIGINT SIGTERM PATH=/bin:/usr/bin:/sbin:/usr/sbin #MODE=`/usr/sbin/chroot /mnt/initfs cal-tool --get-rd-mode` #if [ x$MODE = xenabled ] #then # echo "Root shell enabled" /bin/sh #else # echo "Enable RD mode if you want to break your device" #fi # |
thanks, I appreciate the help.
also, thanks to all. at least know im trying to get my feet wet in linux without drowning. |
Hello,
I'm a new Nokia 770 user, well I haven't even received it yet ;-) But I read a lot on the internet about my future gadget :) I would like to know if it is possible to gain root access without having a desktop PC with linux or MacOs installed? Can I use something like the "damn small pc" linux distribution to run linux "inside" windows or from a USB boot drive? Thanks |
Quote:
|
There's also the firmware binary patch which has been mentioned here.
|
ive done it using the flash and ubuntu live cd. i sure am learning alot about this linux. kind of reminds me of the old days of ms dos.
|
Mine's been in R&D mode the whole time and I've never questioned it, even after flashing the latest firmware. The cosmetic "issues" on bootup are nothing to people who have been using Linux for a while. Why worry?
|
Knoppix works just fine for a quick flash :-)
|
All times are GMT. The time now is 00:11. |
vBulletin® Version 3.8.8