Wubi, Windows Ubuntu Installer

[regression since 12.04] wubi won't boot when Windows8 is hibernated (default)

Reported by YannUbuntu on 2012-08-27
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Wubi
Undecided
Unassigned

Bug Description

Reported by a ubuntu-fr member (Malbo, see his logs below in Post#1): http://forum.ubuntu-fr.org/viewtopic.php?pid=10533741#p10533741

Ubuntu installed via Wubi 12.04.1 64bits inside Windows8 RP.

BUG: after selecting the kernel line in GRUB, Ubuntu doesn't load (the screen remains purple). Remark: this is not systematic, sometimes Ubuntu can load.

WORKAROUND: in Win8 type "powercfg -h off" (this disables the hibernation and quick start of Windows8). The bug comes back when reactivating it (by typing "powercfg -h on")

YannUbuntu (yannubuntu) on 2012-08-27
description: updated
malbo (pique-sel) wrote :

My wubi log attached ( wubi-12.04-rev269.log )

YannUbuntu (yannubuntu) on 2012-08-27
description: updated
YannUbuntu (yannubuntu) on 2012-08-27
description: updated
YannUbuntu (yannubuntu) on 2012-08-28
summary: - [Wubi] Ubuntu won't boot when installed inside Windows8
+ [regression since 12.04] Ubuntu won't boot when installed inside
+ Windows8 via Wubi

Malbo has made further tests ( http://forum.ubuntu-fr.org/viewtopic.php?pid=10544711#p10544711 ), and it appears that:
- the bug is not present in 11.04 and 11.10, it has appeared in 12.04
- the bug is due to the fact that Wubi 12.04 can't mount the Windows partition.

**********
Output of "sudo mount -t ntfs-3g /dev/sdb1 /media/WindowsPartition" :
1) In 11.04 and 11.10: no error
2) In 12.04:
Windows is hibernated, refused to mount.
Failed to mount '/dev/sdb1': Opération non permise
The NTFS partition is hibernated. Please resume and shutdown Windows
properly, or mount the volume read-only with the 'ro' mount option, or
mount the volume read-write with the 'remove_hiberfile' mount option.
For example type on the command line:
            mount -t ntfs-3g -o remove_hiberfile /dev/sdb1 /media/WindowsPartition

**********
After installing Wubi 12.04 into Windows8, and rebooting. When Ubuntu boot fails, a GRUB shell is prompted.
In this shell, Malbo typed:
mkdir /host
mount -t ntfs-3g -o remove_hiberfile /dev/sdb1 /host #Removes the hiberfil.sys file, and successfully mounts the Windows partition
exit
This allows to boot Ubuntu.

Dimitri John Ledkov (xnox) wrote :

"- the bug is not present in 11.04 and 11.10, it has appeared in 12.04"

Can you please confirm in which cases is this bug not present:
- 11.04 with Windows8
- 11.10 with Windows8
- 11.04 with Windows 7 or lower
- 11.10 with Windows 7 or lower

summary: - [regression since 12.04] Ubuntu won't boot when installed inside
- Windows8 via Wubi
+ [regression since 12.04] wubi won't boot when Windows8 is hibernated
+ (default)
YannUbuntu (yannubuntu) wrote :

"- the bug is not present in 11.04 and 11.10, it has appeared in 12.04" meant that bug is not present in the 2 cases below:
- 11.04 with Windows8
- 11.10 with Windows8

malbo (pique-sel) wrote :

Dmitrijs Ledkovs wrote : "Can you please confirm in which cases is this bug not present"
I can't confirm for 11.04 (It's not interesting to me) and for Win7 (don't have) but i just made a successful Wubi-install of Oneiric (11.10) in Win8 : see wubi-11.10-rev245.log attached
Before that, the previous installation of Ubuntu 12.04 was removed and hibernation was enabled in Win8.

After install, extract of the result of the "mount" command :
/dev/sdb1 on /host type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)

Checking of rights on hiberfi.sys :
ls -la /host/hiberfil.sys
-rwxrwxrwx 1 root root 3435544576 2012-08-28 10:58 /host/hiberfil.sys

So, the bug is not present in a Wubi-install of Oneiric.

Note : wubi-11.10-rev245.log contain a line "IOError: [Errno 13] Permission denied: 'J:\\wubildr'" but it is a false problem (J : dont exist)

Changed in wubi:
status: New → Confirmed
tags: added: quantal regression-release rls-q-incomming
Evan Dandrea (ev) wrote :

So to confirm, this issue is only occurring when Windows is hibernated, correct?

If so, I think we should fix this by refusing to boot in a more elegant way.

tags: added: rls-q-incoming
removed: rls-q-incomming
YannUbuntu (yannubuntu) wrote :

@Even: it seems that this bug will also occur when Windows is shutdown without hibernation. See Bug #1043149

I created a separate bug report as the current one also (and mainly) needs to deal with the default Win8 setting (hibernation).

Dimitri John Ledkov (xnox) wrote :

I am speculating this is due to this Windows8 feature:

"Hybrid Boot will use hibernation technology to allow faster startup times by saving the Windows core's memory to the hard disk and reloading it upon boot."

Jean-Pierre (jean-pierre-andre) wrote :

Some versions of ntfs-3g refusing to mount Windows8 system partitions is just the tip of an iceberg. The very question is "when is it safe to mount a Windows8 partition without incurring loss of data ?". No version of ntfs-3g can have the correct algorithm until the algorithm is known. Apparently even mounting a non-system partition from a fixed disk where there is a Windows8 hibernated system partition is dangerous.

For the time being, please consider a Windows8 system in which hibernation and quick start are disabled (by issuing "powercfg -h off" as mentioned above) as the only safe circumstance in which any Windows8 partition on internal disk can be safely mounted by ntfs-3g (or by any Windows version prior to Windows 8).

Dimitri John Ledkov (xnox) wrote :

It is known when it is safe to mount ntfs partitions. The presents of hiberfil.sys file indicates that that particular partition is hibernated. Windows7 and earlier a user had to explicitly hibernate a system. With Windows8 shut down action defaults to: hibernate kernel + shut down the rest. This is called "Hybrid Boot" and is one of the features of Windows8.

"It is known when it is safe to mount ntfs partitions ?" Yes, I know up to Windows7 : it is safe when Windows7 is shut down and not hibernated. For Windows8, the only thing I can tell is : if is safe when hibernation and fast boot are disabled. Maybe there are other safe conditions, but I do not know anybody who knows. Anybody wanting to help is welcome on the forum at http://tuxera.com/forum/
"The presents of hiberfil.sys file indicates that that particular partition is hibernated." That was true up to Windows7, but Windows8 brings new contents for hiberfil.sys and their meaning is not known to me.

malbo (pique-sel) wrote :

I installed Win8_RTM ( instead of Win8_RP) then I did a Wubi-install of Ubuntu 12.04 . I found the same problems as before. However, I found a simple workaround when Ubuntu can not boot (Win8 considered hibernated by Ubuntu) : just to boot Win8 and leave Win8 by "Shut down" and not "Restart" like I did until here. With "Shut down", Win8 rebuilt a new hiberfil.sys (with "restart", hiberfil.sys is unchanged : I checked the md5sum). At least that is how it works in my PC ...

YannUbuntu (yannubuntu) wrote :

According to #12:
- after using Win8 "ShutDown", Ubuntu considers that Windows is not hibernated, so accepts to mount the Win8 partition in read/write.
- after using Win8 "Reboot", Ubuntu considers that Windows is hibernated, so refuses to mount the Win8 partition.

So maybe:
- Wubi should "ShutDown" Win8 instead of rebooting it? (and warn the user that he should ShutDown Windows before booting Ubuntu)
- OR we should fix ntfs-3g so that it doesn't consider "Reboot" as hibernating?

@Jean-Pierre & Dmitrijs : FYI according to a test performed by Malbo (http://forum.ubuntu-fr.org/viewtopic.php?pid=10563351#p10563351), after ShutDown Win7 (not Hibernate, not Suspend, not Reboot), its partition still contained hiberfil.sys , and 12.04 could mount it without error.
ls -l /media/Acer/hiberfil.sys
-rwxrwxrwx 1 root root 3220824064 août 29 14:42 /media/Acer/hiberfil.sys

@yannubuntu thank you for your observation.
"we should fix ntfs-3g so that it doesn't consider "Reboot" as hibernating?" We probably should, the problem is that ntfs-3g was not behind you when you selected "Reboot" or something else. We need some criterion from the data left behind by Windows8. Maybe you can try to answer my questions on http://tuxera.com/forum/viewtopic.php?f=2&t=29601&sid=09167e1a650c27499c66ca74b41118b1 You may reply here.
"its partition still contained hiberfil.sys" : the mere presence of hiberfil.sys is not the criterion, this is a huge file which would be too long to recreate, so Windows never deletes it. Its contents has to be examined to make a decision.

malbo (pique-sel) wrote :

I restored proper operation of Win8 using this workaround of Senator949 : http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/the-desktop-window-manager-has-encountered-a-fatal/ae44c9ea-3b52-451d-a371-91ae375ce353?page=2
After that, the hybrid sleep of Win8 is repaired and the bug disappeared.

malbo (pique-sel) wrote :

Sorry but the bug is still here . I give below the steps to reproduce the problem.

1) after using Win8 "Sleep", out of sleep mode and "Restart" : Win8 hibernated

2) after using Win8 "Restart" : Win8 hibernated

3) after using Win8 "Restart" : Win8 hibernated

4) after using Win8 "ShutDown" : Win8 hibernated

5) after using Win8 "Restart" : Win8 NOT Hibernated

6) after using Win8 "Restart" : Win8 NOT Hibernated

So, it is necessary to use "Shutdown" to find healthy functioning.

malbo (pique-sel) wrote :

Definition of terms used in the previous comment :

"Win8 hibernated" : from Ubuntu 12.04, the following result is found :
head -c 8 /media/Win8_partition/hiberfil.sys | od -t x1
0000000 48 49 42 52 09 00 00 00
0000010

"Win8 NOT Hibernated" : from Ubuntu 12.04, the following result is found :
head -c 8 /media/Win8_partition/hiberfil.sys | od -t x1
0000000 57 41 4b 45 09 00 00 00
0000010

nota : /media/Win8_partition is mounted in read mode only and Ubuntu 12.04 is a "classical install" (not a Wubi-install)

malbo (pique-sel) wrote :

I decided to disable "hybrid sleep" in Win8_RTM : I selected "off" in "Allow hybrid sleep" (Control Panel > Power Options > Change plan settings > advanced power settings > Sleep > Allow hybrid sleep ). After that, I tried all ways to leave Win8 (Restart, ShutDown, Sleep) and fortunately there was no problem with Wubi. So, one possible solution is to disable "hybrid sleep".

To complement this information, I checked the sequence described in the preview comment #16 :

1) after using Win8 "Sleep", out of sleep mode and "Restart" : Win8 NOT Hibernated

2) after using Win8 "Restart" : Win8 NOT Hibernated

3) after using Win8 "Restart" : Win8 NOT Hibernated

4) after using Win8 "ShutDown" : Win8 hibernated

5) after using Win8 "Restart" : Win8 NOT Hibernated

6) after using Win8 "Restart" : Win8 NOT Hibernated

We can see that the sleep mode became completely harmless ( step 1 to 3 : the Win8 partition is "not hibernated" instead of "hibernated" in comment #16).
It should be noted that the feature "Fast Restart" was maintained, only "hybrid sleep" was disabled

@malbo : thank you for your tests and reports. I just wanted to mention that "the sleep mode became completely harmless" remains to be proved. By mounting read-write in Ubuntu you might overwrite some data which Windows 8 did not fully sync to disk.

malbo (pique-sel) wrote :

I made a clean install of Windows 7 for comparison with Windows 8. I selected "on" in "Allow hybrid sleep". I checked from Windows 7 the sequence described in the preview comment #16 :

1) after using Win7 "Sleep", out of sleep mode and "Restart" : Win7 NOT Hibernated

2) after using Win7 "Restart" : Win7 NOT Hibernated

3) after using Win7 "Restart" : Win7 NOT Hibernated

4) after using Win7 "ShutDown" : Win7 NOT Hibernated

5) after using Win7 "Restart" : Win7 NOT Hibernated

6) after using Win7 "Restart" : Win7 NOT Hibernated

At each step, I found the same value for the header and md5sum :
head -c 8 /media/Win7_partition/hiberfil.sys | od -t x1
0000000 00 00 00 00 00 00 00 00
0000010
md5sum /media/Win7_partition/hiberfil.sys
cb2814bde2ff2d8602919a34120be7ac /media/Win7_partition/hiberfil.sys

Under the same conditions and in the same PC, there is no problem with Windows 7. Whereas for Windows 8, "hybrid sleep" is a disaster.

malbo (pique-sel) wrote :

In addition to my previous post, I think it is useful to prove that my installation of Windows 7 has its function "hybrid sleep" really enabled. So, I made ​​a special test : after using Win7 "Sleep", I cut off the power supply then I restored. I restarted on my Ubuntu 12.04 in order to check the state of my Win7 partition :
head -c 8 /media/Win7_partition/hiberfil.sys | od -t x1
0000000 48 49 42 52 09 00 00 00
0000010

We can see that the "hybrid sleep" is truly enabled and the hibernation state of the Win7 partition is detected correctly by Ubuntu 12.04.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers