Windows keeps corrupting gpt

Ok so my pc has 3 drives in it. An ssd with GRUB2-efi and linux on it, and a hard drive with /home, Windows 8, and the Windows 8 bootloader on it. When I boot in to windows 8 for an hour or so there is no problem. But, if I leave windows running, say overnight, when I reboot linux hangs and goes into emergency mode because it can’t mount /home. I then have to use gdisk to reload my GPT table from backup and everything works fine again. This has happened to me 8 times now. When the table is corrupt windows won’t even boot. Is this just Windows being terrible or should I lay out my drives differently.

I know the best solution is just to not use windows, but unfortunately that isn’t an option for me.

Also I don’t have a license for any other version of windows, I got Windows 8 for free from my University.

Hi
How are you shutting down windows 8? I have a desktop shortcut to ensure a full shutdown so none of the caching is retained;


shutdown /s /t 0

One possibility is that, while you are asleep, Windows is updating itself and overwriting your settings. Do you need to leave it on overnight?

An alternative may be to virtualise Windows; AFAIK that would not invalidate your licence.

Is Windows using the SSD as a cache??

On 2013-09-09 22:56, scienceman91 wrote:
>
> Ok so my pc has 3 drives in it. An ssd with GRUB2-efi and linux on it,
> and a hard drive with /home, Windows 8, and the Windows 8 bootloader on
> it. When I boot in to windows 8 for an hour or so there is no problem.
> But, if I leave windows running, say overnight, when I reboot linux
> hangs and goes into emergency mode because it can’t mount /home. I then
> have to use gdisk to reload my GPT table from backup and everything
> works fine again. This has happened to me 8 times now. When the table is
> corrupt windows won’t even boot. Is this just Windows being terrible or
> should I lay out my drives differently.

Maybe the partitions overlap?


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

That’s the first thing that I would check.

The next would be memory. Maybe leave a memory tester running overnight.

According to my findings prior to writing the “How to dual boot Windows 8”-article, I would follow up on malcolmlewis’ shutdown suggestion above.

But you need to do more, too. If you haven’t done it, you need to prepare Windows 8 to exist in a dual-boot environment (yes, even Microsoft says so - but they are talking about dual-booting with other Microsoft OS-es - meaning, W8 destroys W8 (or other versions of Windows for that matter), when they are installed alongside W8. Microsoft is actually describing the hybrid shutdown-mode as “dangerous” when used in dual-boot situations). Take a look here: https://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/487837-how-dual-boot-preinstalled-windows-8-linux-uefi-etc.html#4. Scroll down to Part 4, and execute the seven items under Part 4’s item 4 under Preparing Windows 8 for dual-booting.

If you do that, you have set up W8 to do malcolmlewis’ trick by itself. Prior to these W8 adaptions, W8 will by default execute a

shutdown /hybrid /t 0

unless you press and hold the <Shift> key while clicking the power-off icon.

Obviously, I have followed my own dual-boot installation receipt using the computer named in the how-to, and I have since left my computer powered on in W8 overnight several times without experiencing what you are describing.

Actually, this W8 hybrid-mode tends to remind me of the MS-DOS 5/Windows 3.x “Blue Screen Of Death” (BSOD) back in the early 1990s due to MS DOS 5 by default activating a drive-cache which in certain situations meant that critical info wasn’t written to disk at all. Consequently, Windows 3.x would crash… The problem was finally “rectified” by introducing MS-DOS 6 where the default drive-cache behaviour was changed…

Maybe I am misunderstanding and thus having a different take on this, or I have been unaware of a feature for years:

  • I thought that overlapping partitions was impossible. Once allocated, it is used. If not allocated, it is not in use. You cannot include a partition inside another partition in part or as a whole. Granted, MBR’s Extended partitioning can be said to do overlap, but the Extended partition is merely a container containing more partitions and is a trick introduced to circumvent the MBR’s limitation of 4 partitions only. Partitions set up inside the Extended partitions cannot overlap either.
  • However, I can see OS-es overlap in their use of disk space and that there is a problem if they started to make use of each other’s files, but not between W8 and Linux that uses different file systems? OK - Open SUSE understand NTFS, but it doesn’t install to it, and it is not “in topic” either, in this case. Here it is W8 being active outside of what it should be.

I thought. When you guys says otherwise, I’m not that sure anymore. How can this be? Is this a sort of partitioning-trick that is fairly well known that I have been unaware of during all these years? :embarrassed: I can imagine that manipulating partition-tables could make partitions overlap, but I thought that would prohibit itself by simply not working afterwards?

Mind Blown, that appears to have resolved it, My hatred for Microsoft just increased 100 points, which is only about 90 points more than the typical day to day increase. I lost track years ago, its somewhere in the Billions now. Well, im going to donate another $100 to the wine team now, thanks for your help.

Ive never heard of it either, but I don’t think its something done on purpose. The way GPT partition works, I think if the headers get corrupted the table can be saved in a way that draws the bartition borders overlapping, which would explain why upon starting gdisk it goes FIX THIS DRIVE RIGHT NOW!! Luckily Opensuse is smart enough to make backups of the gpt tables every time you partition, so all you really need to do is restore them with gdisk. If I was doing a W8/W7 or a W8/W8 dualboot i would have been screwed and would have had to scan the whole drive to find the partition borders to rebuild the table.

I never leave it overnight on purpose, Windows updates are disabled.

BTW, with virtualbox there is a way to virtualize non-virtual windows, IE, you can use your real windows partition instead of a virtual drive, it works quite well if you have separate drive, previously you had to re-enter your license key each time you swapped from real to virtual, but in windows 8 apparently the license key is stored in the efi, so it just boots without a problem, which was really unexpected, im not 100% sure it is supposed to work without re-confirming the key but it does.

I used to think the best feature of windows was the power button, apparently they can’t even get that right any more

On 2013-09-10 15:56, dayfinger wrote:
> robin_listas;2583738 Wrote:
>> > Maybe the partitions overlap?
> Maybe I am misunderstanding and thus having a different take on this, or
> I have been unaware of a feature for years:
>
> - I thought that overlapping partitions was impossible. Once

Many things are impossible and happen :slight_smile:

Software has bugs. The partition table is just a table, you might be
able to enter bad values. I have seen an overlap once, I think. I don’t
remember how it happened. Long ago.

But I understand the problem has been found, it was the hybrid
hibernation mode of Windows.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

True. Obviously, I misunderstood. I was hoping to learn a new thing … and I did lol!:

It wasn’t what I expected to learn something about, but I wasn’t aware of that. Thank you!

Windows 8 does have a setting somewhere, to disable that hybernate on shutdown. Disabling it was one of the first things that I did after getting a Windows 8 box.

Supposedly, it only does that on shutdown, and not on reboot. Since you mentioned using reboot, I did not think it applied.