Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: cks@white.toronto.edu (Chris Siebenmann) Newsgroups: comp.sys.sun Subject: Re: Kernel Building and config Keywords: SunOS Message-ID: <89Apr10.183733edt.30759@snow.white.toronto.edu> Date: 25 Apr 89 19:55:47 GMT References: <8903282216.AA03588@asimov.tots.uucp> Sender: usenet@rice.edu Organization: University of Toronto, CSRI Lines: 48 Approved: Sun-Spots@rice.edu Original-Date: Mon, 10 Apr 89 18:37:32 EDT X-Sun-Spots-Digest: Volume 7, Issue 248, message 1 of 13 At least on Ultrix 2.2, I found out you had to do TWO things to get the kernel to swap on more than one partition: You had to build a kernel configured to swap on your chosen partitions. This has to be done because the kernel sizes up your total possible swap space (and allocates data structures based on this size) only at boot time. To do this, it has to look at how big each swap partition is, so it has to know what they are. For example, the config file for our fileserver (a Vaxserver 3600) has the config line # Our normal VMUNIX; two swap areas (drive 0 and drive 1) with the # root on drive 0. config vmunix root on ra0a swap on ra0b and ra1b dumps on ra0b to enable the kernel to swap on partition b of both our RA82 disks. However, when the system comes up, it only starts swapping on the first partition specified -- presumably this is so a single-user boot only relies on having one disk up and running, instead of all of the disks the kernel swaps on. So, you have to enable swapping on the additional partitions via the swapon(2) system call. This is done by using /etc/swapon in /etc/rc; usually "/etc/swapon -a" to take all the partitions of type swap from /etc/fstab and have the kernel start swapping on them. If you omit the config step, /etc/swapon gives an error (the kernel checks to see if the partition you're trying to start swapping on has been configured in and aborts if it hasn't). If you omit the /etc/swapon step, you get a kernel which is all ready to swap on additional partitions, but hasn't had them enabled yet. I hope this has been useful in clearing up some of the confusion. [Note: I have checked manpages on SunOS 3.5 and 4.0 systems, and swapon(2) and swapon(8) are documented there. I haven't actually had to configure a Sun for multi-partion swapping, but the 3.5 kernel source for that bit looks the same as the Ultrix and 4.3BSD source.] -- "I shall clasp my hands together and bow to the corners of the world." Number Ten Ox, "Bridge of Birds" Chris Siebenmann ...!utgpu!{ncrcan,ontmoh!moore}!ziebmef!cks cks@white.toronto.edu or ...!utgpu!{,csri!}cks [[ I don't know about anybody else, but when we configured a kernel for a 4.0.1 system, we had to use the following string in the config line: "swap on xy0b swap on xy1b". Using "and" was not sufficient. But we may have just been suffering from brain damage at the time. --wnl ]]