Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cautionary hibernation tale
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
guero61
l33t
l33t


Joined: 14 Oct 2002
Posts: 811
Location: Behind you

PostPosted: Mon Oct 09, 2006 11:11 am    Post subject: Cautionary hibernation tale Reply with quote

To hopefully save someone else from this horrid fate, beware when you hibernate - either always resume or MAKE SURE your hibernated image (swap/file/whatever) is shredded, zeroed out, or otherwise eliminated.

I have my laptop set up to hibernate whenever the battery hits 0%, regardless of what I'm doing. The other day, I elected not to resume for one reason or another, and went on with life. Hours later when I rebooted, my default GRUB configuration pointed me back at the [still saved] resume image. Everything resumed just fine, but everything thereafter went to crap - every file that had changed inodes (i.e., I had edited, since I use ext3 on my root and XFS in /var and other places) now had a completely different file in it's place, was missing, or zeroed out! For example - /etc/make.conf was some screwed up Mozilla/Netscape config file, sudoers was zeroed out, and so on - absolute chaos. Luckily, I had sleuthkit installed and was able to munge back through unallocated space in my root partition and recover most of my critical files.

The moral of the story is thus: make sure you NEVER go back to an old 'resume=' image unless you know precisely what you're doing. If you're using swap space as your 'resume=' argument to your kernel, enable 'RC_SWAP_ERASE' in /etc/conf.d/rc or store your suspend file in /tmp and turn on WIPE_TMP in /etc/conf.d/bootmisc. IIRC, suspend2 does have protections against this, but for the moment I was using gentoo-sources

There is one other story I can find about this, but it seems they may not have known precisely what had happened.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum