{"id":3015,"date":"2016-01-13T19:23:57","date_gmt":"2016-01-13T19:23:57","guid":{"rendered":"http:\/\/www.piglet-net.net\/pigblog\/?p=3015"},"modified":"2016-01-13T19:23:57","modified_gmt":"2016-01-13T19:23:57","slug":"all-your-files-are-exactly-where-you-left-them","status":"publish","type":"post","link":"https:\/\/www.piglet-net.net\/pigblog\/?p=3015","title":{"rendered":"All your files are exactly where you left them"},"content":{"rendered":"<p>The title of this post comes from a Windows message displayed during a update to Microsoft Windows 10. At the time @theardvaark <a href=\"https:\/\/twitter.com\/theaardvark\/status\/686685137849847808\">posted this tweet<\/a> voicing his distrust of the statement, I muttered to myself &#8220;Don&#8217;t be soft. Why <em>on earth<\/em> would a simple windows update move them?<\/p>\n<p>Despite now having worked with the Evil Empire&#8217;s products for something like 27 years, and so being used to useless error messages (&#8220;An unexpected error has occurred&#8221;, for example) and being downright lied to (any message produced by Internet Explorer), I still get caught out at times, and one such thing gave me a nasty shock the other day.<br \/>\n<!--more--><\/p>\n<p>Enter stage left a PC (a beast of a gaming PC, in size, with fans that looked more at home under the bonnet of a car). I&#8217;m looking at it as a favour for a friend. Reported symptoms are a blank screen, and that turns out to be true- a brief display of the BIOS, then blank screen, then, eventually, a reboot loop. Booting a Ubuntu live CD shows the hardware to be pretty much OK: the drive is readable, with lots of photos in <code>c:\\users\\[name]\\Pictures<\/code> (hold that thought). It was Windows 10, upgraded from 7 (hold that thought too).<\/p>\n<p>Obviously, it&#8217;s looking like the Windows installation was borked. It could have been duff hardware, but the fact Ubuntu was up and working suggests not. Time for a Windows repair.<\/p>\n<p>Happily, you can now download a Windows ISO legally now. Unhappily, it seems you have to use Windows to do it, as it needs to run a media creation program, but that wasn&#8217;t a huge problem.<\/p>\n<p>So, boot from the DVD. Choose &#8220;Repair&#8221;, and wait. It fails. Repeat, choose &#8220;Advanced&#8221;. Fix some disk errors, and attempt what Microsoft call a Reset. This is essentially a re-install, and you can pick to retain user files, so I did that. One long wait later, it went through the big, recent Windows 10 update, and went back to the blank screen\/reboot cycle.<\/p>\n<p>Obviously, it&#8217;s time for a re-install from scratch. I can&#8217;t format the drive, as there&#8217;s a lot of data, and I don&#8217;t have anything big enough to store it on. I also don&#8217;t want Windows to do anything with the data (another thought to hold), so back out with Ubuntu to read the disk.<\/p>\n<p>At which point I panic. I navigate to <code>c:\\users\\, (or rather \/mnt\/media\/[something]\/users\/ <\/code>, and it&#8217;s empty, apart from the defaults. WTF?<\/p>\n<p>I now discover the excellent ntfsundelete utility. It recovers some files, but not what I wanted. A few minutes thinking, and thankfully I discovered the data, with a bit of help from <a href=\"http:\/\/linux.die.net\/man\/1\/find\">find<\/a>. They were actually somewhere sensible-ish: <code>c:\\windows.old\\users<\/code>. There&#8217;s three reasons for not just knowing this:<\/p>\n<p>1) Windows&#8217; update procedure, as per the tweet linked at the top, and the Reset function of the install media, tells you it&#8217;s not going to do anything with the files. <strong>This is a lie<\/strong>. What I would imagine is supposed to happen is that the files will get copied back into the correct place, if the procedure completes succesfully: Windows installs have changed: they used to copy individual files into a destination directory having expanded them off the install media: they now unpack an image, rather like an ISO image or tar archive, into that directory, so anything that needs to be retained presumably needs to be held in a temporary location.<\/p>\n<p>2) You might reasonably expect them to be in <code>c:\\users.old<\/code>, in my opinion, less so inside a <code>windows.old<\/code> folder. <\/p>\n<p>3) The PC already had a <code>c:\\windows.old<\/code>, a consequence of it being upgraded from Windows 7.<\/p>\n<p>So, as it was, it was a simple fix, once you know what has happened. Rename <code>windows.old<\/code> so the installer definitely won&#8217;t touch it, remove <code>c:\\windows<\/code>, <code>Program Files<\/code> and <code>Program Files (x86)<\/code>, and any other tempoary junk, run the install, making sure not to format the drive, and copy the data back into <code>c:\\users\\[name]<\/code>, and of course sort out a few drivers&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The title of this post comes from a Windows message displayed during a update to Microsoft Windows 10. At the time @theardvaark posted this tweet voicing his distrust of the statement, I muttered to myself &#8220;Don&#8217;t be soft. Why on earth would a simple windows update move them? Despite now having worked with the Evil &hellip; <a href=\"https:\/\/www.piglet-net.net\/pigblog\/?p=3015\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">All your files are exactly where you left them<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1,23],"tags":[],"class_list":["post-3015","post","type-post","status-publish","format-standard","hentry","category-computers","category-general","category-tech"],"_links":{"self":[{"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=\/wp\/v2\/posts\/3015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3015"}],"version-history":[{"count":0,"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=\/wp\/v2\/posts\/3015\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.piglet-net.net\/pigblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}