View previous topic :: View next topic |
Author |
Message |
toralf Developer
Joined: 01 Feb 2004 Posts: 3942 Location: Hamburg
|
Posted: Fri Sep 14, 2012 4:15 pm Post subject: [solved] how to check if Linux is hibernated |
|
|
? I accidentely chrooted into such an image and could now repair the filesystem ...
(I'm looking for a equivalent to my NTSF solution : Code: | [[ "$(ntfscat /dev/sda1 hiberfil.sys | head -n 1 | cut -c1-4)" = "hibr" ]] && |
Last edited by toralf on Sat Sep 15, 2012 10:16 am; edited 1 time in total |
|
Back to top |
|
|
piedar Tux's lil' helper
Joined: 09 Aug 2010 Posts: 82
|
Posted: Sat Sep 15, 2012 6:00 am Post subject: |
|
|
On my system, where /dev/sdb5 is a swap partition with a hibernated image
Code: | head -n 1 /dev/sdb5 |
contains the string SWAPSPACE2S1SUSPEND
However, if I pipe it into cut, cut chokes on the binary characters. There's probably another tool that can process it, dd maybe?
Last edited by piedar on Sat Sep 15, 2012 3:44 pm; edited 1 time in total |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3942 Location: Hamburg
|
Posted: Sat Sep 15, 2012 9:41 am Post subject: |
|
|
interesting, I'll try something like Code: | head -n 1 /dev/sdb2 | strings | grep SWAPSPACE2S1SUSPEND |
|
|
Back to top |
|
|
|