Clean install from Q_FactoryRecovery, optimal alignment
Posted: Fri Dec 21, 2012 5:04 pm
I have a technical question about how to extract the .wim images that came factory preinstalled into a new hdd(in my case, I copied/cloned the FactoryRecovery partition into a clean SSD disk, and subsequently extracted the image "to the left" of the Q partition
Below is my, and probably the generic, partition layout of a factory status hard drive.
The picture is the system as created in an SSD disk.
I used a tutorial, excellent one thanks for it...
My question is the following:
when creating the partition scheme, optimal alignment for SSD is not considered.
After extracting the .wim files with eximage, I used another tutorial to check if the partitions are correctly aligned
for optimal running under win seven.
The first from the left was ok, the C partition containing the system was not.
In fact, when I was doing this, I tried to use the offset argument in Diskpart create partition primary
to have two well aligned partitions.
However, when creating the second partition from the left as per the tutorial, I got an error.
Since then I found out that the align and offset commands fail if not applied to the FIRST partition of a disk.
so, if I have to do two aligned partitions, I have to start from the right...create the big partition for the system,
then the small S partition which is to be set active.
My question: I am confused about the units used in diskpart.
When I set the alignment for the middle partition , on the scheme below, I should use the command
create partition primary offset=? some multiple of 4096 or whatever.
That offset must be large enough to leave space for the small S partition, but not too large to create an un allocated hole
between the partitions.
I am confused about the units...offset is supposed to be in MB..or KB maybe...
can anybody help, preferably write, the correct code , one line, about how to create a well aligned C partition in this case,
before the Cdriveimage.wim file is extracted to it?
This is the code from the tutorial
create partition primary
select partition 2
format fs=ntfs label="Windows7_OS" quick
assign letter=c
I would like to have a smarter version,
such as
step one, create place for C partition
create partition primary align =?????
step two
create partition for the S drive
(I suspect that one does not need the align command. The size argument seems to lead to proper alignment. )
I did it stupidly...I used Gparted to move and align the partition when it is done.
That is silly, it takes one second to place the partition to the right place from the outset.
BEGIN QUOTE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Re: Need help with recovery partition/create recovery media [ Edited ]
Options
05-31-2011 01:09 PM - edited 05-31-2011 01:47 PM
@nurazem, first follow the steps to create a winpe bootable usb: http://technet.microsoft.com/en-us/libr ... S.10).aspx
make sure you do step 2 (imagex).
boot from the winpe usb (F12 at boot, select usb drive). a command prompt should appear.
use diskpart to recreate the partitions S and C (do not erase Q). the partition specs such as size, type, label, letter, active, are found in file 'recovery.ini' hidden on Q (print it out or use another computer). example of diskpart usage:
diskpart
list disk
select disk 0
list partition
select partition 1
delete partition
select partition 2
delete partition
create partition primary size=1199
select partition 1
active
format fs=ntfs label="SYSTEM_DRV" quick
assign letter=s
create partition primary
select partition 2
format fs=ntfs label="Windows7_OS" quick
assign letter=c
exit
--
(the above is only an example, see your 'recovery.ini' file for correct settings.)
to recover S and C from wim files with imagex use these two commands:
imagex.exe /apply /verify Q:\factoryrecovery\Sdrivebackup.wim 1 S:\
imagex.exe /apply /verify Q:\factoryrecovery\Cdrivebackup.wim 1 C:\
now reboot into a windows dvd or windows repair disk. repair startup (should be automatic). reboot into windows dvd again. go into advanced tools, choose command prompt, type:
bootrec.exe /fixmbr
bootrec.exe /fixboot
reboot into windows first startup.
END QUOTE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Below is my, and probably the generic, partition layout of a factory status hard drive.
The picture is the system as created in an SSD disk.
I used a tutorial, excellent one thanks for it...
My question is the following:
when creating the partition scheme, optimal alignment for SSD is not considered.
After extracting the .wim files with eximage, I used another tutorial to check if the partitions are correctly aligned
for optimal running under win seven.
The first from the left was ok, the C partition containing the system was not.
In fact, when I was doing this, I tried to use the offset argument in Diskpart create partition primary
to have two well aligned partitions.
However, when creating the second partition from the left as per the tutorial, I got an error.
Since then I found out that the align and offset commands fail if not applied to the FIRST partition of a disk.
so, if I have to do two aligned partitions, I have to start from the right...create the big partition for the system,
then the small S partition which is to be set active.
My question: I am confused about the units used in diskpart.
When I set the alignment for the middle partition , on the scheme below, I should use the command
create partition primary offset=? some multiple of 4096 or whatever.
That offset must be large enough to leave space for the small S partition, but not too large to create an un allocated hole
between the partitions.
I am confused about the units...offset is supposed to be in MB..or KB maybe...
can anybody help, preferably write, the correct code , one line, about how to create a well aligned C partition in this case,
before the Cdriveimage.wim file is extracted to it?
This is the code from the tutorial
create partition primary
select partition 2
format fs=ntfs label="Windows7_OS" quick
assign letter=c
I would like to have a smarter version,
such as
step one, create place for C partition
create partition primary align =?????
step two
create partition for the S drive
(I suspect that one does not need the align command. The size argument seems to lead to proper alignment. )
I did it stupidly...I used Gparted to move and align the partition when it is done.
That is silly, it takes one second to place the partition to the right place from the outset.
BEGIN QUOTE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Re: Need help with recovery partition/create recovery media [ Edited ]
Options
05-31-2011 01:09 PM - edited 05-31-2011 01:47 PM
@nurazem, first follow the steps to create a winpe bootable usb: http://technet.microsoft.com/en-us/libr ... S.10).aspx
make sure you do step 2 (imagex).
boot from the winpe usb (F12 at boot, select usb drive). a command prompt should appear.
use diskpart to recreate the partitions S and C (do not erase Q). the partition specs such as size, type, label, letter, active, are found in file 'recovery.ini' hidden on Q (print it out or use another computer). example of diskpart usage:
diskpart
list disk
select disk 0
list partition
select partition 1
delete partition
select partition 2
delete partition
create partition primary size=1199
select partition 1
active
format fs=ntfs label="SYSTEM_DRV" quick
assign letter=s
create partition primary
select partition 2
format fs=ntfs label="Windows7_OS" quick
assign letter=c
exit
--
(the above is only an example, see your 'recovery.ini' file for correct settings.)
to recover S and C from wim files with imagex use these two commands:
imagex.exe /apply /verify Q:\factoryrecovery\Sdrivebackup.wim 1 S:\
imagex.exe /apply /verify Q:\factoryrecovery\Cdrivebackup.wim 1 C:\
now reboot into a windows dvd or windows repair disk. repair startup (should be automatic). reboot into windows dvd again. go into advanced tools, choose command prompt, type:
bootrec.exe /fixmbr
bootrec.exe /fixboot
reboot into windows first startup.
END QUOTE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
