|
Taking It on the Run |
Have laptop, will travel. Here's how to make life easier for a nomadic system that is occasionally connected to a networkBy Jan Säll The creation of small-in-size but big--as in powerful--portable computers has made it relatively easy to run a Unix system on today's laptops. With the good color screens and big disks, you can actually take a full Unix system with all the development utilities, and even the X Window System, with you wherever you go without compromise (see ``Good to Go!,'' a review of laptops running Unix in the January 1994 issue of Open Computing print magazine (article not available on this Web site). One problem, however, is that most new portable computers have a docking station, which allows you to take advantage of add-ons, such as I/O cards, when your system is docked. But after setting your system up to work the way you want in the office, you don't want to lose that time investment when you hit the road. You don't want to hassle with modifying your system settings each time you dock. One way to easily reconfigure the portable system so it can work with or without a network connection is to make use of Unix's run levels. Run levels determine which mode your Unix system is running in, for example single-user, multiuser, or maintenance mode. (Run levels were most recently covered in the December 1993 UnixWorld print magazine Tutorial, ``Setting Up Your System at Start-Up.''), not yet available on the Web site. In my setup, I use run level 2 for standalone work outside the office with TCP/IP started just on the loopback driver to get my X server up and running. When I am in the office, I have a docking station with Ethernet cards in it to get me connected to the company network. I then use run level 3 to get TCP/IP to run over the Ethernet card. I have also moved the start-up of the Network File System (NFS) from run level 2 to 3, basically to avoid too many processes on the system when running standalone. Besides, what's the use for NFS when you're running standalone? My portable system is an AST Power Exec 4/25 ColorPlus with 8 megabytes of RAM and loaded with The Santa Cruz Operation Inc.'s Unix. This version of SCO resembles System V Release 4 Unix versions, such as Solaris 2.3 or Unixware, in the use of run levels, although some of the commands I will describe differ from SVR4. Because the Unix system is designed to be up and running all
the time, much of the cleaning up is done by Network ConfigurationWe will use SCO's The This standard configuration also means that when you want to change or remove a chain, it can be done with one command and without risk of forgetting anything. Though my example will be targeted for SCO systems, and all examples will be from an SCO system, the same idea can be used on other systems; however, you'll have to check out the different command and locations for the system and configuration files. Where to Run to?The Unix system provides different levels of system readiness, called run levels. The levels, described below, include system shutdown, single-user state, and multiuser mode, and can be configured to do other things.
There is one strange thing about the SCO setup. Despite the
fact that SCO doesn't use run level 3 as remote file sharing,
they ship the system well adopted to do so. The
Safety FirstWhen we are about to modify the start-up activity of the system and there is a risk that we will make an error, it's very important to have an emergency boot floppy set. Make the emergency boot floppy using the command line ``mkdev fd'' (for SCO only). After you've taken care of the safety aspects, the next thing to do is get the system up and running on its own without any fancy things such as Ethernet cards and so on. Install the system in the standard way to get everything working. If you, like myself, are installing an SCO Open Server Enterprise System, the standard configuration is designed for a lot of terminals and you can get better performance if you turn down some of the kernel tables. I gained at least one megabyte of memory by doing this step. I will probably want the X server-X desktop to work (what else would you have a portable Unix system for?), which means you have to have TCP/IP up and running (over the loopback driver) even if you are running totally standalone. The standard installation does this part. The standard installation also installs NFS so it starts up
when the system goes into multiuser mode (level 2). You can save
some time in the start-up processes and some memory and processes
by moving NFS to level 3. This task is accomplished by moving
Setting Up Run LevelAfter moving NFS start-up to level 3, there are some other
files that are involved in setting up level 3. The first version
is the streams and socket configuration file
The other files that are involved are linked together, so we
should be careful to preserve this connection in an orderly
manner. The program We need to make a small adjustment to either
To get TCP/IP to start locally when we enter run level 2, we
need copies of the start files in What's left now is to get the different streams configuration
files to be used in the different start-up files--remember that
these files were copied, not linked. We therefore edit
We now run Testing, Testing...I start out by testing that we can get up to multiuser mode
(run level 2). If this configuration works, we can start to use
When we start up the system in run level 2, we start up TCP/IP with just the local loopback driver. When we start up run level 3, the old TCP/IP system is stopped, and then we start it up again but with the network card enabled. After that NFS is started. If you have other software that depends on TCP/IP, you should arrange so it is first stopped and then started again if it cannot handle a stop. SCO-Login handles it fine. When we stop the system, we enter It is important that we start up run level 2 first, so that all processes needed for the multiuser environment will get started, and then start up run level 3. Clean UpNow we basically have a running portable Unix system, but one
thing remains. Because Unix is designed to be up and running for
a long time each time it gets started, a lot of log files are
created during system start. Also because Unix systems would
normally be up and working during the night, a lot of cleaning is
scheduled by The plan I use is a script that is started late in the shutdown process, just before the system is halted and after all other things are stopped. The way to get this effect is to make an ``S'' script in the
The This clean-up script seems to clean up most of the files on my system. Timing Is EverythingBecause it's a bit new to run Unix on a small PC designed to run DOS, I should mention the amount of time taken to start and stop the system. On my system, it takes 115 seconds to start up the system from boot prompt (the SCO boot manager that you can use to select a different operating system to boot) to multiuser mode (run level 2). To change from run level 2 to 3 takes about 70 seconds. To shut down the system from multiuser mode (run level 2) takes 80 seconds, and if we shut down directly from run level 3, it takes 110 seconds. The new more powerful portables can be a real benefit to those who have to take their work with them. I hope this tutorial has put you on the right track to getting your laptop system up and running at work and on the road.[] |
Print This Page Send as e-mail |












