Cannot mount drive after update to 12.3

Hi,

I have a dualboot machine with Opensuse and Windows 8, which I recently switched to 12.3 (the machine is old enough to not have any problem with UEFI). The update was a fresh install rather than a true update process.
Before the switch, I had 2 NTFS drives that automatically got mounted on boot without problem. After the switch, I am now unable to mount one of the drives. I tried different things including to set up mount points during the installation process but got an error message and the installation did not complete. After fresh installation in which I did not try to automatically mount the drive, I am unable to manually mount the drive in dolphin.

Here is how my drives look like

Device     Size      F  Enc Type            FS Type  Label    Mount Point
/dev/sda   698.64 GB        ST3750528AS
/dev/sda1    4.01 GB        Linux swap      Swap              swap
/dev/sda2   20.00 GB        Linux native    Ext4              /
/dev/sda3   50.00 GB        Linux native    Ext4              /home
/dev/sda4  624.63 GB        Extended
/dev/sda5  300.00 GB        Win95 FAT32 LBA FAT      SHARED   /shared
/dev/sdb   465.76 GB        ST3500418AS
/dev/sdb1  102.54 GB        HPFS/NTFS       NTFS
/dev/sdb2  363.22 GB        HPFS/NTFS       NTFS     Storage
tmpfs        1.93 GB        TEMPFS          TmpFS             /dev/shm
tmpfs        1.93 GB        TEMPFS          TmpFS             /run
tmpfs        1.93 GB        TEMPFS          TmpFS             /sys/fs/cgroup
tmpfs        1.93 GB        TEMPFS          TmpFS             /var/lock
tmpfs        1.93 GB        TEMPFS          TmpFS             /var/run

The drive that I cannot mount is /dev/sdb2.

This is the message that is returned when I try to mount the drive manually in dolphin:

An error occurred while accessing 'Storage', the system responded: The requested operation has failed: Error mounting /dev/sdb2 at /run/media/sebastien/Storage: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=100,dmask=0077,fmask=0177" "/dev/sdb2" "/run/media/sebastien/Storage"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
 Metadata kept in Windows cache, refused to mount.
 Failed to mount '/dev/sdb2': Operation not permitted
 The NTFS partition is in an unsafe state. Please resume and shutdown
 Windows fully (no hibernation or fast restarting), or mount the volume
 read-only with the 'ro' mount option.

Going through a fresh boot and shutdown of Windows does not change anything and a scan of the drive using the Windows 8 utility finds no error.

Interestingly, dolphin reports a “0 B Removable Media” as part of the available devices:
SHARED
0 B Removable Media
102.3 GiB Hard Drive
Storage
20.0 GiB Hard Drive
50.0 GiB Hard Drive

Any idea what I can do to access to this drive in Opensuse?

Thanks

Are you able to mount it with “sudo mount /dev/sdb2 /mnt” in a terminal window (Konsole f.e.)?

Could you post your /etc/fstab as well please?

Interestingly, dolphin reports a “0 B Removable Media” as part of the available devices:

That’s the Floppy disk drive. If you don’t have one and/or are annoyed by it being shown, disable it in the BIOS settings.

Hi,

Thanks for your reply. It seems that I cannot either mount the drive from the konsole.


sebastien@linux-1h4m:~> sudo mount /dev/sdb2 /mnt
root's password:
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sdb2': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
sebastien@linux-1h4m:~> cat /etc/fstab
/dev/disk/by-id/ata-ST3750528AS_6VP09LQN-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST3750528AS_6VP09LQN-part2 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-ST3750528AS_6VP09LQN-part3 /home                ext4       defaults              1 2
/dev/disk/by-id/ata-ST3750528AS_6VP09LQN-part5 /shared              vfat       users,gid=users,umask=0002,utf8=true 0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0


As far as I interpreted similar threads in the past, the file system hs to be used by Wiindows and should be “unmounted” (or how they call it in Windows) absolutely correct there.

Well, maybe the filesystem is really unclean then?

Try this:

sudo mount /dev/sdb2 /mnt -o recover

Although according to the documentation, the option “recover” should be the default…

On 2013-10-30 13:06, pomchip wrote:
> Before the switch, I had 2 NTFS drives that automatically got mounted on
> boot without problem. After the switch, I am now unable to mount one of
> the drives.

Only one, NTFS -> I already have a suspicion.

> Code:
> --------------------
> exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
> Metadata kept in Windows cache, refused to mount.
> Failed to mount ‘/dev/sdb2’: Operation not permitted
> The NTFS partition is in an unsafe state. Please resume and shutdown
> Windows fully (no hibernation or fast restarting), or mount the volume
> read-only with the ‘ro’ mount option.
> --------------------

Suspicion confirmed. Dirty “disk”.

> Going through a fresh boot and shutdown of Windows does not change
> anything and a scan of the drive using the Windows 8 utility finds no
> error.

Yet there is an error. You have to force a full scan. Or, you probably
are using the quick Windows 8 power off feature: disable it.

