ADD THE SLIDER CODE HERE

2011年4月10日 星期日

Suspend info by suspen2

請參考 suspend2,一個讓你的 Linux 快速開機的好方法
網站 Howto 上說的 /proc/suspend2/ 是舊版的,新版的要在 /sys/power/suspend2 下找




  • 網站說的讓我有點困惑的一點是,因為我沒有 swap partition, 而 swapfile 取代又在我已經實驗成功之後才寫,我一開始是用 filewriter 描述的實作,而這會讓我困惑的是這個 filewriter 所需要用的 file 該怎麼產生,答案是,其實不必擔心,難怪 HOWTO 沒寫,請往下看。







  • 在 debian 上其實裝套件也就可以了,當然要修改 boot 參數,不過我後來是靠自行下載源碼裝的。基本上應該要裝 hibernate, suspend2-userui。我剛說我是下載源碼裝的,似乎不必裝 suspend2-userui。也就是說你只需要裝 hibernate 這個套件即可。







  • 當照著 HOWTO 說的設定 Hibernate 時,我是使用 filewriter, 因此編輯 /etc/hibernate/suspend2.conf 中的





  • FilewriterLocation /.suspend2 1000
     VerifyFilewriterResume2 yes
    
    • 接下來我是下 hibernate --no-suspend 就會自己產生 /.suspend2, 此時它會說 To correct this, add "resume2=file:/dev/sda2:0xedbe8" to your kernel command line.... 也就是把 "resume2=file:/dev/sda2:0xedbe8" 加到 /boot/grub/menu.lst 的開機參數裡,不過此時因為還沒設定好開機環境,因此得重開機,才能享受 suspend 的好處。
    ps: 上述說法,若以模組方式實作(或因為 debian 套件)有可能是錯的概念,不過反正也只是開個機,不重要。

    • 最後,要 suspend 我是下 hibernate 就完成了。
    轉自:http://scratchpad.wikia.com/wiki/User:Wade.fs/Suspend2

    沒有留言:

    張貼留言