On Sat, Dec 02, 2006 at 03:41:52PM +1100, Nigel Cunningham wrote: > Hi. > > On Fri, 2006-12-01 at 08:39 +0100, Stefan Seyfried wrote: > > So if somebody submits a patch that implements a "reset_signature" program, > > i'll include that in the suspend package. > > I don't know if you care (you might not want to support Suspend2), but Wrong, if i was to write such a "restore_signature" program, i'd want it to support all known ways of screwing up your SWAP partition :-) > for Suspend2 enabled kernels, you can just do: > > [ -f /sys/power/suspend2/image_exists ] && echo 0 > /sys/power/suspend2/image_exists > > You can cat the file to find out if an image exists, if you prefer (eg > from an initrd/ramfs). Return values are: But you need a suspend2-enabled kernel. For rescue purposes ("engineer on-site to repair the hardware, diagnosing with a rescue CD first" scenario), a standalone binary that resets the signature is probably better. But this engineer should also know if he depends on the UUID of the swap partition to find it. If he does not, he can simply do a "mkswap" to reset the signature. Best regards, Stefan -- Stefan Seyfried QA / R&D Team Mobile Devices | "Any ideas, John?" SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."