Jump to content

Formatting an external drive using different interfaces


Recommended Posts

Posted

Only a quick update.

There are actually issues with the mounting/recognizing as RAW/etc., but hopefully I have found a method using Diskpart that seems to work.

About your current issue, the files (as modified) that you have should be fine.

A guess, but the total space partitioned might be needed being 8 times the size of the FAT12 image, or if you prefer the NTFS partition should be at least 7 times the size of the FAT12 you choose when running the batch.

Is it possible that you chose a too big FAT12 (or a too little NTFS partition) size?

Can you try again using a smallish FAT 12 size (say 1, 2 or 3 Mb) or a much larger NTFS hand made partition (at least 32*7=224+1=225 Mb if you choose the max 32 Mb size for the FAT12)?

 

Or, if you have some patience, in a couple more days I could come out with a more "sound" set of batches.

 

jaclaz


Posted

I did choose the maximum 32 MB for the FAT partition, but the NTFS partition is the rest of the disk, over 900 GB!

I'll try with a smaller FAT partition and see if I get the same result.

:)

Posted (edited)

I did choose the maximum 32 MB for the FAT partition, but the NTFS partition is the rest of the disk, over 900 GB!

I'll try with a smaller FAT partition and see if I get the same result.

:)

Yep, but if my guess is correct then we will need to limit the size of the FAT12 partition, judging from the screenshot you posted on #133, I see a FAT12 partition of 32 Mb and a NTFS (though temporarily seen as RAW) 116.41 GB volume. :unsure:

 

But I believe that here is something that is simply not right.

It is possible that you really need the modified batches.

 

IF the FAT12 partition is seen as 32 Mb in size, then it means that the screenshot is taken when the disk is mounted as 512 bytes/sector.

(as if the disk was properly configured and mounted as 4Kb  while the size of the volume would still be 32 Mb in reality, it would be seen as a partitioned space sized around 8 times that size, before the NTFS partition, while the size of the NTFS partition will be "constant").

I am attaching a couple screenshots of my current results using a 7 Mb FAT12 partition.

 

Sorry for the teasing :w00t::ph34r:, it is not meant as such, but I still have to run a few more checks before posting the modified batches.

 

jaclaz

post-25215-0-45687700-1423224285_thumb.j

post-25215-0-74562200-1423224300_thumb.j

Edited by jaclaz
Posted (edited)

What I'm seeing on the USB connection is still absolutely correct, a 256 MB FAT partition and a 931.26 GB NTFS partition.

The same disk just switched to the eSATA connection shows a 32 MB FAT partition, a 116.41 GB RAW partition, and 815.07 GB unallocated.

The fact that it's showing correctly still on USB even after the switching process presumably means that the switching process did not work at all, at least not as it should have done!

 

I will clear all the partitions and try again from scratch, this time with a 3 MB FAT partition instead of 32 MB, and see what that does.

:)

 

EDIT:

I deleted the partitions using the eSATA connection.

When I went over to the USB connection the disk showed correctly as completely unallocated in Disk Management, but when I looked with DISKPART there was still a partition on it which was Partition 0, reported as being 4096 Bytes in size at offset 252 KB.

Is that what you would expect?

I used DISKPART to delete it.

Edited by Dave-H
Posted (edited)

Will do!

:yes:

 

I tried the disk routine again, creating a 3 MB drive initially this time instead of 32 MB.

All seemed OK on the USB side -

Microsoft Windows [Version 6.3.9600](c) 2013 Microsoft Corporation. All rights reserved.C:\windows\system32>cd\C:\>cd mkprilogC:\MkPriLog>mkprilogplease input an approximated size in Megabytes for the FAT12 partition, minimum1, maximum 32...The image will be created in the same folder as this batchand will be named PriLog.img3Writing MBR at offset 0 ...... done.... done.Writing the 512 bytes/sector bootsector BPB at offset 32768 ...BS512_Res=456BS512_SBef=64BS512_Sectors=6080BS512_SpF=8... done.... done.Writing the 4096 bytes/sector bootsector BPB at offset 262144...... done.Writing FAT tables incipit ...... done.Base address of EPBR 512 is 389120Base address of EPBR 4Kb is 3112960Press any key to continue . . ..The image should have been created as PriLog.img, now you need tomanually dd it to the destination disk, a suitable command would be:dsfi.exe \\.\PhysicalDrive[n] 0 0 PriLog.imgMake sure that you use the RIGHT Disk Number [n], do check in Disk Manager.The disk can be mounted indifferently through the 4kb or the 512bytes/sector interface to deploy the image.Once the image has been deployed you may need to disconnect and reconnect thedisk to have the FAT12 volume be recognized and mounted.Then you can go to Disk Manager and create a Primary partition, NTFS formattedextending on all the available space on disk (or on just a portion of it).It is "better" to use a Vista (or later) OS to create the NTFS partitionThe partition would be better if Megabyte aligned.(or do it manually or use a suitable third-party tool) as the XP will align iton head/cylinder boundaries, whilst a MB-aligned partition will be faster onslow buses such as USB 2.0The partition and the NTFS filesystem MUST be created when the disk is connected asa 4kb sectored device, this is NOT negotiable.Once the second partition has been created, and I repeat, this MUST be donewith the device connected as 4kb sectored, you can run the mkdualdisk.cmdWhich will modify the disk and create the needed EPBR's.C:\MkPriLog>dsfi \\.\PhysicalDrive1 0 0 PriLog.imgOK, written 3145728 bytes at offset 0C:\MkPriLog>mkdualdisk"DUAL" disk found as \\.\PHYSICALDRIVE1Creating a temporary copy of the MBROK, 4096 bytes, 0.047s, MD5 = 66f00e2856e8fb53d8d47fa8a0c974bdNow the extent of the FAT12 partition is 704We need to multiply this value by 8, once increased by 64, and then subtract 64Offset 474=0xC0,0x17,0x00,0x00Now the extent of the FAT12 partition is 6080000001B8h: 44 55 41 4C DUAL000001BEh: 00 00 00 00 0F 00 00 00 3F 00 00 00 01 00 00 00000001CEh: 00 00 00 00 01 00 00 00 40 00 00 00 C0 17 00 00000001DEh: 00 0C 0D 00 07 FE FF FF 00 03 00 00 00 08 8E 0E000001EEh: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Condition #1, Prilog=1Condition #1, Prilog=2Condition #1, Prilog=3Condition #1, Prilog=3Condition #1, Prilog=4Condition #1, Prilog=5Entry446=000000000F0000003F00000001000000Entry446_Length=1Entry446_LengthHex=00000001Entry446_Start=63Entry446_StartHex=0000003FEntry446_Type=0FEntry462=000000000100000040000000C0170000Entry462_Length=6080Entry462_LengthHex=000017C0Entry462_Start=64Entry462_StartHex=00000040Entry462_Type=01Entry478=000C0D0007FEFFFF0003000000088E0EEntry478_Length=244189184Entry478_LengthHex=0E8E0800Entry478_Start=768Entry478_StartHex=00000300Entry478_Type=07Entry494=00000000000000000000000000000000Entry494_Length=0Entry494_LengthHex=00000000Entry494_Start=0Entry494_StartHex=00000000Entry494_Type=00sum462=6144by8=6144by8XP=5640The disk was recognized as created with the Prilog schemeCreating a temporary copy of the NTFS partition bootsectorOK, 4096 bytes, 0.000s, MD5 = 00fd23983d9c4d7123f9eade7f752b1ePress any key to continue . . .Creating a copy of the 4kb bytes/sector NTFS bootsectorAnd modifying it to become the 512 bytes/sector NTFS bootsectorOffset 11=0x00,0x02,0x08Offset 28=0x00,0x18,0x00,0x00Offset 40=0xF8,0x3F,0x70,0x74OK, 4096 bytes, 0.000s, MD5 = b4a25b364281dc40e3203fbacd9df49bPress any key to continue . . .Creating a copy of the 4kb bytes/sector EPBRand writing to it the values for the NTFS volumeOK, 4096 bytes, 0.000s, MD5 = fc86b746e3b8c6f0108aaf1a1ac6271aOffset 450=0x07Offset 454=0xC1,0x02,0x00,0x00Offset 458=0x00,0x08,0x8E,0x0ECreating a copy of the 512 bytes/sector EPBRand writing to it the values for the NTFS volumeOK, 4096 bytes, 0.000s, MD5 = 620f0b67a91f7f74151bc5be745b7110Offset 4034=0x07Offset 4038=0xC1,0x17,0x00,0x00Offset 4042=0x00,0x40,0x70,0x74Press any key to continue . . .If you are on Vista or later you may need to authorize three timesthe writes to disk (UAC prompt)Press any key to continue . . .OK, written 4096 bytes at offset 0OK, written 4096 bytes at offset 29672OK, written 4096 bytes at offset 258048C:\MkPriLog>

