TuxOnIceã¨hibernate-scriptã«é¢ãã追å ã¡ã¢(Ubuntu 11.04æç¹)
Ubuntu 11.04ã«ãããå人çãªã¡ã¢
Ubuntu 11.04ä¸ã§PPAã®ãtuxoniceããªã«ã¼ãã«ãç¨ããã«ã«ã¼ãã«ã½ã¼ã¹ããæåã§ããããå½ã¦ã¦TuxOnIceãæå¹ã«ããã«ã¼ãã«ããã«ãããéã®ã¡ã¢ã¨ãªãã
ä¼æ¢æã®æ¸ãè¾¼ã¿å
ã¯ã¹ã¯ãããã¼ãã£ã·ã§ã³ã¨ãããã¤ãOSã¤ã³ã¹ãã¼ã«æã«ã¯ã¹ã¯ãããã¼ãã£ã·ã§ã³ã¯ä½æããªãã£ã(å¾ããæåã§è¿½å ãã)ãã®ã¨ãããã¾ããPPAã®ã«ã¼ãã«ã¯ä½¿ç¨ãã¦ããªãããåPPAã®hibernate-scriptã¨tuxonice-useruiã«ã¤ãã¦ã¯ãã¼ã¸ã§ã³ãææ°ãªã®ã§ä½¿ç¨ãã¦ããã
ãããã®é©ç¨å¤±æé¨åã«ã¤ãã¦
é常ã¯Ubuntuã®ã«ã¼ãã«åãã®ããããç½®ãã¦ããã®ã ãã11.04åãã®ãã®ããªãã£ãã®ã§Linux 2.6.38åãã®ããã(tuxonice-3.2-for-2.6.38.patch.bz2)ãé©ç¨ãããã¨ããã®ã ããä¸ç®æãã¾ãé©ç¨ãããªãé¨åãåºããããããé©ç¨ã§ããªãã£ãé¨åã®å
容ãè¦ãã¨
[転è¼]ãã¡ã¤ã«å: linux-source-2.6.38/include/linux/swap.h.rej
--- include/linux/swap.h +++ include/linux/swap.h @@ -342,11 +345,15 @@ extern int free_swap_and_cache(swp_entry_t); extern int swap_type_of(dev_t, sector_t, struct block_device **); extern unsigned int count_swap_pages(int, int); +extern sector_t map_swap_entry(swp_entry_t entry, struct block_device **); extern sector_t map_swap_page(struct page *, struct block_device **); extern sector_t swapdev_block(int, pgoff_t); +extern struct swap_info_struct *get_swap_info_struct(unsigned); extern int reuse_swap_page(struct page *); extern int try_to_free_swap(struct page *); struct backing_dev_info; +extern void get_swap_range_of_type(int type, swp_entry_t *start, + swp_entry_t *end, unsigned int limit); /* linux/mm/thrash.c */ extern struct mm_struct *swap_token_mm;
ä¸ã®éãã追è¨é¨åãããªãã£ããããæåã§linux-source-2.6.38/include/linux/swap.hã«ã+ãã®è¡ã追è¨ããå½¢ã§é©ç¨ã¯ã§ãããã«ããéã£ãã
ã«ã¼ãã«ã®è¨å®
TuxOnIceé¢ä¿ã®è¨å®é ç®ã¨LZFå§ç¸®ã«é¢ããè¨å®ã¯ã«ã¼ãã«çµã¿è¾¼ã¿ã¨ããã
åæRAMãã£ã¹ã¯ã¤ã¡ã¼ã¸(initrd/initramfs)å ã®è¨å®
ãã«ãããã«ã¼ãã«ã使ã£ã¦è©¦ãããä½æ
ããã¾ã復帰ãã§ãããè²ã
ã¨èª¿ã¹ã¦ããä¸ã§
http://debian.fam.cx/index.php?Software%2FSuspend#z00b7861
ãè¦ã¤ããããã«è²¼ãä»ãããã¦ãã
- /etc/initramfs-tools/scripts/local-premount/tuxonice
- /etc/initramfs-tools/hooks/tuxonice
ã®2ãã¡ã¤ã«ã(管çè
権éã§)ç¨æ/é
ç½®ããä¸ã§(ã«ã¼ãã«çµã¿è¾¼ã¿æåãã®)復帰ã®ããã®è¨å®ã
[ä¸é¨]ãã¡ã¤ã«å: /etc/default/grub
GRUB_CMDLINE_LINUX="resume=UUID=[ã¹ã¯ãããã¼ãã£ã·ã§ã³ã®UUID]"
ä¸ã®ããã«è¨è¿°ããä¸ã§update-grubã¨update-initramfsã管çè 権éã§å®è¡ãããã¨ã§ãã¾ã復帰ãã§ããããã«ãªã£ãã
pm-utilsããhibernate-scriptãç¨ãã
ãã¹ã¯ãããç°å¢ã®ã¡ãã¥ã¼é
ç®ããã¤ããã¼ãããpm-hibernateã³ãã³ãããhibernate-scriptãç¨ãã¦ä¼æ¢/復帰ãè¡ãã«ã¯ãSLEEP_MODULEã®å¤ã«ãhibernateããæå®ããã°ããã¨ãããã¨ãåãã£ãã
[ä»»æ]ãã¡ã¤ã«å: /etc/pm/config.d/00sleep_module
SLEEP_MODULE=hibernate
ããã§ãä¸è¨æä½ãè¡ã£ãã¨ãã«ãhibernate-scriptãç¨ãã¦ä¼æ¢/復帰æã®åä½ãç´°ããå¶å¾¡ã§ããããã«ãªã£ãã
é¢é£è¨äº:
- UbuntuでTuxOnIceを用いる(Ubuntu 10.10時点・前半)
- UbuntuでTuxOnIceを用いる(Ubuntu 10.10時点・後半)
- Debian/Ubuntuでカーネルソースパッケージからカーネルパッケージを作成する(前半)
- Debian/Ubuntuでカーネルソースパッケージからカーネルパッケージを作成する(後半)
使ç¨ãããã¼ã¸ã§ã³: