Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTFS volume not mounted a rw, only ro #2

Closed
nickylimjj opened this issue May 12, 2022 · 4 comments
Closed

NTFS volume not mounted a rw, only ro #2

nickylimjj opened this issue May 12, 2022 · 4 comments

Comments

@nickylimjj
Copy link

Hi,

I am running UEFI shell in VMware® Workstation 15 Pro (15.5.7 build-17171714)

Whilst I can load the NTFS-3g DXE driver from this repository (both in the releases tab and self-compiled), it mounts the NTFS volume as ro and not rw.

Any advice? thank you.

fs0:\> load ntfs_x64.efi
load: Image fs0:\ntfs_x64.efi loaded at E0C2000 - Success
fs0:\> map -u
[...snip...]
fs1    :Hard Disk - Alias hd11a3 blk2
[...snip...]
fs0:\> vol fs1
Volume has no label (ro)
[...snip...]
fs0:\> vol hd11a3
Volume has no label (ro)
[...snip...]
fs0:\> vol blk2
Volume has no label (ro)
@nickylimjj
Copy link
Author

Hi, a follow up. I tried it on a desktop and ran a UEFI shell [1] to load the NTFS-3g DXE driver.

Version info

fs3:\> ver
UEFI Interactive Shell v2.2
EDK II
UEFI v2.40 (American Megatrends, 0x0005000B)

I performed the same steps: unload original drive, load the driver from this repo (both in the releases tab and self-compiled), remapped with map -r and view the mount attributes with vol fsX: but it is still mounted as (r).

Shell> drivers
[...snip...]
18b 00000010 D - - 3 - NTFS Driver 1.2 (ntfs-3g 84552e5b)    \efi\boot\ntfs_x64.efi
Shell> map -r
[...snip....]
Shell> vol fs1:
Volume Windows (r)
[...snip...]

[1] Building a Bootable USB drive with UEFI Shell (x64)

@nickylimjj
Copy link
Author

Hi @pbatard,

Wondering if you have had the chance to look at it. I tried debugging it and it seems that this function call already results in a fallback to mounting as READONLY. If i remove the flag NTFS_MNT_MAY_RDONLY on line L491, the Ntfs volume will fail to mount.

/*
* Mount an NTFS volume an initilize the related attributes
*/
EFI_STATUS
NtfsMountVolume(EFI_FS* FileSystem)
{
EFI_STATUS Status = EFI_SUCCESS;
ntfs_volume* vol = NULL;
ntfs_mount_flags flags = NTFS_MNT_EXCLUSIVE | NTFS_MNT_IGNORE_HIBERFILE | NTFS_MNT_MAY_RDONLY;
char* device = NULL;
/* Don't double mount a volume */
if (FileSystem->MountCount++ > 0)
return EFI_SUCCESS;
#ifdef FORCE_READONLY
flags |= NTFS_MNT_RDONLY;
#endif

Thank you!

@pbatard
Copy link
Owner

pbatard commented May 25, 2022

Wondering if you have had the chance to look at it.

Sorry, but I'm afraid I am not planning to.

My testing on real hardware with real NTFS volume showed no issue when mounting them rw, and I'm way too busy with other things to try to figure out why your specific NTFS volume, in your specific environment doesn't mount properly.

From where I stand, this looks like a pure VMWare issue, since the code indicates that the volume was not closed properly or has another issue that forces a fallback to mounting it read-only so, as long as you can't replicate the problem on real hardware, you will have to see with VMWare what they might be doing with NTFS volumes or virtual disks, that makes a virtual NTFS media behave differently from a real NTFS media.

I will therefore close this issue. But if you get some insight as to why your virtual hardware is failing compared to real hardware, please feel free to post the details here.

@pbatard pbatard closed this as completed May 25, 2022
@nickylimjj
Copy link
Author

Hi,

Sorry, but I'm afraid I am not planning to.

Sure, I understand.

My testing on real hardware with real NTFS volume showed no issue when mounting them rw

I tested it on a physical desktop (Sabretooth X99 motheboard) too, as per 2nd comment in this issue, but it mounted as r instead of rw.

You will have to see with VMWare what they might be doing with NTFS volumes or virtual disks, that makes a virtual NTFS media behave differently from a real NTFS media.
I will therefore close this issue. But if you get some insight as to why your virtual hardware is failing compared to real hardware, please feel free to post the details here.

Sure, I'll check in VMware forums and update and findings if I manage to resolve it.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants