Subject: Re: port-i386/37009: unable to use swap partition found on USB drive
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: James Hartley <jjhartley@gmail.com>
List: netbsd-bugs
Date: 09/20/2007 22:10:04
The following reply was made to PR port-i386/37009; it has been noted by GNATS.

From: "James Hartley" <jjhartley@gmail.com>
To: "Jeremy C. Reed" <reed@reedmedia.net>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-i386/37009: unable to use swap partition found on USB drive
Date: Thu, 20 Sep 2007 15:07:39 -0700

 On 9/20/07, Jeremy C. Reed <reed@reedmedia.net> wrote:
 > Looks like both /etc/rc.d/swap[12] scripts have:
 >
 >  load_rc_config swap
 >
 > I thnk they should be:
 >
 > load_rc_config swap1
 >
 > and
 >
 > load_rc_config swap2
 >
 > So either fix those rc.d scripts or name your rc.conf.d script as swap
 > (not swap1).
 
 Renaming the script to "swap" does delay swapctl from adding swap
 partitions until all USB devices have been detected.  Afterwards, all
 swap partitions defined in /etc/fstab appear initialized:
 
 $ swapctl -l
 Device      512-blocks     Used    Avail Capacity  Priority
 /dev/sd0b      4096150    10528  4085622     0%    0
 /dev/sd1b      2048000    10592  2037408     1%    0
 Total          6144150    21120  6123030     0%
 $
 
 Tangentially, I also see the following messages at the end of the
 boot-time initializations:
 
 ...
 Mounting all filesystems...
 Clearing /tmp.
 Creating a.out runtime link editor directory cache.
 Checking quotas: done.
 delaying swapctl for 60 seconds...               <<<<<
 Starting virecover.
 Starting local daemons:.
 Updating motd.
 Starting sshd.
 postfix/postfix-script: starting the Postfix mail system
 Starting inetd.
 Starting cron.
 Thu Sep 20 14:52:31 PDT 2007
 NetBSD/i386 (*****) (console)
 
 login:
 
 Why is /etc/rc.conf.d/swap being called a second time?
 
 Thanks.
 
 Jim