DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
Old 13th August 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Gosha, you may eventually find it useful to conduct your own basic research, rather than asking here, or guessing and hoping. Self-sufficiency can be learned, and would be significantly faster than posting and waiting for a reply here.

For instance, FAQ section 14.4, called "How is swap handled?", would have given you a great deal of useful information. Here is a relevant excerpt:
Code:
 14.4.2 - Swapping to a partition

On OpenBSD, the 'b' partition of the boot drive is used by default and automatically for swap. 
No configuration is needed for this to take place. If you do not wish to use swap on the boot disk, 
do not define a "b" partition. If you wish to use swap on other partitions or on other disks, you 
need to define these partitions in /etc/fstab with lines something like:
/dev/sd3b none swap sw 0 0 /dev/sd3d none swap sw 0 0
And it further goes on to describe swapctl(8) and other ways to define and create swap areas.

Had you been interested enough to want to learn for yourself how the OS manages swap at boot up, you might have looked at the /etc/rc script started by init(8) on boot. It contains this command:
Code:
swapctl -A -t noblk
Examining the swapctl man page, you might have learned both confirming and clarifying info about the boot disk swap space, as well as what that swapctl command actually does:
Code:
     Note: The initial swap device (root disk, partition b) is handled auto-
     matically by the kernel and does not need to be added to /etc/fstab or
     added via swapctl.  It will show up as "swap_device" in the output dis-
     played with the -l flag.
.
.
.
     -A      This option causes swapctl to read the /etc/fstab file for de-
             vices and files with an ``sw'' type, and adds all these entries
             as swap devices.  If no swap devices are configured, swapctl will
             exit with an error code.
.
.
.
     -t blk|noblk
             This flag modifies the function of the -A option.  The -t option
             allows the type of device to add to be specified.  An argument of
             blk causes all block devices in /etc/fstab to be added.  An argu-
             ment of noblk causes all non-block devices in /etc/fstab to be
             added.  This option is useful in early system startup, where
             swapping may be needed before all file systems are available,
             such as during disk checks of large file systems.

Last edited by jggimi; 13th August 2009 at 11:55 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Operating BSD partitions through XP SunSpyda OpenBSD General 10 16th September 2009 08:22 PM
How to swap partitions Help revzalot OpenBSD Installation and Upgrading 2 1st September 2009 07:44 AM
backup fdisk partitions gosha OpenBSD General 17 16th July 2009 03:19 AM
Moving ZFS partitions/drives between systems corey_james Guides 2 6th August 2008 08:36 PM
partitions italogf FreeBSD Installation and Upgrading 5 7th July 2008 12:14 PM


All times are GMT. The time now is 09:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick