Recovering swap partition

Asked by surmandal

Hi, I am having problem with swap partition in my newly installed Natty. Currently I have created a swap file under /var directory but still having issue with hibernate. it just goes blank screen and never shutdown the laptop. So I think this is due to the swap file. So I want swap partition working so that I can make hibernate working in my computer. I tried to formate using gparted but it says device busy. there is a red exclamation sign new swap partition (/dev/sda5). can anyone help me to recover this partition or make hibernate working with swap file. Thanks

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcus aurelius (adbiz) said :
#1

you don't create a swap file/partition the way you did. it is automatically created when you installed ubuntu.

you probably have an issue with your computer hibernating properly.

if you provide the make and model of your computer, someone may be able to help you get the hibernate function working.

Revision history for this message
surmandal (surmandal) said :
#2

Hmm, I created a partition of 2 GB for SWAP, later I found it was not working, so I created a 2 GB file using dd (dd if=/dev/zero of=/var/swap.img bs=1024k count=2048 then mkswap /var/swap.img and swapon /var/swap.img).
anyway My laptop model is , Acer 5610 with 1 GB of RAM. here is the CPU info

at /proc/cpuinfo .
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 14
model name : Intel(R) Core(TM) Duo CPU T2350 @ 1.86GHz
stepping : 12
cpu MHz : 800.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor est tm2 xtpr pdcm dts
bogomips : 3724.55
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 14
model name : Intel(R) Core(TM) Duo CPU T2350 @ 1.86GHz
stepping : 12
cpu MHz : 1867.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor est tm2 xtpr pdcm dts
bogomips : 3724.10
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:

Revision history for this message
Sam_ (and-sam) said :
#3
Revision history for this message
surmandal (surmandal) said :
#4

Thanks Sam_, But that has been already Done and my problem is Hibernate issue which is not working right now and I think this is due to swap file. I am having problem with Swap partition and could not recover it as I mention earlier.

Revision history for this message
surmandal (surmandal) said :
#5

Hmm, one more things to add, is there any relation between encrypting home folder and Swap partition ??? I have encrypted my home folder and SWAP partition shows exclamation mark (!). I thought this is due to corrupt partition.

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Stefano Freiesleben Sias (stefsias) said :
#7

It may be expired, but I have the completely solution in another thread, - at least I have tested it with a notebook and desktop computer several times, take a look at:

https://answers.launchpad.net/ubuntu/+source/hibernate/+question/166102

- Stefano