How to open ntfs file using 7zip cli

Saji
2012-02-27
2012-12-07
1 2 > >> (Page 1 of 2)
  • Saji
    Saji
    2012-02-27

    Hi ,

    I tried to open a VHD that has 2 partitions in it. The Output of 7 zip cli is as below.
    Now, I want to open the 0.ntfs and 1.ntfs separately. How to achieve this ? Any help is appreciated..

    Date Time Attr Size Compressed Name
    ------------- --- -------- -------- ----------------
    ….. 767557632 767557632 0.ntfs
    ….. 1376780288 1376780288 1.ntfs
    ….. 3080192 3080192 2
    ------------- --- -------- -------- ----------------
    2147418112 2147418112 3 files, 0 folders

     
  • Igor Pavlov
    Igor Pavlov
    2012-02-27

    If you want to open NTFS subfile without extracting to temp folder, you can do it only in 7-Zip File Manager.

     
  • Saji
    Saji
    2012-02-27

    How to list the subfile in NTFS using 7z.exe cli. What command line option need to be given for listing equivalent to "l"?

     
  • Igor Pavlov
    Igor Pavlov
    2012-02-27

    1) extact .ntfs file from .wim to some temp folder.
    2) call list command for that .ntfs file in temp folder.

    Are you related to "vigneshrams" user?

     
  • Igor Pavlov
    Igor Pavlov
    2012-02-27

    correction:
    1) extact .ntfs file from .vhd to some temp folder.
    2) call list command for that .ntfs file in temp folder.

     
  • Saji
    Saji
    2012-02-27

    Thanks..

     
  • Saji
    Saji
    2012-03-12

    Hi,
    I am trying to open a differencing VHD using 7 zip file manager. I opens xxx.mbr file and then when i try to open it ( xxx.mbr file) again. It says "Unsupported compression error".. Any Suggestion ?

    Thanks,

    Saji

     
  • Igor Pavlov
    Igor Pavlov
    2012-03-12

    Are you related to "vigneshrams" user?

     
  • Saji
    Saji
    2012-03-12

    yes. Any Suggestion or work around you can give on this.

     
  • Igor Pavlov
    Igor Pavlov
    2012-03-12

    Do you use two sourceforge nicknames and why?

     
  • Saji
    Saji
    2012-03-12

    We are two people of same team.

     
  • Igor Pavlov
    Igor Pavlov
    2012-03-12

    Does Microsoft programs work OK with these differencing VHD?
    Does 7-Zip work OK with other differencing VHD?

     
  • Saji
    Saji
    2012-03-12

    I created differencing disk using Microsoft diskpart. I was able to attach it in DiskMgmt, where as 7 zip did not open the differencing vhd. Any Suggestion to proceed on this further …

     
  • Igor Pavlov
    Igor Pavlov
    2012-03-12

    Can you create some SMALL example of such vhd and upload to some server in compressed form for me?

     
  • Saji
    Saji
    2012-03-12

    Thanks., I will let you know once i am done with uploading to a server for your access.

     
  • Saji
    Saji
    2012-03-12

    You can download from this link. This archive contains two VHD files. Parent.vhd is actually a dynamic VHD and child.vhd is differencing disk. This would be working only if we maintain the following folder structure "G:\Upload" (As the location will be an entry in the child.vhd for referring its parent.vhd).  If you would like to create your own differencing vhd, you can refer this link.
    NOTE : Works for windows only. Let me know if you have any problem in downloading the files or in the VHD creation process.
    Thanks.

     
  • Saji
    Saji
    2012-03-13

    Hi, Any update! were u able to download files from the given links?

     
  • Igor Pavlov
    Igor Pavlov
    2012-03-13

    Differencing VHD contains pathname of parent VHD file in several places:
    1) in Parent Unicode Name
    2) in Parent Locators.

    Parent Unicode Name(1) can be absolute or relative.
    Parent Locators(2) contain absolute and relative pathnames.

    7-Zip now supports only pathname from Parent Unicode Name(1) and only if it's relative.
    Your  VHD contains Absolute pathname. So 7-Zip can't open parent.
    I'll fix the code in next version of 7-Zip to use relative pathnames from Parent Locators(2).

     
  • Saji
    Saji
    2012-03-13

    Hi,
    Thanks for your time. Good Job. What changes in 7 zip current version should be made to make the child vhd see the parent vhd even if has absolute path in parent unicode name?

     
  • Igor Pavlov
    Igor Pavlov
    2012-03-13

    You can replace absolute path (Dyn.ParentName) to relative path in VhdHandler.cpp:
      HRESULT res = openVolumeCallback->GetStream(Dyn.ParentName, &nextStream);
    or you can change the code (to generate correct path) in client application:
    1) 7-Zip file manager: OpenCallback.cpp:
    STDMETHODIMP COpenArchiveCallback::GetStream(const wchar_t *name, IInStream **inStream)

      FString fullPath;
      if (IsPathAbsolute(name))
        fullPath = us2fs(name);
      else
        fullPath = _folderPrefix + us2fs(name);

    2) 7-Zip CLI:
    ArchiveOpenCallback.cpp:
    STDMETHODIMP COpenCallbackImp::GetStream(const wchar_t *name, IInStream **inStream)

     
  • Saji
    Saji
    2012-03-13

    Thanks ., Great work.  I will try the same and let you know if any issues. Thanks..

     
  • Saji
    Saji
    2012-03-13

    Hi,

    I got the differencing disk  working. Thanks a lot.

    Now, I found that, when opening a vhd that contains a raw partitioned file system in it. The 7zip shows the partition as FAT.
    For ex: VHD contains 2 NTFS and 1 RAW partition. On Opening the VHD with 7 zip, the first 2 partition shown as 0.ntfs, 1.ntfs but the third raw partition is shows as 1.fat. How can i find if there exist a Raw partition in the VHD? How to differentiate a real FAT filesystem partition and the RAW partition?

     
  • Igor Pavlov
    Igor Pavlov
    2012-03-13

    You can check MbrHandler.cpp.
    it contains table
    static const CPartType kPartTypes =
    {
      { 0x01, kFat, "FAT12" },
      { 0x04, kFat, "FAT16 DOS 3.0+" },
      { 0x05, 0, "Extended" },
    ….
    What id do you see for that raw partition?
    You can debug MbrHandler.cpp code.

     
  • Saji
    Saji
    2012-03-15

    Hi,

    Using FM project i tried opening the RAW partition and it showed the RAW partition as FAT 16 DOS 3.0+.,

     
  • Igor Pavlov
    Igor Pavlov
    2012-03-16

    1) show
    7z l a.vhd -slt
    2) Where do you see "FAT 16 DOS 3.0+"?
    If you can open partition as FAT, it's not RAW, it's FAT.

     
1 2 > >> (Page 1 of 2)