Re: [TuxOnIce-users] read-only swap for keep-image-mode (on …

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nigel Cunningham
Date:  
To: TuxOnIce users' list
Subject: Re: [TuxOnIce-users] read-only swap for keep-image-mode (on flashdisk)
Hi.

On Thu, 2008-07-24 at 15:53 +0100, Antoine Martin wrote:
> Hi,
>
> I would like to save my image to swap but also ensure that the swap is
> not mounted (or just read-only). Is that possible at all?
>
> The idea is that the image is stored on a flash disk (in keep image
> mode), and the system does not use any swap at all.
> How can I ensure that no data is ever written to the disk? (obviously
> after I create my resume image).
> At the moment, I can only save the image if the swap partition is active
> and it remains active on restore...


It sounds like using the file allocator might suit your purposes better.
By writing the image to a file, you don't have to worry about whether
swap is enabled or not, and can still use keep-image mode.

Regarding the question "How can I ensure that no data is ever written to
the disk", I'd be remounting the filesystems read-only prior to
hibernating. If you need temporary storage (as you almost certainly
will), use tmpfs (ram based storage) - it can be mounted --bind if
necessary and any changes will persist only until the next powerdown /
resume.

Hope that helps.

Nigel