How to create a swap file so Hibernate will work?

Booting, installing, newbie
Message
Author
adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

How to create a swap file so Hibernate will work?

#1 Post by adam500 »

My Carolina 1.2 contains a program called 'Sleep Timer' which offers to allow both Hibernate and Suspend. But when i tick the setting to 'Enable Hibernate' it gives me a pop up message saying I need to create a swap file large enough to hold the contents of my ram (2Gb).

I've increased the size of my Savefile on the HD to over 10Gb ((the max).

I don't see any applications to do this...Is this something I can do, somehow?

I'm running the Carolina from a Live CD....could this be an issue?

I'd really like to get the computer to Hibernate.

Thanks
Attachments
swap message.png
(10.39 KiB) Downloaded 390 times
Last edited by adam500 on Sat 23 Aug 2014, 17:51, edited 1 time in total.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

Here are two of the many posts I found by entering swap AND file in the forum's Search page and limiting the search to the How-To section. I don't know if either of them will provide the answer you seek, but they might point you in the right direction.
http://murga-linux.com/puppy/viewtopic. ... 270#774464
http://murga-linux.com/puppy/viewtopic. ... 270#620703

It might be easier to make a swap partition than a swap file, using Gparted, but I don't know if the Hibernate program will use a swap partition.

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#3 Post by saintless »

Check out the attached in this post make-swap.zip and the instruction there (it is GUI Utility - just extract the archive in /usr/bin and start it by typing make-swap in terminal):
http://www.murga-linux.com/puppy/viewto ... 076#792076
It should work in any puppy.

Creating swap file from command line is explained here:
http://puppylinux.org/wikka/SwapFile

gcmartin

#4 Post by gcmartin »

To address SWAP needs, See this earlier response.
@Saintlesshere, offers a neat "Presence" utility if needed.

Here to help
P.S. I have only done hibernate with one PUP distro ever and I think it was Pemasu's Precise..I think via a Shutdown-time utility.

adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

#5 Post by adam500 »

Thanks for all the ideas. I will spend some time with them over the next few days and report back.

There must be a way to do it, otherwise why create a specific application using Hibernate?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#6 Post by Semme »

Is there enough free space to create the file?

Code: Select all

df -h
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

#7 Post by adam500 »

Semme wrote:Is there enough free space to create the file?
This is what I have. It is an XP setup. With the first Partition being the Dell Notebook info.

I was thinking of creating a 3Gb swap partition..once I figure out how to do it without complicating things. I can easily free up probably 10 Gb from the sda2 partition.

See attached file. (I don't know how to get an image into the post..yet. Hmmm, maybe I do know how.
Attachments
drive.jpg
(47.35 KiB) Downloaded 316 times

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#8 Post by Semme »

Your frugal's on sda2? Is that a data partition or does it also have an OS?
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

#9 Post by adam500 »

Semme wrote:Your frugal's on sda2? Is that a data partition or does it also have an OS?
That is where my XP is along with several years of accumulated data (of widely varying worth).

As the swap partition or file will only be used for hibernating and I only have 2G of ram I don't see a need for more than 3G. Although I'm open for input on this.
............................................................
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 209G 144G 65G 69% /initrd/mnt/dev_save
/dev/loop1 10G 353M 9.7G 4% /initrd/pup_rw
/dev/loop0 76M 76M 0 100% /initrd/pup_ro2
/dev/loop3 24M 24M 0 100% /initrd/pup_z
/dev/loop2 299M 299M 0 100% /initrd/pup_a
unionfs 10G 353M 9.7G 4% /
tmpfs 505M 344K 504M 1% /tmp
shmfs 496M 0 496M 0% /dev/shm
#

adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

#10 Post by adam500 »

I tried the Suspend option, which worked properly.

Now I'm wondering exactly what happens to a Live CD session when the system goes into Suspend instead of Hibernate.

I know the system is still on after a Suspend, but how much of it is still on? Is it essentially shut down?

Is the info in RAM (the Puppy) still there?

Just curious, thanks. Maybe Suspend will be good enough.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#11 Post by Semme »

If you've got suspend working, great.. It may be good enough. If you resize, keep this in mind.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

#12 Post by adam500 »

Semme wrote:If you've got suspend working, great.. It may be good enough. If you resize, keep this in mind.
Yes. Suspend might do the trick. I can still see a blinking light running.



I'd like it to shut off 100%, but maybe suspend will be ok. With no need to create any swaps.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#13 Post by Semme »

>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#14 Post by Flash »

I think the main difference between Suspend and Hibernate is that if power is lost while the system is suspended (still in RAM), the state of the system is lost. Hibernate transfers what's in RAM to the hard disk (to swap memory), so that the power can be turned off. Hibernate reloads to RAM more quickly than rebooting, but Suspend starts with everything already in RAM. I think I have that right.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#15 Post by nic007 »

Standby/Suspend = state saved to RAM, machine does not power-off, recovers to previous state almost immediately when touching mouse/hitting keyboard. Typically the power light will be flashing. Hibernation = Everything in RAM is copied to hard drive before the machine switches off. You need to push the power button to restart the machine which is then suppose to boot to the previous state. Hibernation is slower (the power saving is more though) but it takes less than 10 seconds for me so well worth it.

adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

#16 Post by adam500 »

From what I've found out, (and others have mentioned) Hibernate shuts off all power completely. I use it all the time with Windows computers.

Suspend powers off most of the computer's power users and supposedly can survive for days off the battery. There must be just a trickle of power being used to keep the ram running.

I'll experiment with the Suspend and see how that works out.

Haven't ruled out making a swap file/partition yet though. There are a few other Hibernate programs to try.

gcmartin

Steps to use GPARTED to setup SWAP partition on a Windows PC

#17 Post by gcmartin »

Hello @Adam500

To create partition for SWAP from the diagram you've shown, is easy.

To begin showing these steps, I preface with the usual statement: "I assume NO RESPONSIBILITY for ANY outcome you achieve." and "It is always recommended to have a backup"

OK, understanding this, let's begin using the Picture you present (if you have ANY questions, DON'T HESITATE to ask us here on this thread). In fact, much of what you will be doing is visual in GParted screen.