+++········································
BY THORSTEN LEEMHUIS
*The new Fast Startup feature of Windows 8 puts the filesystem’s
integrity at risk if other operating systems are used to write to
Windows partitions. Data loss is particularly likely with dual-boot
configurations that involve Linux and Windows 8.
*
To avoid data loss and filesystem inconsistencies, users who run
Windows 8 and Linux on the same computer should disable the Fast Startup
feature that was introduced with Windows 8 and is active by default.
The Fast Startup feature creates an issue because it doesn’t shut
Windows 8 down completely but switches it to a special hibernation state
instead – although it looks like it has been freshly booted when
switched back on because all applications have been closed. However, for
the Fast Startup feature’s hibernation state, Windows 8 will store
Windows session information – such as the cache with the current
filesystem state of any mounted FAT and NTFS partitions – in a memory
image that is restored during Fast Startup.

Read More (Some is Very Important): ‘Linux and Windows 8: Fast Startup
puts data at risk - The H Open: News and Features’
(http://tinyurl.com/casmm3z)

Copyright © 2012 Heise Media UK Ltd.
········································+±

> Any idea what I can do to access to this drive in Opensuse?

You can access it read-only - per the error message.


Cheers / Saludos,

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

I agree with hcvv and robin_listas. This looks like W8 is still “holding a hand” over your file system. And as suggested, you need to switch off - not just only Fast Start under W8, but also hibernation so you don’t inadvertently enable Hibernation when inside W8. Fast Start is in fact a combination of LogOff and Hibernation, thus giving a little faster startup due to your restoring from hibernation - but entering into a login screen (since you, when you powered off - were logged out prior to entering the hibernation state).

BTW: This isn’t W8/Linux specific - this is universal to any dual/multiboot setups, even W8/W8.

You can find a an example of how to do it 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. See “Preparing Windows 8 for dual-booting”, item 4. You may also want to look at posting #6 in the same link.

dayfinger

On 2013-10-30 14:06, wolfi323 wrote:
> Although according to the documentation, the option “recover” should be
> the default…

What’s that, an fsck run? I’m unsure it works on ntfs :-?


Cheers / Saludos,

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

No, it’s an ntfs-3g specific option and therefore does work with ntfs and only with ntfs… :wink:
From “man ntfs-3g”:

      ** recover
**              Recover and try to mount a partition  which  was  not  unmounted
              properly  by  Windows. The Windows logfile is cleared, which may
              cause inconsistencies.  Currently this is the default option.

Btw, I just saw that “man ntfs-3g” also mentions this:

   **Windows hibernation and fast restarting
**       On  computers  which  can be dual-booted into Windows or Linux, Windows
       has to be fully shut down before booting into Linux, otherwise the NTFS
       file systems on internal disks may be left in an inconsistent state and
       changes made by Linux may be ignored by Windows.


       So, Windows may not be left in  hibernation  when  starting  Linux,  in
       order  to  avoid  inconsistencies.  Moreover,  the fast restart feature
       available on recent Windows systems has to be  disabled.  This  can  be
       achieved  by issuing as an Administrator the Windows command which dis-
       ables both hibernation and fast restarting :


              powercfg /h off

On 2013-10-30 15:16, wolfi323 wrote:
>
> robin_listas;2594449 Wrote:

>> What’s that, an fsck run?
>>
> No, it’s an ntfs-3g specific option and therefore does work with ntfs
> and only with ntfs… :wink:

Ah, I see.

I had a brief look at the man page, but could not locate what you were
referring to.

> Btw, I just saw that “man ntfs-3g” also mentions this:

Yes, I mentioned that issue on a post here, but from other source.


Cheers / Saludos,

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

I have seen this command being suggested previously, even prior to my writing the dual-boot-how-to. However, more than once, I have also seen users having problems after doing this, problems that disappear after doing it graphically as I show in my dual-boot-how-to, and this is the reason I did not list the CLI-method.

Off the top of my head I can remember one posting about such a problem in this forum when leaving the PC powered on over night. Obviously, changing the settings in the GUI does more than adjust the hibernation setting - changes that you do want to be executed. However, I have not analyzed which other W8 settings are affected.

If one takes a look at the help of “powercfg”, it will tell you that is mentions hibernation only, and nothing about “fast start” (actually, it is termed “hybrid-sleep” as was the function’s name until W8 got released). Just out of curiosity, I tested the “powercfg” command on my Toshiba, where I have already switched off both fast-start and hibernation using the GUI method I describe in my dual-boot-how-to:

From the W8 desktop, I pressed -X and selected “Command Prompt (Admin)”. There, I entered the following command sequence:

powercfg /q>powercfg_q01.txt
powercfg /h on
powercfg /q>powercfg_q02.txt
powercfg /h off
powercfg /q>powercfg_q03.txt

I then compared the three files. They were identical!
I also started Control Panel freshly prior to and after each execution of “powercfg”, entering Power Options, in order to see what happened inside the graphical view. There never were any changes!
It seems that powercfg doesn’t do anything wrt the “/h” parameter!

I even entered


powercfg /h on
powercfg /q>powercfg_q04.txt

and switched off completely (a RESTART, as that never invokes fast-start/hybrid-sleep or any other power-off tricks no matter the setting of fast-start/hybrid-sleep, and then pressing the power button for a while when the “BIOS”-logo was being displayed) to ensure nothing was waiting for enabling following a power off/on cycle. Then I powered on again.
Still no change. The files are identical, and the GUI settings are the same in all four cases!

All this is when using W8, not W8.1. W8.1 may have changed the rules here, but that needs investigation/verification.

dayfinger

Thansk all for your suggestions.

They made me look for solutions to perform complete shutdowns of Windows. This ended being the solution to allow the drive to be mounted. Here is the method that I have applied - extracted from How to Shut Down Windows 8 (Full Shutdown and Normal Hybrid Shutdown) (howtohaven.com)


 If you find that you often need to do a full shutdown, and don't fancy using the command line every single time, create a shortcut on your desktop to do the job. 
  To do this, right click the desktop, followed by "New" in the menu that appears. Then click "Shortcut" in the submenu that appears after that. In the dialog box entitled "Create Shortcut" that appears, type "shutdown /s /t 0" (without the quotes). Click the "Next" button. In the next screen, type whatever you like. If you don't know what to name the shortcut, type "Full Shutdown" (without the quotes). Then click the "Finish" button. 
  Now when you doubleclick that shortcut on your desktop, your system will do a complete shutdown. 

Thanks all

A word of warning - which is related to my comments to “powercfg” above: That makes only for a partial solution. If you only use Windows 8 occasionally and only for a short time each session, you will probably be ok, and you will think my warning does not apply. If you use W8 for longer periods of time, you will most probably sooner or later run into problems as a result thereof. So

**“shutdown /s /t 0” is not enough! **

You should set you shutdown policy once and for all using the GUI method I pointed you to previously. Then you can forget about the desktop shortcut as well, as you will always power off W8 properly. Yes - you will loose hibernation (but you can keep “sleep”, and my Asus can keep a sleep-session going for more than a month under W8 without needing a recharge!). But that is a consequence of W8 design and your installing more than one OS on the same system, and one of them being W8. The same thing would apply if you were installing two W8s alongside each other, and you were to dual-boot between them. So, this is not a Linux issue, it is a W8 issue and W8 alone. Sadly, it affects anything else installed on the same system and needs attention.

This has to do with W8 doing things behind the scene apart from merely hibernating/hybrid-sleep when powering off, and that isn’t affected by powercfg and shutdown. However, the experience so far is that the GUI method do cover those (necessary) parts as well. I suspect background processes for being part in this, and W8 has those in an overwhelmingly large number. It isn’t easy to see what process is doing what, nor when they kick in, but another user in these forums had problems not very unlike yours but only when leaving the PC powered on overnight. My guess is that one of these processes were executed when the PC was idle as long as the fast-start and hibernation wasn’t disabled through the GUI.

Check here: https://forums.opensuse.org/english/get-technical-help-here/install-boot-login/490228-windows-keeps-corrupting-gpt.html

You have been warned! :slight_smile: Good luck!

dayfinger

  1. Boot into Windows.
  2. In Windows, run “chkdsk /F” on that drive. It might require a reboot.
  3. While running Windows, reboot into opensuse. Does it now mount?

My best guess is that your problem is due to “fastboot” in Windows. This is a default for Windows 8. You probably need to turn that off.

When you reboot from Windows to opensuse, then Windows is supposed to properly unmount the file system. But, when you shutdown windows, it leaves the file system in an unstable state (if “fast boot” is in effect).

The change with 12.3 (I think), is that the 12.3 kernel recognizes this, so prevents you from mounting the improperly shutdown file system, so as to avoid possible corruption.

As I recall, the “fastboot” setting in Win8 is part of the power settings. When you try to change it, you find that it is grayed out and cannot be changed. There’s some addition option for advanced settings that you have to use to be able to change that.

… which is what I am pointing to in my posting #8 of this thread.

dayfinger

Thanks

I have modified the power settings as suggested.

Now I need to modify my /etc/fstab file to automatically mount my drive.

For my Windows NTFS partition, here is my fstab entry:

/dev/disk/by-id/ata-MKNSSDAT480GB_MK130711AS1049529-part2 /Windows             ntfs-3g    defaults,noatime                      0 0

The mount folder you use (I used /Windows) must already exist and I set its permissions to 777 as root before the mount. My exmple shows the mount options I suggest you use "defaults,noatime " in the fstab file while the rest is based on your drive disk by-id name and selected mount folder name.

To edit any system file as root, see my bash script here:

SYSEdit - System File Editor - Version 1.50 - Blogs - openSUSE Forums

Thank You,