Gentoo Archives: gentoo-user

From: Hans-Werner Hilse <hilse@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Suspend to swap on a diskless host
Date: Wed, 23 May 2007 20:10:53
Message-Id: 20070523220514.e5358dcb.hilse@web.de
In Reply to: [gentoo-user] Suspend to swap on a diskless host by Dan Farrell
1 Hi,
2
3 On Wed, 23 May 2007 11:59:23 -0500
4 Dan Farrell <dan@×××××××××.cx> wrote:
5
6 > I know swapon doesn't work on regular files, so to add my swap I need
7 > to first use losetup to set up /dev/loop0 as my swap device. Then
8 > swapon /dev/loop0 works. but how can I enable swap on loop0 before the
9 > initscripts boot (right now I have it done in local.start). Don't I
10 > need to be able to mount the swap as swap right away to resume from
11 > it? Or will it be enought to specify the location? If not, is there
12 > some way to specify loop settings at boot time, on the kernel command
13 > line?
14
15 Check out userspace suspend (http://suspend.sf.net/). It's not in
16 portage, but will do what you want since you can resume from an initrd.
17 In the initrd, you can open a network connection, mount all that stuff
18 (you never told where that looped file is located, so I guess it's on
19 r/w NFS) and then resume. It's not implemented at the moment, I think,
20 but should be easy to add ("remote suspending" is mentioned as an
21 "easy" possibility).
22
23 -hwh
24 --
25 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Suspend to swap on a diskless host Dan Farrell <dan@×××××××××.cx>