You ask to resize the /dev/sda2 partition. Since it is currently in use, to do the SWAP partiton will require 3 boots.

1st boot
  • Boot Windows, then immediately Shutdown
    Note:This is important as a boot cleans the filesystem for the next steps.
2nd boot
  1. Boot your Live DVD and AT THE BOOT-SPLASH, hit the F2 key before the 5-second timeout
  2. type ===> puppy pfix=ram
  3. On desktop, start GParted from the Menu to see the screen you show earlier
  4. On the /dev/sda2 line, right-click to select resize
  5. Change the line "Free space following" change from 0 to 3073 (to have a 3GB partition)
  6. Tab to Resize button and click will return you to the main screen
  7. Right-click the new line on the main screen /dev/sda3 to select format
  8. Scroll to SWAP and click and verify to return to the main screen again
  9. Review the picture on the main screen for accuracy.
  10. Meeting your expectation, YOU MUST click the Apply arrow on the toolbar for your changes to be made.
    Note: If this does NOT visually show what you expect merely do not click the Apply button. No changes are ever made until you hit the Apply button...NONE!
  11. Once the changes complete, exit GParted
  12. On desktop, shutdown WITHOUT SAVING
3rd boot
  • Boot any Live/Frugal PUP of your choice. ALL Linuxes and all PUPs, EXCEPT FATDOG6-6xx and 7xx, will acknowledge and use your SWAP partition.
  • If booting your normal PUP, DO NOT stop at Splash screen and do not enter F2
Use at your discretion.

Here to help
Edited: Add Subject to identify post's assistance
Last edited by gcmartin on Fri 29 Aug 2014, 16:23, edited 1 time in total.

adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

#18 Post by adam500 »

Thanks gcmartin.

If I can get my Carolina to recognize my usb wifi adapter I will follow up on this in order to use Hibernate. The 'Sleep Timer' Suspend operation resulted in a terribly abrupt shutdown and an equally scary restore from Suspend.

I'm still searching for the right version of Linux. I thought I'd found it with Carolina 1.2 but I'm having a problem finding a wifi usb adapter that works with it.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#19 Post by Flash »

Drivers for USB wireless adapters are kernel-specific. That is, they won't work at all unless compiled for the exact Linux kernel they'll be used with. Kernels seem to come with many drivers for wireless dongles, but if the kernel is older than the dongle you're trying to use, it probably won't come with the right driver. If you can tell us which kernel otherwise works best for you, and where to download the Linux driver for the USB wireless adapter you want to use, someone will usually be happy to compile the driver for you.

Alternatively, you could try several of the latest Puppy versions, which come with the latest kernels that have drivers for many more USB wireless adapters.

I'd download a likely-looking version of Puppy and burn it to a CD, then boot it in any computer that was available and see if the dongle will work out of the box. If it does, then I'd proceed to trying to use that Puppy, or at least that Linux kernel, in the eeepc.

adam500
Posts: 39
Joined: Sun 06 Apr 2014, 10:46

#20 Post by adam500 »

Yes Flash.

That's about where I am now.

Focus on the weakest link first, then move on to the next Linux issue.

Right now it is finding a supported USB wifi dongle.

This has been the subject of my other thread in the forum [re: carolina].

Until then, I might try creating a Hibernate partition as described above.

After another full back-up that is. :D

So far I like Carolina 1.2 best of all Puppy's but I admit I haven't tried them all yet. Has there possibly been a newer Carolina iso created that features a newer kernel?

Is there a particular link showing info on the other versions of Puppy. Maybe I shouldn't be so smitten with Carolina.

Post Reply