openSUSE will not boot after Windows sleep

I was booted into Windows 8.1 which went into sleep mode. After I woke Windows (apparently sucessfully) I restarted the machine choosing the openSUSE (13.2) option in the boot menu. It fails to boot properly.
Looking at verbose mode the message is: failed to mount /windows
Looking further at the journal I see messages like:
Windows is hibernating, refused to mount
Fails to mount /dev/sda4 : operation not permitted. The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast booting)

FAT-fs (sda6) not properly unmounted. Some data may be corrupt. Please run fsck.

I have run fsck -t FAT-fs /dev/sda6 and it reports that there is a dirty bit but when I ask fsck to remove the dirty bit it reports that it has left the file system unchanged.

I can boot into windows sucessfully, and have done so several times, shutting down fully (afaik) each time. I have checked that Windows fast reststart is off - it is.
While in Windows I have run chkdsk on each drive and it reports no problems.

Nevertheless openSUSE still won’t start because of the Windows partition(s) reported as not properly unmounted.

Is there anything I can do either from within Windows 8.1 or in Linux emergency mode to put the Windows partitions in a correct state for successful Linux booting?

Many thanks for suggestions and help.

You did not fully shut down windows. Be sure that fastboot is off also check the partition from Windows a corrupt file system will also stop a mount

You can add the nofail option to the mount line in /etc/fstab this will cause the start up NOT to fail if for some reason the partition won’t mount

On 27/05/2015 0:16, PingooseCovert wrote:

> Fails to mount /dev/sda4 : operation not permitted. The NTFS partition
> is in an unsafe state. Please resume and shutdown Windows fully (no
> hibernation or fast booting)

That’s the key. No hibernation or fast booting.

> …
> FAT-fs (sda6) not properly unmounted. Some data may be corrupt. Please
> run fsck.
> …
>
> I have run fsck -t FAT-fs /dev/sda6 and it reports that there is a dirty
> bit but when I ask fsck to remove the dirty bit it reports that it has
> left the file system unchanged.

fsck.vfat by default only checks, doesn’t change anything unless you set
an option. Can’t say which at the moment, I’m on Windows this instant.

But FAT? Not NTFS? Ah, it is a different partition. Well, you can
comment out the line in fstab so that it is not mounted automatically on
boot. Or mark it “nofail”.


Cheers,
Carlos E. R.
(W7 - minas-morgul)

I already said that fastboot is off. Also I said that chkdsk in Windows does not come up with any faults (and indeed Windows boots and works).
I have been “fully shutting down” Windows without problems for Linux for the past five months that the machine has been dual-boot.
It seems to be the case that Windows going into sleep mode (for the first time since having the machine) has somehow permanently made one or more of its partitions “dirty”.
I want /windows to mount.

I think this is a problem caused by Windows refusing to leave a clean partition but its locking me out of Linux.

Thanks.

Thanks for the reply.
Yes, I realise no hibernation or fast booting is required and have always had fast restart disabled in Windows. It seems that Windows going to sleep (for the first time since the machine was made dual-boot) has caused the problem. Windows thinks everything is just fine (I’m writing this while booted into Windows on the machine). Windows was only supposed to “sleep” but maybe it did some “hibernating” things and has not come out of them properly? And has not put them right after several apparently normal restarts and machine close-downs.

sda4 seems to be the main windows partition and is ntfs (btw - what is the Linux name for ntfs which I need for specifying the “type” of this filesystem when using fsck?)
I do not know what sda6 of type FAT is - maybe the UEFI partition??

Commenting out or nofailing windows partitions may be a temporary expedient to enable booting into openSUSE but what is the proper solution (I want to mount /windows like I always have done)?

Any further advise to cure, rather than just work round the problem, please? I suspect the problem is on the windows side but nothing I can see/do there seems to help.

On 2015-05-27 13:16, PingooseCovert wrote:

> I already said that fastboot is off. Also I said that chkdsk in Windows
> does not come up with any faults (and indeed Windows boots and works).
> I have been “fully shutting down” Windows without problems for Linux for
> the past five months that the machine has been dual-boot.
> It seems to be the case that Windows going into sleep mode (for the
> first time since having the machine) has somehow permanently made one or
> more of its partitions “dirty”.
> I want /windows to mount.

Notice that it is not sda4 which fails, but sda6. Not the Windows main
partition.

> I think this is a problem caused by Windows refusing to leave a clean
> partition but its locking me out of Linux.

just comment out the line for that partition.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2015-05-27 13:36, PingooseCovert wrote:

> sda4 seems to be the main windows partition and is ntfs (btw - what is
> the Linux name for ntfs which I need for specifying the “type” of this
> filesystem when using fsck?)

fsck[TAB][TAB]

and you see all the options:


Telcontar:~ # fsck
fsck           fsck.ext3      fsck.minix     fsck.xfs
fsck.btrfs     fsck.ext4      fsck.msdos
fsck.cramfs    fsck.fat       fsck.reiserfs
fsck.ext2      fsck.jfs       fsck.vfat
Telcontar:~ # fsck

There is no module to check ntfs partitions.

I do not know what sda6 of type FAT is - maybe the UEFI partition??

Could be. Reading the fstab file will tell you where it is mounted.

Or run this (single line, it wraps here) :


lsblk --output
NAME,KNAME,RA,RM,RO,SIZE,TYPE,FSTYPE,LABEL,PARTLABEL,MOUNTPOINT,UUID,PARTUUID,WWN,MODEL,ALIGNMENT

which will list a lot of data on your partitions.

> Commenting out or nofailing windows partitions may be a temporary
> expedient to enable booting into openSUSE but what is the proper
> solution (I want to mount /windows like I always have done)?
>
> Any further advise to cure, rather than just work round the problem,
> please? I suspect the problem is on the windows side but nothing I can
> see/do there seems to help.

I need to see what “fsck /dev/sda6” says. Maybe something about a dirty
bit set? If it is only that, and no other defect, just clear the bit.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Thanks for this help. lsblk tell us that sda4 is indeed of type ntfs and is the Windows “Basic data partition” (I guess what Windows calls the C: drive).
sda6 is of type vfat and is /boot/efi . This is the partition with the dirty bit. This is, I think, a partition originally set up by the Linux system but being vfat is probably mounted/seen by Windows and maybe Windows has not unmounted it properly (I’m guessing here, not being too much of an expert.)

Anyway, here is what fsck /dev/sda6 says:
fsck from util-linux 2.25.1
fsck.fat 3.0.26 (2014-03-07)
0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.

  1. Remove dirty bit
  2. No action
    ?

If I key 1 or 1) and then return I get the message: “Leaving filesystem unchanged”. So is fsck is refusing to remove the dirty bit? Further help please, to tell me how to remove the dirty bit on sda6.
Thanks.

Wer3e are you running Linux from??

As a general rule you can not fsck and modify a partition. If it is mounted if you are booted from the same drive that this EFI boot partition is on then it would be mounted as /boot/efi and fsck can’t change anything. So you must boot from an external DVD/USB then run fsck

Note that any OS that is booting vie the EFI boot will need that partition. Also as a general rule it is better to use Windows or a DOS utility to fix a MS formatted partition. Linux should be able to do it but the EFI boot is a special partition and may have setting that don’t mesh with other FAT formats.I don’t know as a fact

On 2015-05-28 22:56, PingooseCovert wrote:

> If I key 1 or 1) and then return I get the message: “Leaving filesystem
> unchanged”. So is fsck is refusing to remove the dirty bit? Further help
> please, to tell me how to remove the dirty bit on sda6.

“man fsck.fat” would tell you. By default, it works in read only mode:

Note: If -a and -r are absent, the filesystem is only
checked, but not repaired.

You could try first “-a”.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Thanks again for help. I have now removed the dirty bit from sda6 (/boot/efi) using an external rescue system and fsck with option -a. It has not had any ill effects on Windows booting or use. Windows still reports that all the drives it sees are healthy.

But . . . . Linux still cannot mount sda4 (the ntfs main Windows partition (/windows)! The same message as before:
“Windows is hibernating, refused to mount
Fails to mount /dev/sda4 : operation not permitted. The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast booting)”

So that I can at least boot Linux without mounting the Windows partition please could I have advice on
(i) how to safely edit fstab from the command line in the rescue system
(ii) where in fstab’s entry for sda4 to add nofail (exact position please); I assume that to comment it out I add # at the beginning).

I suppose that to be able to mount sda4 in Linux I need to somehow remove the flag which says that it is in a hibernating state. I can’t do anything from the Linux side since you have told me that fsck does not check or modify ntfs partitions. On the Windows side everything is reported as healthy and all is working properly. I repeat - fast restart is not enabled.
I guess this openSUSE forum is not the place to ask how to get Windows to remove the hibernating flag from its C: drive. But if anyone can advise I’d be delighted.

Cheers.

Are you sure that fast boot is off?? If on it will do a sort of hibernation and Linux will not be bale to mount it. It may be possible that some Windows update may have turned it on if you had it off. never can trust them Winders updates

On 05/29/2015 11:06 PM, gogalthorp wrote:
>
> Are you sure that fast boot is off??
>
Just to make sure please disable fast-boot again.
How I disabled fast-boot. Boot into windoze, open cmd in admin mode and
enter command

powercfg /h off

gogalthorp asked to add nofail in fstab. Did you do it? Can you post the
contents of /etc/fstab here.
Do you share ntfs partition between windoze and openSUSE.

I used to have the same problem as yours when my winodze slept and in
next boot I tried to boot into openSUSE. I also have shared my ntfs
partition.


Akash Vishwakarma
openSUSE 13.2 KDE/MATE/xfce/enlightenment 19

I was sure Windows fast-boot was unticked.
Running

powercfg /h off

in Windows with administrator privileges makes everything OK again. Many thanks, Akash, for this advice which I have also found on the ubuntu forum:

Running that Windows code is in fact the best thing to do if you have a Linux/Windows dual-boot setup because it prevents Windows from going into hibernation either manually, as a power saving action, or by mistake. It prevents Windows hybrid sleep/hibernation, partial hibernation (i.e. fast-boot) and full hibernation.

Problem solved - I can now boot Linux with /windows partition read-write and Windows is also working.