?

Log in

No account? Create an account
Today's annoyances involve hibernation and USB hard disks. When… - 'Twas brillig, and the slithy toves did gyre and gimble in the wabe [entries|archive|friends|userinfo]
Thomas

[ website | Beware the Jabberwock... ]
[ deviantArt | the-boggyb ]
[ FanFiction | Torkell ]
[ Tumblr | torkellr ]

Links
[Random links| BBC news | Vulture Central | Slashdot | Dangerous Prototypes | LWN | Raspberry Pi]
[Fellow blogs| a Half Empty Glass | the Broken Cube | The Music Jungle | Please remove your feet | A letter from home]
[Other haunts| Un4seen Developments | Jazz 2 Online | EmuTalk.net | Feng's shui]

[Wednesday 9th November 2011 at 7:49 pm]
Thomas

boggyb
[Tags|]
[Feeling |annoyedannoyed]

Today's annoyances involve hibernation and USB hard disks.

When resuming from hibernation, if Windows finds out that a USB hard disk has been removed while the computer was powered off it apparently decides that the best course of action is to bluescreen.

For added fun, if I then plug the hard disk back in and tell Windows to try again at restoring from hibernation, it bluescreens with a different error. If I then unplug the hard disk I still get the second error (which convinently blatted details of the first error from the event log).

Of course my PC then takes ages to start back up due to several years of accumulated crud. Most annoying.
Link | Previous Entry | Share | Next Entry[ 5 pennies | Penny for your thoughts? ]

Comments:
[User Picture]From: delta_mike
Wednesday 9th November 2011 at 8:23 pm (UTC)
Why on earth doesn't it flush the filesystem buffers and unmount the volume prior to hibernation?
(Reply) (Thread)
From: pewterfish
Wednesday 9th November 2011 at 11:21 pm (UTC)
If I recall correctly, the Windows approach to hibernation is to hibernate the USB device tree along with the PCI device tree and the IDE and SATA device trees... It assumes it'll be able to pick up the "conversation" with the device midsentence on dehibernate. I rather suspect the design pre-dates easily removable portable storage media...
(Reply) (Parent) (Thread)
[User Picture]From: boggyb
Thursday 10th November 2011 at 12:23 am (UTC)
That would explain the problem I discovered many years ago with the FAT driver. Under Win2k at least, it appears to save the FAT table across hibernation. So if you while the computer is off unplug a FAT-formatted USB drive, change the contents on a different PC, and then plug it back into the first PC, when you restore the first PC from hibernation it'll corrupt your USB drive. It doesn't crash though, but then again it's probably a lot less complicated than the NTFS driver (which can crash when mounting a sufficiently broken filesystem).

I've got a better idea as to what happened with the second crash. When Windows bluescreens, it apparently writes the memory dump to the page file (the theory being that doing so needs very little of the kernel to be working). Presumably on the second restore attempt it tried to page in something and hit the part that contained the dump, bluescreening and overwriting the existing memory dump.
(Reply) (Parent) (Thread)
[User Picture]From: pleaseremove
Thursday 10th November 2011 at 12:26 am (UTC)
As far as I know, (although Thomas is welcome to point out if I'm wrong) he is still running XP... an OS only 2 major versions out of date and over a decade old... That said, XP did have a fairy decent understanding of removable storage, but their hibernation tech was a little fuzzy.

For reference if you do what he did in Vista or 7 the machine is just fine.
(Reply) (Parent) (Thread)
[User Picture]From: boggyb
Thursday 10th November 2011 at 12:32 am (UTC)
Nope, still on XP. An upgrade to 7 will most likely happen when I buy some new shinyness that doesn't work with XP, though it'll mean replacing some of the more exotic hardware I've got (I know the film scanner won't work with 7).
(Reply) (Parent) (Thread)