Boot Ubuntu INto command line

Status
Not open for further replies.

Zeeshan Quireshi

C# Be Sharp !
i am using ubuntu 6.10 edgy eft , what i wanna do is that i wanna make a grub boot entry so that when i boot using that entry i get only command-line and no x server or graphical login screen .
 

unni

In the zone
EDIT: I tried this in Ubuntu and found that it won't work. So, please ignore my post.:sad::roll:

This is a temporary method for testing:
When in grub OS selection menu, select the Ubuntu grub entry and press 'e'. Now, select the line which looks like
kernel (hd0,6)/vmlinuz-2.6.17-10-generic root=/dev/hdb9 ro quiet splash splash=verbose
. Again, press 'e'. Now you can edit this line. Add '2' or '3' at the end of the line so that it looks like
kernel (hd0,6)/vmlinuz-2.6.17-10-generic root=/dev/hdb9 ro quiet splash splash=verbose 2
. Now press enter. Then press 'b' to start booting. If you boot into the command line mode as expected, you can make this permanent by editing the /boot/grub/menu.lst file.

To edit the file,

1. Launch terminal. Type su and enter.
2. Now type gedit /boot/grub/menu.lst
3. Copy the Ubuntu entries in the file. There may be 3 to 6 lines for each OS. It begins with "title Ubuntu " and may end with either "initrd ...." or "boot" (I don't remmeber clearly.
4. Paste them after the last line in the file. Now add 2 or 3 as in the above method. Finally, it will look something like this (only the necessary portion of the file is shown here):
title Ubuntu, kernel 2.6.17-11-generic
root (hd1,0)
kernel /vmlinuz-2.6.17-11-generic root=/dev/hdb9 ro quiet splash
initrd /initrd.img-2.6.17-11-generic
quiet
savedefault
boot

title Microsoft Windows
root (hd0,0)
makeactive
chainloader +1

title Ubuntu, kernel 2.6.17-11-generic
root (hd1,0)
kernel /vmlinuz-2.6.17-11-generic root=/dev/hdb9 ro quiet splash 2
initrd /initrd.img-2.6.17-11-generic
quiet
savedefault
boot
Here, the values 2 and 3 indicates the runlevel. 3 means you will have netwroking support + everything available in 2.

I have tried this only on Mandriva. That's why I mentioned the temporary method first. If this didn't work for you, post back and wait for the experts. Sorry if I oversimplified this.
 
Last edited:

praka123

left this forum longback
Debian and Ubuntu has different runlevels while compared to mandrake,suse,fedora etc

default runlevel is 2.while S is single user or 1 also.
3,4,5 are simply the same as runlevel 2;and runlevel 6 will reboot,0=halt

for getting direct CLI,you may need to stop gdm from executing:rolleyes:
One solution is to boot into single user level via grub kernel line appnended with a "1" .after reaching single user,run "telinit 2" will get a CLI without gdm started.

*wiki.ubuntu.com/ReplacementInit?action=show&redirect=upstart

Debian and Ubuntu from edgy onwards uses a replacement for sysVinit called upstart.upstart will make booting much speeder by executing scripts asynchronously or by parallel execution of boot time scripts thus speeding up thus i feel is superior than other distros.though InitNG exists for distros like Gentoo.

edit:solution:
In which case, this may work, although I'll add the caveat that I haven't tried this myself. By default Ubuntu starts at runlevel 2, and 3 -5 are just duplicates. Create /etc/inittab as discussed earlier, and set the default runlevel to be 3. Edit the files in /etc/rc3.d to meet your requirements. Specifically the file named /etc/rc3.d/S13gdm starts your X session, so if you delete this (or for safety move it to another location), and then (re)start into runlevel 3, your X session will not start.
source:
*www.experts-exchange.com/OS/Linux/Q_22115162.html
 

mehulved

18 Till I Die............
Yeah the best solution is to disable xserver from your default run level.
prakash, yeah gentoo can use init-ng and a few more too.
 

praka123

left this forum longback
beware of what u r trying to do:
move the file /etc/rc3.d/S13gdm to some place in your home folder
Code:
 ~$sudo  mv  -i    /etc/rc3.d/S13gdm      ~/
afterwards edit /boot/grub/menu.lst
and add at the last line:
Code:
title           Ubuntu Edgy
root            (hdx,x)
kernel          /vmlinuz-2.6.17-11-generic root=/dev/sdaxx ro quiet splash [U][B]3[/B][/U]
initrd          /initrd.img-2.6.17-11-generic
quiet
savedefault
boot
reboot and try this option
 

eddie

El mooooo
imo the following link will be better suited for your requirement.
*ubuntuforums.org.nyud.net:8090/showthread.php?t=43516

P.S. Ubuntu Forums are currently down, thus giving a CDN link.
 
Status
Not open for further replies.
Top Bottom