After formatting the NTFS partition everything was correct as expected on the USB machine.

 

I then switched the disk over to the eSATA interface.

The 3 MB drive appeared but nothing else.

I then realised that I hadn't copied the necessary switching files to it, so I decided to go back to the USB interface to do it (as that's where I would have done it had I not forgotten!)

 

The 3 MB drive reappeared on the other machine, but not the large NTFS drive which had been there before.

Disk Management is now showing it as a primary partition with no file system or drive letter.

It doesn't say it's RAW unformatted, but if I try to do anything (like format or change drive letter) Disk Management just throws up an error message.

Rebooting makes no difference, and there are no relevant entries in any of the system logs.

I did nothing on the eSATA machine other than switch the disk over to it and open the small drive, but it looks as if just doing that has corrupted the structure when back on the USB interface!

 

post-84253-0-43829400-1423246070_thumb.j

 

This is the USB machine Disk Management as it is now.

The eSATA machine Disk Management reports the large partition as "unallocated".

:(

Edited by Dave-H
Posted (edited)

OK, let's see if this version works. :unsure: (0.06 09 February 2015)

 

Please do re-read ATTENTIVELY the readme.txt AND any output/feedback given by the batches.

 

 

jaclaz 

 

 

mkprilog.zip

Edited by jaclaz
Posted

Hi Jaclaz, and sorry for the delay in replying.

Tried with the new batches, with the USB connection on 8.1 with elevated prompts.

Microsoft Windows [Version 6.3.9600](c) 2013 Microsoft Corporation. All rights reserved.C:\windows\system32>cd\mkprilogC:\mkprilog>mkprilogplease input an approximated size in Megabytes for the FAT12 partition, minimum1, maximum 32...The image will be created in the same folder as this batchand will be named PriLog.img32Writing MBR at offset 0 ...... done.Writing the 512 bytes/sector bootsector BPB at offset 32768 ...... done.Writing the 4096 bytes/sector bootsector BPB at offset 262144...... done.Writing FAT tables incipit ...... done.Press any key to continue . . ..The image should have been created as PriLog.img, now you need tomanually dd it to the destination disk, a suitable command would be:dsfi.exe \\.\PhysicalDrive[n] 0 0 PriLog.imgMake sure that you use the RIGHT Disk Number [n], do check in Disk Manager.The disk can be mounted indifferently through the 4kb or the 512 bytes/sectorinterface to deploy the image.Once the image has been deployed you may need to disconnect and reconnect thedisk to have the FAT12 volume be recognized and mounted to a drive letter.Then you can go to Disk Manager and create a Primary partition, NTFS formattedextending on all the available space on disk (or on just a portion of it).The size of the NTFS partition you create must be at least 7 times the size ofthe FAT12 one.It is "better" to use a Vista (or later) OS to create the NTFS partition asthe partition would be better if Megabyte aligned.(or do it manually or use a suitable third-party tool) as the XP will align iton head/cylinder boundaries, whilst a MB-aligned partition will be faster onslow buses such as USB 2.0The partition and the NTFS filesystem MUST be created when the disk is connectedas a 4kb sectored device, this is NOT negotiable.Once the second partition has been created, and I repeat, this MUST be donewith the device connected as 4kb sectored, you can run the mkdualdisk.cmdWhich will modify the disk and create the needed EPBR's.Press any key to continue . . .C:\mkprilog>dsfi \\.\PhysicalDrive1 0 0 PriLog.imgOK, written 33554432 bytes at offset 0C:\mkprilog>mkdualdisk"DUAL" disk found as \\.\PHYSICALDRIVE1Creating a temporary copy of the MBRdsfo \\.\PHYSICALDRIVE1 0 4096 temp.mbrOK, 4096 bytes, 0.031s, MD5 = dde5a655ffb6537e52cf7d354f811bdfNow the extent of the FAT12 partition is 8128We need to multiply this value by 8Now the extent of the FAT12 partition is 65024000001B8h: 44 55 41 4C DUAL000001BEh: 00 00 00 00 0F 00 00 00 3F 00 00 00 01 00 00 00000001CEh: 00 00 00 00 01 00 00 00 40 00 00 00 00 FE 00 00000001DEh: 00 82 03 00 07 FE FF FF 00 20 00 00 00 EB 8D 0E000001EEh: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00The disk was recognized as created with the Prilog schemeCreating a temporary copy of the NTFS partition bootsectordsfo \\.\PHYSICALDRIVE1 33554432 4096 tempNTFS.bssOK, 4096 bytes, 0.016s, MD5 = 8310c91f046fe453459d5affed51743aPress any key to continue . . .and copying it to the filedsfo tempNTFS.bss 0 0 as4kbNTFS.bssOK, 4096 bytes, 0.000s, MD5 = 8310c91f046fe453459d5affed51743aCreating a copy of the 4kb bytes/sector NTFS bootsectorAnd modifying it to become the 512 bytes/sector NTFS bootsectordsfo tempNTFS.bss 0 0 as512NTFS.bssOK, 4096 bytes, 0.000s, MD5 = 403674ef19b611fab1bd61e66a629842Press any key to continue . . .Creating a copy of the 4kb bytes/sector EPBRand writing to it the values for the NTFS volumeOK, 4096 bytes, 0.000s, MD5 = fc86b746e3b8c6f0108aaf1a1ac6271aCreating a copy of the 512 bytes/sector EPBRand writing to it the values for the NTFS volumeOK, 4096 bytes, 0.000s, MD5 = 620f0b67a91f7f74151bc5be745b7110Press any key to continue . . .Now we write the sectors to the diskdsfi \\.\PHYSICALDRIVE1 0 4096 Prilog.mbrOK, written 4096 bytes at offset 0dsfi \\.\PHYSICALDRIVE1 29672 4096 EPBR1_512.epbOK, written 4096 bytes at offset 29672dsfi \\.\PHYSICALDRIVE1 258048 4096 EPBR1_4Kb.epbOK, written 4096 bytes at offset 258048Deleting temporary files ...temp.mbr deletedtempNTFS.bss deletedPrilog.mbr deletedEPBR1_4kb.epb deletedEPBR1_512.epb deletedPress any key to continue . . .C:\mkprilog>

Everything was fine, with drive G: and drive H: present and correct until I unplugged and re-plugged the disk.

At that point only the first drive G: returned, drive H: had gone and Disk Management again showed it as a "blank" primary partition, with no drive number or file system as in my previous screen grab.

Copying the switching files across to G: and running the switcher just produced "the parameter is incorrect" repeated over and over.

:(

 

Posted

Hmmm, try checking what happens now in the Windows XP.

 

Before you run the mkdualdisk.cmd the second (NTFS) partition is mapped as a Primary partition (which you just created).

Once you run the mkdualdisk.cmd that same partition is re-mapped as a logical volume inside (fake) extended partition, but most probably the situation is not updated until you disconnect and re-connect disk.

 

It is perfectly possible that the stupid Windows 8/8.1 somehow does not accept this "abnormal" partitioning scheme :unsure: but I am not yet fully convinced of this, while it is entirely possible that the switcher.cmd does not work because of this missing pre-requisite (the Windows 8.1 not "seeing" the logical volume).

 

Or, try doing the following:

  1. in Windows 8.1 re-start from the "dsfi \\.\PhysicalDrive1 0 0 PriLog.img"
  2. still in Windows 8.1 re-create and format the NTFS partition
  3. reboot to the Windows XP (it should not matter if the disk is connected to the XP through the 512 or 4096 bytes/sector interface) and run from the XP the mkdualdisk.cmd and copy to the first (FAT12) partition the switcher.cmd (and related files)
  4. try to run the switcher.cmd

What happens?

 

 

jaclaz

Posted

I've tried leaving things exactly as they are, and simply re-booted the USB connected machine into XP.

Both G: and H: drives appear correctly in Explorer!

 

Disk Management is still not as it should be though.

It correctly shows drive G: as a 254 MB primary FAT partition, but there are two other large partitions shown.

 

One is a logical drive within an extended partition of 931.48 GB, NTFS formatted, and allocated as drive H: and the other is a 932.25 GB partition shown as unallocated!

:o

I will try the whole thing from scratch again just using XP to make sure that it does work properly with both machines in XP, and then I'll try again doing the first part in 8.1 and the second part in XP as you suggested.

:)

Posted

One is a logical drive within an extended partition of 931.48 GB, NTFS formatted, and allocated as drive H: and the other is a 932.25 GB partition shown as unallocated!

:o

 

This is "queer".

 

Look ATTENTIVELY at the screenshots I posted earler:

http://www.msfn.org/board/topic/173265-formatting-an-external-drive-using-different-interfaces/page-6#entry1094034

 

The one "on the left" is related to the disk mounted as 512 bytes/sector and shows:

  1. a primary FAT12 partition 7 Mb in size (i.e. the size I used in mkprilog.cmd)
  2. between the above and the below the "fake" unallocated
  3. a logical inside extended NTFS volume the size I created it (i.e. around 73 Mb)

 

The one "on the right" is related to the disk mounted as 4096 bytes/sector and it shows:

  1. a primary FAT12 partition 54 Mb in size (i.e. the size I used in mkprilog.cmd multiplied by 8)
  2. a logical inside extended NTFS volume the size I created it (i.e. around 73 Mb) immediately following the above

Can you try again, this time giving 7 Mb as input in the mkprilog.cmd and creating a NTFS partition of 73 Mb? 

(this way the disk manager views in XP should be similar to the ones I obtained)

 

I am starting to think that for *some* reasons (my fault *somewhere*) the batch(es) make a mess with the size and location of the FAT12 partition :ph34r:, i.e. when I multiply the size by 8 I am doing it wrong or doing it without checking if needed or not (when making last modifications I must have copied over unwantingly a "test" setting :unsure:).

 

I'll recheck ... 

 

jaclaz

Posted

Well something is certainly amiss, as I've just tried again from scratch using XP on the USB connected machine, and everything apparently went OK again.

Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.D:\Users\Dave>c:C:\>cd mkprilogC:\mkprilog>mkprilogplease input an approximated size in Megabytes for the FAT12 partition, minimum1, maximum 32...The image will be created in the same folder as this batchand will be named PriLog.img32Writing MBR at offset 0 ...... done.Writing the 512 bytes/sector bootsector BPB at offset 32768 ...... done.Writing the 4096 bytes/sector bootsector BPB at offset 262144...... done.Writing FAT tables incipit ...... done.Press any key to continue . . ..The image should have been created as PriLog.img, now you need tomanually dd it to the destination disk, a suitable command would be:dsfi.exe \\.\PhysicalDrive[n] 0 0 PriLog.imgMake sure that you use the RIGHT Disk Number [n], do check in Disk Manager.The disk can be mounted indifferently through the 4kb or the 512 bytes/sectorinterface to deploy the image.Once the image has been deployed you may need to disconnect and reconnect thedisk to have the FAT12 volume be recognized and mounted to a drive letter.Then you can go to Disk Manager and create a Primary partition, NTFS formattedextending on all the available space on disk (or on just a portion of it).The size of the NTFS partition you create must be at least 7 times the size ofthe FAT12 one.It is "better" to use a Vista (or later) OS to create the NTFS partition asthe partition would be better if Megabyte aligned.(or do it manually or use a suitable third-party tool) as the XP will align iton head/cylinder boundaries, whilst a MB-aligned partition will be faster onslow buses such as USB 2.0The partition and the NTFS filesystem MUST be created when the disk is connectedas a 4kb sectored device, this is NOT negotiable.Once the second partition has been created, and I repeat, this MUST be donewith the device connected as 4kb sectored, you can run the mkdualdisk.cmdWhich will modify the disk and create the needed EPBR's.Press any key to continue . . .C:\mkprilog>dsfi \\.\PhysicalDisk1 0 0 PriLog.img\\.\PhysicalDisk1 - The system cannot find the file specified.C:\mkprilog>mkprilogplease input an approximated size in Megabytes for the FAT12 partition, minimum1, maximum 32...The image will be created in the same folder as this batchand will be named PriLog.img32Writing MBR at offset 0 ...... done.Writing the 512 bytes/sector bootsector BPB at offset 32768 ...... done.Writing the 4096 bytes/sector bootsector BPB at offset 262144...... done.Writing FAT tables incipit ...... done.Press any key to continue . . ..The image should have been created as PriLog.img, now you need tomanually dd it to the destination disk, a suitable command would be:dsfi.exe \\.\PhysicalDrive[n] 0 0 PriLog.imgMake sure that you use the RIGHT Disk Number [n], do check in Disk Manager.The disk can be mounted indifferently through the 4kb or the 512 bytes/sectorinterface to deploy the image.Once the image has been deployed you may need to disconnect and reconnect thedisk to have the FAT12 volume be recognized and mounted to a drive letter.Then you can go to Disk Manager and create a Primary partition, NTFS formattedextending on all the available space on disk (or on just a portion of it).The size of the NTFS partition you create must be at least 7 times the size ofthe FAT12 one.It is "better" to use a Vista (or later) OS to create the NTFS partition asthe partition would be better if Megabyte aligned.(or do it manually or use a suitable third-party tool) as the XP will align iton head/cylinder boundaries, whilst a MB-aligned partition will be faster onslow buses such as USB 2.0The partition and the NTFS filesystem MUST be created when the disk is connectedas a 4kb sectored device, this is NOT negotiable.Once the second partition has been created, and I repeat, this MUST be donewith the device connected as 4kb sectored, you can run the mkdualdisk.cmdWhich will modify the disk and create the needed EPBR's.Press any key to continue . . .C:\mkprilog>dsfi \\.\PhysicalDrive1 0 0 PriLog.imgOK, written 33554432 bytes at offset 0C:\mkprilog>mkdualdisk"DUAL" disk found as \\.\PHYSICALDRIVE1Creating a temporary copy of the MBRdsfo \\.\PHYSICALDRIVE1 0 4096 temp.mbrOK, 4096 bytes, 0.031s, MD5 = 0a3a478c442a5936d930dc6c0b739a1aNow the extent of the FAT12 partition is 8128We need to multiply this value by 8Now the extent of the FAT12 partition is 65024000001B8h: 44 55 41 4C DUAL000001BEh: 00 00 00 00 0F 00 00 00 3F 00 00 00 01 00 00 00000001CEh: 00 00 00 00 01 00 00 00 40 00 00 00 00 FE 00 00000001DEh: 00 82 03 00 07 FE FF FF 00 20 00 00 60 E3 8D 0E000001EEh: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00The disk was recognized as created with the Prilog schemeCreating a temporary copy of the NTFS partition bootsectordsfo \\.\PHYSICALDRIVE1 33554432 4096 tempNTFS.bssOK, 4096 bytes, 0.015s, MD5 = 74b25dd76463c358c9212b5cff6e1808Press any key to continue . . .and copying it to the filedsfo tempNTFS.bss 0 0 as4kbNTFS.bssOK, 4096 bytes, 0.000s, MD5 = 74b25dd76463c358c9212b5cff6e1808Creating a copy of the 4kb bytes/sector NTFS bootsectorAnd modifying it to become the 512 bytes/sector NTFS bootsectordsfo tempNTFS.bss 0 0 as512NTFS.bssOK, 4096 bytes, 0.000s, MD5 = d5989789ba3a5e789756481f81d0cf03Press any key to continue . . .Creating a copy of the 4kb bytes/sector EPBRand writing to it the values for the NTFS volumeOK, 4096 bytes, 0.000s, MD5 = fc86b746e3b8c6f0108aaf1a1ac6271aCreating a copy of the 512 bytes/sector EPBRand writing to it the values for the NTFS volumeOK, 4096 bytes, 0.015s, MD5 = 620f0b67a91f7f74151bc5be745b7110Press any key to continue . . .Now we write the sectors to the diskdsfi \\.\PHYSICALDRIVE1 0 4096 Prilog.mbrOK, written 4096 bytes at offset 0dsfi \\.\PHYSICALDRIVE1 29672 4096 EPBR1_512.epbOK, written 4096 bytes at offset 29672dsfi \\.\PHYSICALDRIVE1 258048 4096 EPBR1_4Kb.epbOK, written 4096 bytes at offset 258048Deleting temporary files ...temp.mbr deletedtempNTFS.bss deletedPrilog.mbr deletedEPBR1_4kb.epb deletedEPBR1_512.epb deletedPress any key to continue . . .C:\mkprilog>

However, once again when the disk was disconnected and re-connected, although everything looked fine in Explorer, Disk Management was still wrong.

post-84253-0-33000500-1423695798_thumb.j

:}

Posted

Dave-H,

the experiment is about a non-standard, border-line (or possibly even beyond the border :ph34r:), crazy :w00t: partitioning scheme.

 

What you will see (or not see) in Disk Manager is or can be either accurate or totally inaccurate, but this has NO real meaning, what matters is whether both volumes (the smallish FAT12 one and the largish NTFS one) are accessible BOTH when connected to the 512 bytes/sector interface and when connected to the 4096 bytes/sector one.

Running the switcher.cmd, even if the bootsector of the NTFS partition is already the "right" one should allow to make sure that a drive letter is assigned to th eNTFS volume (while a drive letter should always be assigned automatically to the FAT12 partition at connection time), in other words the idea (once/if everything goes as expected) is that these "dual mode" disks should never need to be viewed or "touched/modified" in Disk Manager.

 

As I asked you before, do you have an XP to which you can connect the disk once as 512  bytes/sector and as 4096 bytes sector?

If yes, can you try running the switcher command and verify that you can access both drives on both the interfaces?

 

Explanation, being it so border-line, it is possible that:

1) the scheme only works on XP in my virtual environment and not in your real one

2) the scheme only works for some sizes of the parititons volumes

3) I have still some errors in the batches and what you get is different from the expected result

4) once we have determined that (hopefully) you can reproduce what I get here on XP, then it is entirely possible that the same scheme (for *whatever* reason) does not work in 8/8.1 (and we will need to use one of the alternative scheme(s)), but since - more or less - the "building engine" is ready, it will be easier to experiment with these alternative schemes.

 

I have NO WAY to attempt reproducing in my "virtual" environment such big sized partitions, can you please try reducing the sizes (just for the test) in order to see if the batches on your system (and on XP) can reproduce a Disk Manager view similar to the one I posted on #138?

 

 

 

Or, try doing the following:

  1. in Windows 8.1 re-start from the "dsfi \\.\PhysicalDrive1 0 0 PriLog.img"
  2. still in Windows 8.1 re-create and format the NTFS partition
  3. reboot to the Windows XP (it should not matter if the disk is connected to the XP through the 512 or 4096 bytes/sector interface) and run from the XP the mkdualdisk.cmd and copy to the first (FAT12) partition the switcher.cmd (and related files)
  4. try to run the switcher.cmd

 

Can you try again, this time giving 7 Mb as input in the mkprilog.cmd and creating a NTFS partition of 73 Mb? 

(this way the disk manager views in XP should be similar to the ones I obtained)

 

 

I have to understand if the batches can produce on your real environment what they produce in my "virtual" one, next thing, also it is extermely difficult for me to understand from the results you post on which system/OS/Connection is run what.

As I have understood it (correct me if I am wrong) you have 8 possibilities, i.e. 2 systems, 2 OS, 2 connection modes, let's call them:

  1. PC1XP512
  2. PC1XP4096
  3. PC181512
  4. PC1814096
  5. PC2XP512
  6. PC2XP4096
  7. PC281512
  8. PC2814096

Can you add the information on which system/Os/Connection either the output of the batches or the Disk Manager view belongs to?

 

jaclaz

Posted

Hi jaclaz.

Before doing anything else, I just wanted to let you know completely what is happening with XP at the moment.

Going over to the eSATA machine and running switched worked fine, although as you can see the resulting layout in Disk Management is even stranger than it is on the USB machine!

 

post-84253-0-60964000-1423748760_thumb.j

 

From what you say however, this does not matter, but you should mention it in the readme file so people don't panic!

The drives are actually working fine.

 

Going back to the USB machine and running switcher wasn't successful however.

Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.D:\Users\Dave>g:G:\>switcherXP or 2003 ..."DUAL" disk found as \\.\PHYSICALDRIVE1Disk is mounted as 4096 bytes/sectorOK, NTFS volume is mounted to drive H: ......Currently deployed bootsector is the 512 bytes/sector oneCurrently mounted NTFS bootsector is NOT the 4kb bytes/sector one.Trying to refresh mounting ...Removing drive letter H: ......done.Re-assigning drive letter H:...done.No dice, going to switch it ...Do you want to switch to the 4kb bootsector? [Y/N]ydsfi \\.\H: 0 0 as4kbNTFS.bss\\.\H: - The system cannot find the file specified.Removing drive letter H: ......done.Re-assigning drive letter H:...done.OK, NTFS volume is mounted to drive E: ......Currently deployed bootsector is the 512 bytes/sector oneCurrent NTFS bootsector is the 4kb bytes/sector one, good.Nothing to switch.Press any key to continue . . .G:\>

As you can see, it's saying at one point that it can't find a file, which is puzzling as both dsfi.exe and as4kbNTFS.bss are definitely on drive G: in the root.

Anyway the result is that the large NTFS partition isn't mounted, and switching back to the eSATA machine shows that nothing has actually changed.

:no:

Posted

The drives are actually working fine.

Good :), a little step in the right direction.

The issue is here (within switcher.cmd):

OK, NTFS volume is mounted to drive H: ...

...

Currently deployed bootsector is the 512 bytes/sector one

Currently mounted NTFS bootsector is NOT the 4kb bytes/sector one.

Trying to refresh mounting ...

Removing drive letter H: ...

...done.

Re-assigning drive letter H:

...done.

No dice, going to switch it ...

Do you want to switch to the 4kb bootsector? [Y/N]y

dsfi \\.\H: 0 0 as4kbNTFS.bss

\\.\H: - The system cannot find the file specified.

Removing drive letter H: ...

...done.

Re-assigning drive letter H:

...done.

OK, NTFS volume is mounted to drive E: ...

  • The batch detects the NTFS volume as drive H:, checks it's current bootsector, recognizing it as the 512 bytes one <- till now everything seems fine
  • then it attempts to remove the drive and re-assign to it a drive letter <- this is provided as in some cases it is possible that the volume is seen as "RAW" (if you right click on the volume in explorer and select properties) THIS IS THE PART THAT FAILS
  • it continues nonetheless, but since for *some reasons* the drive letter H: was not re-assigned to it, it FAILS (and FAILS BIG) at deploying the bootsector (the "missing file" in the dsfi message is the actual \\.\H: volume)
#2 above is done through a set of diskpart scripts, that basically amount to:

 

 

 

select disk %Disk#%list volumeexit
 

select Volume %Volume#%removeexit
 

select Volume %Volume#%assignexit
The value of %Disk#% is surely correct as it is assigned by a "direct find" in WMI, and it amounts to "1", coming from the  intitial "\\.\PHYSICALDRIVE1", the value of %Volume#% may instead well be wrongly assigned, as it comes from parsing the diskpart output of the first diskpart script :ph34r:.

Try editing the switcher.cmd  in the :doremount subroutine, this part:

 

 

SET ThisDriveLetter=%SecondDriveLetter::=%FOR /F "tokens=1,2,3 delims= " %%A IN ('MORE +!More_offset! %~dpnx0^|diskpart.exe^|FIND /v /i "DISKPART"') DO (IF "%%C"=="%ThisDriveLetter%" SET Volume#=%%B)IF NOT DEFINED Volume# GOTO :error2
 

 

so that it becomes:

 

 

 

SET ThisDriveLetter=%SecondDriveLetter::=%ECHO This is :doremountMORE +!More_offset! %~dpnx0|diskpart.exe|FIND /v /i "DISKPARTFOR /F "tokens=1,2,3 delims= " %%A IN ('MORE +!More_offset! %~dpnx0^|diskpart.exe^|FIND /v /i "DISKPART"') DO (IF "%%C"=="%ThisDriveLetter%" SET Volume#=%%B)SET Volume#PAUSEIF NOT DEFINED Volume# GOTO :error2
 

 

and post the output when the batch pauses.

Can you also please:

Going back to the USB machine and running switcher wasn't successful however.

Anyway the result is that the large NTFS partition isn't mounted, and switching back to the eSATA machine shows that nothing has actually changed.

take note of this:

I have to understand if the batches can produce on your real environment what they produce in my "virtual" one, next thing, also it is extremely difficult for me to understand from the results you post on which system/OS/Connection is run what.

As I have understood it (correct me if I am wrong) you have 8 possibilities, i.e. 2 systems, 2 OS, 2 connection modes, let's call them:

  • PC1XP512
  • PC1XP4096
  • PC181512
  • PC1814096
  • PC2XP512
  • PC2XP4096
  • PC281512
  • PC2814096
Can you add the information on which system/Os/Connection either the output of the batches or the Disk Manager view belongs to?
If we don't find a common, easy enough, way to identify which is which we risk a misunderstanding.

jaclaz

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...