[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#573741: initramfs-tools: patch to allow tuxonice to resume from swap filesystem on LVM



reassign 573741 tuxonice-userui
stop

On Sat, 13 Mar 2010, Takeshi Hamasaki wrote:

> 
> *** Please type your report below this line ***
> lvm2 script doesn't recognize resume=swap:/dev/XXXXXX in kernel command line
> option, and also resume script doesn't know how to trigger resume sequence
> for TuxOnIce.
> 
> I attach diff files for both script.

thanks.

the point of initramfs-tools is to operate on sweet vanilla linux-2.6.
If you care to have additional features and bugs of respective additional
packages, they may provide appropriate hooks.

thus reasigning to tuxonice.
 
 
> 
> -- Package-specific info:
> -- /proc/cmdline
> BOOT_IMAGE=/vmlinuz-2.6.32tuxonice root=/dev/mapper/skypalte-root
> resume=swap:/dev/mapper/skypalte-swap-1 ro quiet
> 
> 
> -- /etc/kernel-img.conf
> # Kernel image management overrides
> # See kernel-img.conf(5) for details
> do_symlinks = yes
> relative_links = yes
> do_bootloader = yes
> do_bootfloppy = no
> do_initrd = yes
> link_in_boot = no
> postinst_hook = update-grub
> postrm_hook   = update-grub
> 
> -- /etc/initramfs-tools/initramfs.conf
> MODULES=dep
> BUSYBOX=y
> KEYMAP=n
> BOOT=local
> DEVICE=eth0
> NFSROOT=auto
> 
> 
> -- System Information:
> Debian Release: squeeze/sid
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 2.6.32tuxonice (SMP w/2 CPU cores)
> Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
> (ignored: LC_ALL set to ja_JP.UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages initramfs-tools depends on:
> ii  cpio                         2.10-1      GNU cpio -- a program to manage ar
> ii  findutils                    4.4.2-1     utilities for finding files--find,
> ii  klibc-utils                  1.5.15-1    small utilities built with klibc f
> ii  module-init-tools            3.12~pre1-1 tools for managing Linux kernel mo
> ii  udev                         151-2       /dev/ and hotplug management daemo
> 
> Versions of packages initramfs-tools recommends:
> ii  busybox                       1:1.14.2-2 Tiny utilities for small and embed
> 
> initramfs-tools suggests no packages.
> 
> -- no debconf information

> --- usr/share/initramfs-tools/scripts/local-top/lvm2.orig	2009-11-07 01:12:16.000000000 +0700
> +++ usr/share/initramfs-tools/scripts/local-top/lvm2	2010-03-12 22:24:03.000000000 +0700
> @@ -40,12 +40,18 @@
>  	# Make sure that we have a d-m path
>  	dev="${dev#/dev/mapper/}"
>  	if [ "$dev" = "$1" ]; then
> -		return 1
> +
> +		# try again for TuxOnIce:
> +		dev="${dev#swap:/dev/mapper/}"
> +		if [ "$dev" = "$1" ]; then
> +			return 1
> +		fi
>  	fi
>  
>  	eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev")
>  
>  	if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ]; then
> +echo "vgname = $VM_VG_NAME , lvname = $DM_LV_NAME"
>  		lvm lvchange -aly --ignorelockingfailure "$DM_VG_NAME/$DM_LV_NAME"
>  		rc=$?
>  		if [ $rc = 5 ]; then

> --- usr/share/initramfs-tools/scripts/local-premount/resume.orig	2009-04-03 19:30:43.000000000 +0700
> +++ usr/share/initramfs-tools/scripts/local-premount/resume	2010-03-12 22:38:03.000000000 +0700
> @@ -49,6 +49,14 @@
>  UUID=*)
>  	resume="/dev/disk/by-uuid/${resume#UUID=}"
>  	;;
> +swap:/dev/mapper/*)
> +	# TuxOnIce.
> +	DO_RESUME=/sys/power/tuxonice/do_resume 
> +
> +	# pull the trigger to resume
> +	[ -e $DO_RESUME ] || exit
> +	echo 1 > $DO_RESUME 
> +	;;
>  esac
>  
>  [ ! -e "${resume}" ] && exit 0

-- 
maks



Reply to: