0

I have a disk image named: disk.img. I cannot mount this because I think it's messed up from Windows.

Here are some commands I've run:

sudo mount -o loop,offset=135266304 ./disk.img /mnt/temp

The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/loop8': 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.

sudo ntfs-3g -o remove_hibernation ./disk.img /mnt/temp

NTFS signature is missing.
Failed to mount './disk.img': Invalid argument
The device '*' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

sudo ntfsfix ./disk.img 

Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Unrecoverable error
Volume is corrupt. You should run chkdsk.

file ./disk.img

./disk.img: DOS/MBR boot sector MS-MBR Windows 7 english at offset 0x163 "Invalid partition table" at offset 0x17b "Error loading operating system" at offset 0x19a "Missing operating system"; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 4294967295 sectors

fdisk -l ./disk.img

Disk ./disk.img: 279.5 GiB, 300069052416 bytes, 586072368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: *

Device       Start       End   Sectors   Size Type
./disk.img1 264192 586072063 585807872 279.3G Microsoft basic data

I really don't know what to do. I don't have access to Windows.

Anyone have any ideas?

  • 1
    You'd probably have to setup a loop device of that partition in the image, then apply ntfsfix on the loop device, since ntfsfix has to operate on the NTFS partition and does not understand the entire disk image. – muru Mar 22 '18 at 06:52
  • I do not think you can always fix this from Linux, sometime you have to fix it by booting and working in windows. – Panther Mar 22 '18 at 07:02

1 Answers1

0

Not sure about this specific issue but have faced a similar one before. Windows will keep it's portion of the disk in hibernation mode for a faster boot, even when shutting down. To get past this, you need to hold down the left shift key while shutting down Windows 10 (I usually continue to hold it down until it completely shuts off).