Link to home
Start Free TrialLog in
Avatar of zizi21
zizi21

asked on

Edit boot grub

Hi,

I want to edit the grub.cfg file in boot so that it is in text mode. Which line do i edit ?

To physically do it, I press 'e', write text to the line and then ctr-x. But how do i do it from the grub.conf? Is it similar ?

Thanks.



Avatar of Papertrip
Papertrip
Flag of United States of America image

To make this permanent, you need to edit /etc/inittab

Find the line with "initdefault", and change the digit in that line to "3" for run-level 3.
Avatar of arnold
Which linux version do you have?
Debian/ubuntu have a different mechanism than the one papertrip reference. It uses the telinit <run_level> mechanism.
telinit 3
Running runlevel in the shell should tell you which runlevel it is in.
chkconfig gdm off
http://www.cyberciti.biz/faq/prevent-xorg-from-starting-in-linux/
I had thought the grub.cfg (instead of .conf) was just a typo, but after your reply I realize that it's not a typo if the distro is Ubuntu (or possibly some other Debian variant).

Guess I won't get my first points from this one heh.
You very well should get some points since the asker was not specific in their question and it is a valid answer to the question.
Avatar of zizi21
zizi21

ASKER

I am using Ubuntu 10.04.2 LTS.

I did try changing the run level but i can't restart the computer after that..Someone told him they have changed the linux distrubtion, so, the run level would not work.
Avatar of zizi21

ASKER

I prefer using grub as I could the variables anytime i want to..i don't want it to be permanent..
Avatar of zizi21

ASKER

Any help is appreciated. Thanks.
e
single
to boot in single user mode at which point you can use telinit to reset to level 3/2. Or revert the changes you made.

I do not know whether using e and then putting 2 will let you boot the system or whether Single is the only parameter (special Case)

Avatar of zizi21

ASKER

I am able to log into the computer now after installing linux again (sometime back). That's the reason I am hesitating to change the run level..Can I do it with boot grub ? I am able to do it when I am physically at the computer. But, I want to change the script so that I don't need to physcially be at the computer. I could ssh anywhere and change it..
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zizi21

ASKER

Thanks. I am trying it now.