LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-29-2012, 03:45 PM   #1
fl0
Member
 
Registered: May 2010
Location: Germany
Distribution: Slackware
Posts: 105

Rep: Reputation: 34
Slackware64 14 suspend to disk with swapfile broken


Hi,

i have set up a swapfile instead a swap partition on a fresh slackware64 14.0 system

Code:
root@orion7:~# dd if=/dev/zero of=/swapfile bs=1M count=4096
root@orion7:~# mkswap /swapfile 
Setting up swapspace version 1, size = 4194300 KiB
no label, UUID=55751e8f-2792-43c8-98ff-0fae10b7834e
root@orion7:~# swapon /swapfile
root@orion7:~# cat /proc/swaps 
Filename                                Type            Size    Used    Priority
/swapfile                               file            4194300 0       -1
if i try suspend to disk, is not working, dmesg says:

Code:
[ 2213.764376] PM: thaw of devices complete after 345.673 msecs
[ 2213.765505] PM: Using 1 thread(s) for compression.
[ 2213.765509] PM: Compressing and saving image data (268449 pages) ... done
[ 2221.439687] PM: Wrote 1073796 kbytes in 7.67 seconds (139.99 MB/s)
[ 2221.440114] PM: S
[ 2221.463504] PM: Swap header not found!
[ 2221.463506] |
[ 2221.596333] Restarting tasks ... done.

do i miss something?


regards fl0
 
Old 11-30-2012, 09:22 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
If you want to resume from a swap file, you need an extra kernel parameter, see:
https://wiki.archlinux.org/index.php..._file_resuming
Yes, I know it's the Arch wiki in the Slackware forum, but it's a good explanation.
 
2 members found this post helpful.
Old 11-30-2012, 09:51 AM   #3
fl0
Member
 
Registered: May 2010
Location: Germany
Distribution: Slackware
Posts: 105

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by H_TeXMeX_H View Post
If you want to resume from a swap file, you need an extra kernel parameter, see:
https://wiki.archlinux.org/index.php..._file_resuming
Yes, I know it's the Arch wiki in the Slackware forum, but it's a good explanation.
yes i already found that thx.

according to
http://git.kernel.org/?p=linux/kerne...2d0319;hb=HEAD
and
http://git.kernel.org/?p=linux/kerne...af9527;hb=HEAD
and
http://suspend.sourceforge.net/

there are some more pitfalls, like LVM and initramfs usage (i use both), so i think i will use a swap partition, its much easier.
The only reason i would use a swapfile , i assumed it was easier.....

regards fl0
 
Old 11-30-2012, 12:19 PM   #4
fl0
Member
 
Registered: May 2010
Location: Germany
Distribution: Slackware
Posts: 105

Original Poster
Rep: Reputation: 34
Lightbulb


Ok i finally got it working.
..maybe i have misunderstood the kernel docs, or they are not correct.

It is a dirty hack, but works, later i write a How To at docs.slackware.com but here is the short version

- patch initrd to understand resume_offset and find the right resume device
- patch mkinitrd to write resume_offset information to the initrd image

regards fl0

Last edited by fl0; 11-30-2012 at 12:27 PM.
 
Old 12-01-2012, 07:36 AM   #5
fl0
Member
 
Registered: May 2010
Location: Germany
Distribution: Slackware
Posts: 105

Original Poster
Rep: Reputation: 34
Here is the How To;

http://docs.slackware.com/howtos:sla...and_a_swapfile

regards fl0
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] suspend to ram ( sleep) does not work on my Slackware64-current multilib afreitascs Slackware 8 06-26-2012 10:57 PM
[SOLVED] Slackware64 13.37 suspend sort of works. blue_k Slackware 11 04-28-2011 01:01 PM
[SOLVED] Slackware64-current don't work pm-suspend but. .. ROXR Slackware 4 02-28-2010 04:32 AM
Plz explain Suspend to Disk and Suspend to Ram pkhera_2001 Linux - Newbie 2 02-18-2008 07:23 AM
Laptop Suspend: Broken on Wake Up perlhacker14 Debian 0 06-19-2007 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration