Re: suspend & debian testing (etch) & linux-image-2.6.17-2
Mikhail Gusarov <dottedmag@dottedmag.net> writes:
> You (p.kolya@gmail.com) wrote:
NP> Но таким образом боюсь вобще нечаянно убить систему (читал, что
NP> можно таким образом).
> Бред.
/usr/src/linux/Documentation/power/swsusp.txt
Some warnings, first.
* BIG FAT WARNING *********************************************************
*
* If you touch anything on disk between suspend and resume...
* ...kiss your data goodbye.
*
* If you do resume from initrd after your filesystems are mounted...
* ...bye bye root partition.
* [this is actually same case as above]
*
* If you have unsupported (*) devices using DMA, you may have some
* problems. If your disk driver does not support suspend... (IDE does),
* it may cause some problems, too. If you change kernel command line
* between suspend and resume, it may do something wrong. If you change
* your hardware while system is suspended... well, it was not good idea;
* but it will probably only crash.
*
* (*) suspend/resume support is needed to make it safe.
*
* If you have any filesystems on USB devices mounted before suspend,
* they won't be accessible after resume and you may lose data, as though
* you have unplugged the USB devices with mounted filesystems on them
* (see the FAQ below for details).
Я не пользуюсь uswsusp -- лениво настраивать, а суспендюсь таким скриптом:
#!/bin/sh
case "$1" in ( reboot | shutdown | platform )
if [ "$2" == "" ] ; then echo "2147483648" > /sys/power/image_size
else echo "$2" > /sys/power/image_size
fi
echo "$1" > /sys/power/disk; echo disk > /sys/power/state
;; esac
sleep 1
cat `cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u` > /dev/null
swapoff -a; swapon -a
Первый параметр скрипта -- reboot или shutdown либо platform
вторым параметром передаю допустимый размер имиджа (как можно побольше).
А для резума передать ядру параметр resume=/dev/<своп-раздел_для_имиджа>
--
Роман
конец связи
Reply to: