Reply
Thread Tools
Posts: 137 | Thanked: 8 times | Joined on Apr 2006
#1
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.
 
Posts: 1,038 | Thanked: 737 times | Joined on Nov 2005 @ Helsinki
#2
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!
 
Posts: 137 | Thanked: 8 times | Joined on Apr 2006
#3
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
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#4
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.
 
Posts: 42 | Thanked: 1 time | Joined on Dec 2005
#5
Originally Posted by aflegg
To repeat: if you need to ask "can you help me clarify what to comment out" then leave it alone!
Well, heck. I was writing a reply when you posted this.

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.
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#6
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.
 
Posts: 1,038 | Thanked: 737 times | Joined on Nov 2005 @ Helsinki
#7
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.
 
Posts: 137 | Thanked: 8 times | Joined on Apr 2006
#8
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.

Last edited by c_legaspi; 2006-05-04 at 13:32.
 
Posts: 319 | Thanked: 6 times | Joined on Apr 2006
#9
Originally Posted by c_legaspi
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.
I found the instructions pretty clear, and you don't have to constently reflash. Just put it in RD mode and leave it there. (Yes I know the instructions said not too, and it sounded like a good idea to me). I was going to paste my config for you, but it seems the unit is dead, and I don't have my power plug with me. I'll paste it when I get home so you can see what works fro me.
 
Posts: 137 | Thanked: 8 times | Joined on Apr 2006
#10
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
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:44.