Re: booting ,different configurations
"Caoilte O'Connor" <email@example.com> writes:
> I've got several services installed on my laptop that I don't always use
> (db+webserver for example).
> What would be the best way of configuring my system such that I can
> choose an option on my grub boot menu for which services I want
> I've tried looking at rc.d etc man pages, but find the documentation geared
> towards other problems. I also can't find any information on what arguments
> I'd have to make grub pass the kernel.
It sounds like you're on the right path. I'd frob the links in
/etc/rc?.d; Debian's default runlevel is 2, and then 3, 4, and 5 are
(again by default) configured identically. Runlevels 0, 1, and 6
are reserved (for shutdown, single-user, and reboot, respectively).
So you might set up runlevel 2 for no network, 3 for network with an
sshd but nothing else, 4 for network with ssh, Apache, and PostgreSQL,
probably by changing some of the S links in /etc/rc2.d and /etc/rc3.d
to K links. Then you can pick which one to boot into by adding '2',
'3', or '4' to the kernel command line, and change by running 'telinit
3' as root once you've booted. You could even change your GRUB
menu.lst file to have
title Debian GNU/Linux, all services
kernel /vmlinuz root=/dev/hda1 4
(where the "4" at the end is the magic bit).
 ...except, bizarrely, that six console logins gets started in
runlevels 2 and 3 but only one in 4 and 5. This is easy enough to
change in /etc/inittab, though.
David Maze firstname.lastname@example.org http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell