FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Fri May 14, 2021 22:42



Post new topic Reply to topic  [ 3 posts ] 
Windows mountvol equivalent Enumerating mounted volumes GUID 
Author Message

Joined: Wed Aug 24, 2016 23:26
Posts: 12
Post Windows mountvol equivalent Enumerating mounted volumes GUID
Hi,
Being a proud user of your tremendously successful ntfs-3g, I'd like to ask you, please, how running ntfs-3g on Ubuntu 16.04 and taking several disk/partition devices in /dev I can enumerate all volume GUIDS and mount points of the volumes that Windows would mount if started from certain /dev.
Looking at HKLM\SYSTEM\MountedDevices is not a precise way since some volumes mounted only to junctions and not disk letters may be absent from that key.
I'm more than sure Windows should have some fstab equivalent to know quickly what it needs to mount and doesn't make any long scans.
For some reason I can't read \$Extend\$Reparse using ntfs-3g even when mount with show_sys_files and streams_interface=windows, the size of \$Extend\$Reparse is shown 0.
Can you help me, please?
BTW, is volume GUID stored and can be retrieved from appropriate NTFS partition itself?

Thanks much,

Maxim.


Wed Aug 24, 2016 23:47
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Windows mountvol equivalent Enumerating mounted volumes GUID
Hi,

Quote:
I'd like to ask you, please, how running ntfs-3g on Ubuntu 16.04 and taking several disk/partition devices in /dev I can enumerate all volume GUIDS and mount points of the volumes that Windows would mount if started from certain /dev.

This is not a volume level information. A partition can be mounted on several computers with different GUIDs. You have to analyze the Windows system files (registry, etc.), whose layout may depend on the Windows version.
Quote:
I'm more than sure Windows should have some fstab equivalent to know quickly what it needs to mount and doesn't make any long scans.

Maybe you post to a Windows oriented forum...
Quote:
For some reason I can't read \$Extend\$Reparse using ntfs-3g even when mount with show_sys_files and streams_interface=windows, the size of \$Extend\$Reparse is shown 0.

This is because this file has no data, it only has an index to files and directories which have reparse data. For example :
Code:
ntfsinfo -vF '$Extend/$Reparse'  /dev/sda2

You get, among other data :
Code:
Entry length:            32 (0x20)
                Key length:              12 (0xc)
                Index entry flags:       0x00
                Data offset:             28 (0x1c)
                Data length:             0 (0x0) 
                Key reparse tag:         0xa0000003 (mount point)
                Key file id:             5066549580792743 (0x120000000003a7)
                Key Data:

This means the file whose number is 0x3a7 (or 935) is a mountpoint. You can then open it and fetch the reparse data, which contains the GUID.
Quote:
BTW, is volume GUID stored and can be retrieved from appropriate NTFS partition itself?

Usually the volume GUID is not set. When it is set, it can be found in the volume description, for example :
Code:
ntfsinfo -fvi 3 /dev/sda2
[...]
Dumping attribute $OBJECT_ID (0x40) from mft record 3 (0x3)                     
        Attribute length:        40 (0x28) 
        Resident:                Yes
        Name length:             0 (0x0)
        Name offset:             0 (0x0) 
        Attribute flags:         0x0000
        Attribute instance:      6 (0x6)
        Data size:               16 (0x10)
        Data offset:             24 (0x18)
        Resident flags:          0x00   
        ReservedR:               0 (0x0) 
        Object ID:               c3763e02-7340-4390-98b8-f51d0ca84c68
        Birth Volume ID:         missing
        Birth Object ID:         missing 
        Domain ID:               missing
Dumping attribute $VOLUME_NAME (0x60) from mft record 3 (0x3)

Regards

Jean-Pierre


Thu Aug 25, 2016 09:33
Profile

Joined: Wed Aug 24, 2016 23:26
Posts: 12
Post Re: Windows mountvol equivalent Enumerating mounted volumes GUID
Thank you very much for a quick and thorough reply, Jean-Pierre!

Maxim.


Thu Aug 25, 2016 10:35
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.