VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: no swap device to suspend 2  (Read 4541 times)

Diabolic Preacher

  • Vectorite
  • ***
  • Posts: 100
  • Freedomaniac
    • DP's Journal
no swap device to suspend 2
« on: May 11, 2007, 01:12:12 am »

I use VL 5.8 SOHO RC2 and recently came across the step by step guide showing patching of kernel with suspend2 patch and enabling hibernation support on VL standard in one of the threads in this forum. the process went on all fine, till the grub configuration. although its not mentioned but i figured you have to add resume2=swap:/dev/hdxy at the end of the line starting with kernel for the entry for VL (the only OS currently on my system)
this is where the first problem lies. I had installed and re-installed this version of VL quite some time back, and i had created a 1gb swap partition, but i dunno is it because i have 1gb RAM, the setup just would not select the 1gb partition. now the 1gb remains unusable :( but that's like another topic...so...now since i don't have a swap partition, what do i write for the resume2=swap:/dev/hdxy

mine disks are sata and they are labelled as sda1, sda2, sda3. i cannot deliberately choose any other partition coz suspend2/hibernate complains that the partition isn't identified as swap.
is there a way to specify RAM as the device or can i create a swap image file of some fixed size?

Thanking in advance
Logged
Diabolic Preacher
As Is
http://pintooo15.livejournal.com

Triarius Fidelis

  • Vecteloper
  • Vectorian
  • ****
  • Posts: 2399
  • Domine, exaudi vocem meam
    • my website
Re: no swap device to suspend 2
« Reply #1 on: May 11, 2007, 01:44:56 am »

Yes, you can create a swap image file, with the code

Code: [Select]
dd if=/dev/zero of=swap.img bs=1M count=n
mkswap swap.img

where n is number of megabytes. The file is then ready for use as swap.
« Last Edit: May 11, 2007, 12:41:26 pm by hanumizzle »
Logged
"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months

lagagnon

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1922
Re: no swap device to suspend 2
« Reply #2 on: May 11, 2007, 07:52:26 am »

is there a way to specify RAM as the device or can i create a swap image file of some fixed size?
Yeah it is pretty easy. You can even make a swap file, rather than a swap partition. The procedure is outlined here:

http://linux.about.com/od/linux101/l/blnewbie4_2_13.htm
« Last Edit: May 11, 2007, 08:07:09 am by lagagnon »
Logged
"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll

Diabolic Preacher

  • Vectorite
  • ***
  • Posts: 100
  • Freedomaniac
    • DP's Journal
Re: no swap device to suspend 2
« Reply #3 on: May 14, 2007, 08:12:17 am »

i now think i have two options, two roads from here.
1. i created the swap.img file and made it the swap using mkswap, but resume2 parameter in 'kernel' line of grub is not accepting when i give the path to the swap.img file it gives "could not translate to a device id" so i can't use suspend2's hibernate as yet.

2. when i think about it. i never used hibernate on windows, but i used a feature called standby. it was useful when i had to keep the battery running for much longer than normal, i didn't care about the state of applications as i usually save close and log out properly. so i feel i don't need the hi-tech hibernate facility but i need what is called as 'standby/sleep' option...on some laptops it is in shape of a crescent. it powers down most of your h/w like hard disk, wifi, add-on cards and probably runs the CPU at very low speed. this helps in keeping the laptop going on for long...coz we have (electrical) power problems and also keeps it cool.

what all information do i need to see if standby option can be activated on my dell inspiron 1501 using VL 5.8 soho rc2?
Logged
Diabolic Preacher
As Is
http://pintooo15.livejournal.com

mr_volvo

  • Member
  • *
  • Posts: 36
Re: no swap device to suspend 2
« Reply #4 on: July 05, 2007, 10:34:20 am »

Can I mention that I am also interested in this standby feature rather than hibernate, and am currently googling...
Logged
Vector 5.8 SOHO on
Dell Latitude C400 (1Ghz, 256mb)

MikeCindi

  • Tester
  • Vectorian
  • ****
  • Posts: 1075
Re: no swap device to suspend 2
« Reply #5 on: July 30, 2007, 07:02:07 pm »

The latest, stable Suspend2 (now TuxOnIce) patch (2.2.10) allows the option of suspend to swap, file, or RAM. (The first two are what Win users know as hibernate and the third is standby.) This has worked well for me using the default 2.6.20.3 SOHO kernel. You can find what you need here: http://www.tuxonice.net/
HTH,
Mike

EDIT: actually it was the 2.6.20.7 kernel not the default 2.6.20.3...don't know about that one yet.
« Last Edit: August 02, 2007, 11:30:51 am by mikecindi »
Logged
The plans of the diligent lead to profit...Pro. 21:5
 VL64 7.1                                     RLU 486143