Edit boot grub

zizi21
zizi21 used Ask the Experts™
on
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.



Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
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.
Distinguished Expert 2017

Commented:
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/
Top Expert 2011

Commented:
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.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Distinguished Expert 2017

Commented:
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.

Author

Commented:
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.

Author

Commented:
I prefer using grub as I could the variables anytime i want to..i don't want it to be permanent..

Author

Commented:
Any help is appreciated. Thanks.
Distinguished Expert 2017

Commented:
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)

Author

Commented:
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..
Distinguished Expert 2017
Commented:
disable  GDM (/sbin/chkconfig GDM off) which is the Gnome Desktop Manager.

When the system boots normally, what is the output from running /sbin/runlevel?
N 3, N 4, N 5?

Disabling the GDM service as outlined above, will maintain the same runlevel, but without starting the graphical display which is what you want.


Author

Commented:
Thanks. I am trying it now.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial