Jump to content











Photo
- - - - -

[Release] ptnfloat.cmd, make your partition entry float to #0


  • Please log in to reply
16 replies to this topic

#1 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15042 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 19 December 2014 - 03:33 PM

For NO apparent reason :dubbio:, if not to provide a temporary replacement for plutonium :w00t: ;):
http://reboot.pro/to...files/?p=189253
 
 
 

Typical XYZ problem, again. :frusty:
http://homepage.ntlw...red-banana.html
 
You want to swap/reorder partitions?
 
Good :), then ask "How can I swap partitions?", do not ask "How can I gather some plutonium and build an interstellar spacecraft that will allow me to make contact with an alien race that will have the technology to go back in time and swap partitions?"   :whistling:

 
 
find attached the ptnfloat.cmd, yet another half-@§§ed batch by jaclaz, making use of Olof's rawcopy:
http://www.ltr-data.se/opencode.html/
and (hopefully :unsure:) working also with it's 64 bit version on 64 bit systems without WOW64 (obviously only briefly tested on 32 bit system - XP SP2 - and COMPLETELY UNLIKE tested on any stupid 64 bit OS).
 
:duff:
Wonko

Attached Files


  • devdevadev likes this

#2 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 19 December 2014 - 04:19 PM

Can I edit
 
ECHO rawcopy 0 512 parttable.bin \\.\Physicaldrive%PHDrive%
 
to
 
rawcopy 0 512 parttable.bin \\.\Physicaldrive%PHDrive%
 
 
Both 32-bit and 64-bit 'rawcopy.exe' are same in both size and name so How I can keep both along with 'ptnfloat.cmd' to work ? 
 
I think I have to modify my 'Mount_Boot_Index.cmd' in such a way so that It copy 32-bit 'rawcopy.exe' to root of 32-bit 'boot.wim' and 64-bit 'rawcopy.exe' to root of 64-bit 'boot.wim'
 
Thanks & Regards....


#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15042 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 19 December 2014 - 04:32 PM

There is only one way to find out, isn't it? :unsure:

Spoiler

 

:duff:
Wonko


  • Zharif and devdevadev like this

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15042 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 19 December 2014 - 05:09 PM

 

Both 32-bit and 64-bit 'rawcopy.exe' are same in both size and name so How I can keep both along with 'ptnfloat.cmd' to work ? 
 

No, they are NOT the SAME size, the 32 bit is 24736 bytes, the 64 bit version is 25248, at least here, and strangely enough an executable file can often (please read as almost always) be renamed and/or placed in a different folder, even if it has a same name.

 

:duff:

Wonko



#5 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 19 December 2014 - 05:58 PM

And finally I removed following lines within from 'ptnfloat.cmd'  :)

::- Can you find WHICH line needs to be edited?
::- |
::-\|/
ECHO rawcopy 0 512 parttable.bin \\.\Physicaldrive%PHDrive%
::-/|\
::- |
::- Hmmm, if you got here, you did not find it :(.

I think now I got concept of your .cmd file....... ;)

 

Your 'ptnfloat.cmd' is very nice but I have to modify it in order to fit into my goal.  :rolleyes:

 

I want to SET PHDrive=%USBDRIVENUMBER% if only one USB Drive is connected in the System otherwise LIST all Removable USB Drives in order to choose desired one.....

 

So please update in such a way so that you .cmd LIST all PHdrive/USBdrive so that we can choose drive number correctly....

 

Regards....



#6 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 19 December 2014 - 06:13 PM

No, they are NOT the SAME size, the 32 bit is 24736 bytes, the 64 bit version is 25248, at least here, and strangely enough an executable file can often (please read as almost always) be renamed and/or placed in a different folder, even if it has a same name.

 

X:\rawcopy_x86.exe

X:\rawcopy_x64.exe

X:\ptnfloat.cmd

 

Will 'ptnfloat.cmd' execute following code line successfully in both 32-bit and 64-bit WinPE environment if I keep all above 3 files in the same location ?

rawcopy 0 512 \\.\Physicaldrive%PHDrive% parttable.bin

I know I can test it but currently I don't have 64-bit WinPE in order to test....So PLEASE clear this point...

Or It is compulsory to keep name of 'rawcopy.exe' as 'rawcopy.exe' in order to run above command successfully ?

 

Regards....



#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15042 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 19 December 2014 - 06:38 PM

Your 'ptnfloat.cmd' is very nice but I have to modify it in order to fit into my goal.  :rolleyes:

Well, if you have to modify it, then you modify it...

 

I want to SET PHDrive=%USBDRIVENUMBER% if only one USB Drive is connected in the System otherwise LIST all Removable USB Drives in order to choose desired one.....
So please update in such a way so that you .cmd LIST all PHdrive/USBdrive so that we can choose drive number correctly....

... sure,  do wait for it.
 
 

I know I can test it but currently I don't have 64-bit WinPE in order to test....So PLEASE clear this point...

Which is good :) as I NEVER had a 64-bit WinPE, I have not one currently and do not expect to have one in the foreseeable future, which makes a nice two of us without the possibility of testing *anything* in  a 64 bit WinPE, the trifling difference being that you want to build a 64 bit WinPE and there are very few things I could care less about than building a 64 bit WinPE :whistling:.
 
:duff:
Wonko


  • devdevadev likes this

#8 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 19 December 2014 - 07:30 PM

Is there any alternative of following RMPARTUSB.exe/Syntax which will also list DRIVE number of 'Removable USB Drives' in 64-bit WinPE without 'Wow64' ?

rmpartusb% LIST | find "DRIVE"

Regards..



#9 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 19 December 2014 - 07:32 PM

@ Sectors backup & restore
===========================================
BOOTICE [DEVICE] /sectors [/backup /restore] [parameters]

/backup  >> Backup sectors to a file.
/restore >> Restore sectors from a file.
/lba=n   >> Specify the start sector LBA.
/sectors=n >> Sectors to backup or restore.
/file=xxx >> File name. Could be a rel. path or full path name.
/keep_dpt >> Keep disk signature and partition table untouched.
/keep_bpb >> Keep BPB untouched.

I want to Restore MBR from LBA33 so what Syntax should I use ?

bootice.exe /DEVICE=%drive%: /sectors /restore /lba=33 /sectors=1SEC

Is it correct ?

 

Regards...



#10 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 20 December 2014 - 02:43 PM

... sure,  do wait for it.

Thanks in Advance......I am just waiting for Santa Christmas Gift...... :)



#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15042 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 December 2014 - 04:38 PM

Hmmm, :dubbio:, maybe next year, your Christmas Gift, this year, it is likely to come not from Santa Claus/Saint Nicholas but rather from Krampus :w00t: :ph34r::

http://en.wikipedia.org/wiki/Krampus

 

:duff:

Wonko


  • devdevadev likes this

#12 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 22 December 2014 - 01:22 PM

I have copied both 'ptnfloat.cmd' and 'rawcopy.exe' within same folder and then I have changed 
ECHO rawcopy 0 512 parttable.bin \\.\Physicaldrive%PHDrive%
to
rawcopy 0 512 parttable.bin \\.\Physicaldrive%PHDrive%
 
And then open 'ptnfloat.cmd' and type 1 and then type 1 and then type 'Y' but 'ptnfloat.cmd' gives following error message and do not make partition 1 the first partition on the on \\.\PhysicalDrive1. The Disk Number of my 3 Partitioned 'Removable USB Drive' is 1.
 
I could not understood why I got this error each time. Please Help....
 
Regards...
 

Attached Thumbnails

  • Errir.png


#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15042 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2014 - 01:41 PM

Oh my :frusty:.

FORGET about the batch.

Open a command prompt, navigate to where you rawcopy.exe is.

Then type in it:

rawcopy -v 0 512 \\.\Physicaldrive1 parttable.bin

[ENTER]
What happens?
Now type:

rawcopy -v 0 512 parttable.bin \\.\Physicaldrive1

[ENTER]
What happens?

 

Then type:

rawcopy /?

and see if any of the other options are needed, in your environment (whatever it is).

 

:duff:

Wonko



#14 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 22 December 2014 - 02:16 PM

Where I am doing wrong ?

Attached Thumbnails

  • Error1.png
  • Usage.png


#15 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15042 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2014 - 03:40 PM

Where I am doing wrong ?

You are not "doing wrong", for some reasons (unknown to me) your current environment/Operating System (also unknown to me) denies access to the device \\.\PhysicalDrive1, obviously since the first command failed to produce the parttable.bin file, second command fails because it is missing the source.

 

As you can see in the second screenshot, the syntax used is the same one suggested by the "help" of the program (and BTW it works fine here) so it is possible that *something* in your environment is blocking access to the device.

 

Since it works here and Olof tends to write good, working programs, it is more likely that there is something on your specific machine/environment, you may try (AT YOUR OWN RISK) to add the -l switch and see what happens.

 

:duff:

Wonko



#16 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 477 posts
  •  
    India

Posted 22 December 2014 - 03:47 PM

I am currently using 'Win 10 Build 9879'. May it be the reason for not working ? Does 'rawcopy.exe' support Win 7/8/8.1/8.1U1 ?

 

Regards...



#17 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15042 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2014 - 04:13 PM

I am currently using 'Win 10 Build 9879'.

WHY? :w00t:

What you recently posted (just as a reminder :whistling:):
http://reboot.pro/to...files/?p=189262
http://reboot.pro/to...files/?p=189264
 

May it be the reason for not working ?

It may be.
 

Does 'rawcopy.exe' support Win 7/8/8.1/8.1U1 ?

Try them and see. :frusty:



:duff:
Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users