Customizing startup
I've been reading a good bit about run-levels and run-level scripts, and I'm burgeoning with newbie questions about customizing run-levels and startup and the like. I would like to know the best way to implement an idea that I have, or if the idea is even a good idea or not.
First: I'm running Red Hat 7.3 on my laptop. I use a PCMCIA CardBus PC card NIC, and when booting, an error is generated because, as far as I can tell, the system tries to initialize the network before PCMCIA is initialized. An excerpt from my boot.log:
May 25 11:10:08 laptop network: Setting network parameters: succeeded May 25 11:10:09 laptop network: Bringing up loopback interface: succeeded May 25 11:10:10 laptop ifup: tulip device does not seem to be present, delaying eth0 initialization. May 25 11:10:10 laptop network: Bringing up interface eth0: failed May 25 11:10:25 laptop xinetd: xinetd startup succeeded May 25 11:10:30 laptop nfs: Starting NFS services: succeeded
And here is my /etc/rc.d/rc5.d directory:
K12mysqld K74ntpd S12syslog S25netfs S60nfs S91smb K24irda S05kudzu S13portmap S26apmd S80sendmail S95anacron K46radvd S08ipchains S14nfslock S28autofs S85gpm S95atd K50snmpd S08iptables S17keytable S56rawdevices S85httpd S97rhnsd K50snmptrapd S09isdn S20random S56xinetd S90crond S98wine K65identd S10network S24pcmcia S60lpd S90xfs S99local
Everything works fine once PCMCIA is initialized; all of the network functions carry out normally. It's just annoying to have that error pop up every time I boot.
So, I'm wondering (a) if it would be possible to either move PCMCIA initialization to before network initialization, or move network initialization to after PCMCIA initialization; (b) if this would be wise/recommendable; and (c) what this would/could impact if I screw it up. I'm assuming that to change the order, I would just have to rename the links in the rc5.d directory (and presumably in the others, too) to reflect a different order—is this correct?
Second: As I'm fooling around with Linux and learning the ropes, I'm running a lot of different stuff. One of the main things I'm planning on doing with this system is to run an LJ test server. That means httpd, mysql, maintenance routines, and a bunch of daemon processes that are a bit of a strain on my aging system—i.e. it gets pretty slow. That's fine, when I'm using it a server—I can wait—but this thing is also my PC, and there's no sense in taking up all of those resources when I'm just surfing the web, and not doing anything with them at the moment. Also, there are times when I'm using the laptop when I'm away from the LAN, and don't really need any network daemons running at all, I don't think.
I know how to shut down the different daemons and such manually (/etc/init.d/whatever_daemon stop, correct?), but I'm wondering if there would be a way (and I'm sure there is, somehow) to set up separate startup procedures for the different uses of the system—say, one for general PC use with the GUI, and without a lot of the server processes; one for mobile use, away from the network, with the GUI, but no network daemons; and one for server use, with all of the server processes, but not necessarily any GUI (as that just makes it slower, I'm sure).
From what I've been reading about run-levels, it sounds to me like they do exactly what I'm wanting to do. I could have a general use run-level, a mobile run-level, and a server run-level. Is that possible? How would I go about doing that? Or is there another, more reasonable way?
Also, if I do set up different run-levels (or whatever I end up doing to solve this particular problem), could I add them to the GRUB startup menu, so that I could choose my configuration at the get-go?
Thanks in advance.
