[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new to debian have questions



abram olson wrote:

I'm new to debain although I've been using mandrake
and freebsd for a while.

I have a few questions that I've been up all night
trying to figure out.  Any help will be greatly
appreciated!

1.  I prefer my machine to boot to a command prompt
not to boot into X. Its set up to be using gdm. Where do I change this? Can someone point me to a
good explanation of how debian boot scripts are
organized? Which init level is multi-user without X? In mandrake its 3 but that is halt in bsd if I'm
remembering correctly so.....


One method would be to uninstall gdm:
	apt-get remove gdm

The basic boot sequence is like so:

The PC's BIOS runs it's Power-On-Self-Test (POST), and then looks for more boot information.

It finds that boot info, say, in the Master Boot Record (MBR) of the hard drive. In our case we'll assume it's LILO.

LILO then load the kernel.

The kernel then loads init, using /etc/inittab as its configuration file.

/etc/inittab defines the default run level, and what should be done for each run level.

The first script it runs is /etc/init.d/rcS, then it drops down and runs (usually) the default run level (usually 2); this line looks like:
	l2:2:wait:/etc/init.d/rc 2

This line runs /etc/init.d/rc with the parameter 2.

The /etc/init.d/rc script in turn runs the scripts in /etc/rc2.d/ (because the parameter 2 above indicates rc2 as opposed to rc3, etc).

In this directory are several scripts, either starting with K or S. The K scripts are "K"ill scripts, and are usually used for turning off services, etc during a shutdown or a switch to a different runlevel. The S scripts are "S"tartup scripts, to start services when switching to a different runlevel. They are numbered according to the order in which they should run. So a script named S10exim will run before S99gdm, but both will run after K05login, because K scripts run first.

These scripts are usually symbolic links to the actual scripts in /etc/init.d. (This way you don't have to duplicate scripts in each of several runlevels; you only have one script, and then duplicate the symlinks in the different runlevels, so that if you change a script, you only have to change one instead of several).

So, putting all this together, another way to keep gdm from running is to rename/delete the symlink that starts it (on my machine it's /etc/rc2/S99gdm), or to rename/delete the actual script (on my machine it's /etc/init.d/gdm).

You can also manually start/stop/restart gdm (or other services) by running the script (or symlink) with the parameter start, stop, or restart, like so:
	/etc/init.d/gdm stop



<snip>




Abe





Reply to: