Solved

Edit boot grub

Posted on 2011-09-03
11
335 Views
Last Modified: 2012-05-12
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.



0
Comment
Question by:zizi21
  • 5
  • 4
  • 2
11 Comments
 
LVL 21

Expert Comment

by:Papertrip
ID: 36479231
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.
0
 
LVL 76

Expert Comment

by:arnold
ID: 36479270
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/
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36479286
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.
0
 
LVL 76

Expert Comment

by:arnold
ID: 36479292
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.
0
 

Author Comment

by:zizi21
ID: 36479299
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.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:zizi21
ID: 36479301
I prefer using grub as I could the variables anytime i want to..i don't want it to be permanent..
0
 

Author Comment

by:zizi21
ID: 36479303
Any help is appreciated. Thanks.
0
 
LVL 76

Expert Comment

by:arnold
ID: 36479312
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)

0
 

Author Comment

by:zizi21
ID: 36479328
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..
0
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
ID: 36479330
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.


0
 

Author Comment

by:zizi21
ID: 36480115
Thanks. I am trying it now.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now