2

I've been trying for some time now, to get hibernation working in 12.04 on my Dell XPS17. I dual-boot Windows 7 and Ubuntu, each having their own partition and one shared partition for all my data and documents.

As I would like to be able to switch from Ubuntu to Windows without losing all the things I was currently doing in Ubuntu, I would like to be able to use hibernation. In order to achieve this I've followed the information here.

Only instead of creating my swap file on my Linux partition (which is formatted: ext4), I've chosen to create one on my shared partition (which is formatted: NTFS).

There is a problem with this though (at least, that's what I think the problem is), because when I call:

sudo filefrag -v /media/data/Ubuntu_Swap_Space/6GiB.swap

I get the following output:

Filesystem type is: 65735546
File size of /media/Data/Ubuntu_Swap_Space/6GiB.swap is 6442450944 (1572864 blocks, blocksize 4096)
Discontinuity: Block 22 is at 25829097 (was 232498) 
/media/Data/Ubuntu_Swap_Space/6GiB.swap: 2 extents found

So I'm not sure what I need to fill in as an offset to follow the rest of the earlier mentioned information. I've tried both the location of block 22 and the number that is listed after that, but when I then try sudo pm-hibernate nothing happens and this shows up in my /var/log/pm-suspend.log:

s2disk: Could not use the resume device (try swapon -a). Reason: No such device

Hope someone can help me out with this! If you need more information about anything, please let me know.

2
  • As psusi pointed out, it is unwise to switch from OS with the other still in hibernation. So I won be using it for that purpose, but I would like to be able to use hibernation, so that I can at least let my laptop turn all of it's power off when I'm travelling, whilst my current activities are not closed.
    – MrHug
    Oct 8, 2012 at 6:20
  • 1
    Possible duplicate of Hibernate and resume from a swap file
    – Cas
    Mar 13, 2017 at 0:12

1 Answer 1

0

You can not hibernate one OS and reboot into the other if they both are trying to access the same partition or they will corrupt it. Neither one knows that the other still has that partition open and possibly in the middle of making changes to it. When you want to switch between OSes you MUST shut down and reboot, not hibernate.

1
  • I see, well in that case I would still like to be able to hibernate, if only so that I can save my session and continu working in Ubuntu at a later time even without booting Windows in between. Thanks for your answer by the way!
    – MrHug
    Oct 5, 2012 at 23:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .