Highlighted
trananhtuan
1 Copper

How to clone Dell SupportAssist OS Recovery to a larger SSD

Jump to solution

I'm trying to migrate from a small M2 NVME SSD to a larger and faster one.

The new SSD is attached to the only M.2 NVME socket. The old SSD is attached to a M.2 to SATA adapter and in turn attached to another SATA to USB 3.0 adapter. I can boot from this old SSD before and after cloning and everything works just fine. 

I used different disk cloning/imaging apps (True Image, Macrium Reflect, AOMEI Backupper, Paragon Backup & Recovery, Clonezilla) to clone the old SSD to the new one. I also use disk-cloning/disk-to-disk to clone the entire SSD. Preferably with sector-by-sector copy turned on.

Long story short, I tried different apps but Clonezilla is the only one that kinda works for me (used options -e2 -j2 -q1 -iefi to attempt to make an identical copy). I unplug the old SSD before restarting to prevent GUID conflict. Everything works including OS Recovery right after.

But after that, I need to extend the Windows partition (C:) on the new SSD to utilize the added space. Because the recovery partitions (recovery, Image and DELLSUPPORT) are next to the Windows partition, and the free space is at the end, I need to move these partitions to the end of the disk before extending.

After I move these partitions, OS Recovery stops working. When I select SupportAssist OS Recovery in F12 Boot Menu, a "blue screen of Dell" (because it bears the color of Dell) appears with nothing to show and PC will turn off after 30-60s. If I plug in the USB disk (old), OS Recovery will work again (boot from new SSD but judging from old SSD activity light, recovery must be using the old SSD again).

I don't know if the reason is due to changing partition byte offset, mismatching volume GUIDs in BCD after moving partitions or something else.

I spent hours on this with no results and I would greatly appreciate any help.

0 Kudos
1 Solution

Accepted Solutions
trananhtuan
1 Copper

Re: How to clone Dell SupportAssist OS Recovery to a larger SSD

Jump to solution

OK. I figured it out. It was complicated.

NOTE: This procedure also allows you to move recovery partitions to a different disk, free up precious space on SSD. If this is what you choose to do, clone 2 recovery partitions (named Image and DELLSUPPORT to the HDD) while keeping the remaining recovery partition in place. The rest of the procedure should be the same. Keep in mind I have not tested this scenario.

The procedure described here is for UEFI boot with GPT disk.

There is a small recovery partition (no name, 839MB for me) next to the Windows partition (C:). Dell OS Recovery relies on this partition. You need to edit a file on it \Recovery\Logs\Reload.xml.

Before you proceed, I recommend to backup all recovery partitions using a imaging program such as Clonezilla.


Step 1: Mount recovery partition:
run diskpart.

list disk
select disk X [select the OS disk in question]
uniqueid disk [note down/copy the GUID of the disk, you will need it]
list partition [note down the partition offsets, you might need it later]
list volume
select volume Y [select the recovery volume as stated above]
assign letter=W [choose a drive letter to assign this partition to]
exit

 

Step 2: Obtain the disk GUID

From the command prompt, run the following command:
wmic partition get BlockSize, StartingOffset, Name, Index

BlockSize Index Name StartingOffset
512 0 Disk #1, Partition #0 1048576
512 1 Disk #1, Partition #1 659554304
512 2 Disk #1, Partition #2 495540219904
512 3 Disk #1, Partition #3 496420327424
512 4 Disk #1, Partition #4 510962622464
512 0 Disk #0, Partition #0 135266304


Looking at the offset you can see the recovery partition we are looking for is 495540219904 because it's next to the biggest Windows partition (biggest gap between partitions). If you have trouble figuring out which partition, calculate the offset against the rounded value you noted down in diskpart ealier (offset / 1024 = KB, offset / 1024^2 = MB, offset / 1024^3 = GB...).
Note down/copy the offset value.

WARNING: Mounting recovery reveals it's mostly free, which is suspicious. Some BCD elements points to non-existent files on this partition (for instance in Device object 'Windows Recovery', element named SdiPath value is '\Recovery\WindowsRE\boot.sdi'). It could be an image partition, in which case, editing a file with a text editor could corrupt some parts of it. To prevent this, an disk/sector editor might be needed, like Sector Edit function from BootIce. Unfortunately, Sector Edit is very basic and it doesn't allow us to find strings so using it for our purpose is tricky. A better program is Runtime's DiskExplorer for NTFS (license needed). Currently, I have no problem with notepad++. I will update this answer again if needed.

Step 3: Edit \Recovery\Logs\Reload.xml

Once you mounted the recovery partition and obtained disk GUID and partition offset, edit the file W:\Recovery\Logs\Reload.xml. If this file doesn't exist, you got wrong recovery partition.
You can do this inside Windows, but you need to enter the full command into the command prompt [running as admin], for ex:
C:\Program Files (x86)\Notepad++\notepad++.exe W:\Recovery\Logs\Reload.xml
It is a bit easier if you use Hiren's Boot PE as it contains everything you need. I don't recommend to use notepad.exe, use notepad++ instead. Hiren's Boot PE will not detect your M.2 NVME SSD in RAID SATA mode, so go to BIOS and set SATA mode to AHCI temporarily as necessary.
In tag <winrelocation>, replace the attribute "offset" and "guid" with values you obtained. It's best to convert guid to lowercase as I don't know if it's case sensitive or not. Save the file when you are done.

Step 4:

Unmount the recovery drive, run:
C:\> diskpart
select disk X [select the previously selected disk]
list volume
select volume Y [select the recovery volume]
remove letter=W
exit

Go to BIOS and set SATA mode to RAID again if you set it to AHCI before.

Reboot, press F12 and test SupportAssist OS Recovery. It should now works but if it's still not, double check the offset and guid value again.

 

EXTRA STEPS

OK, in some cases, you might need to correct the BCD in order to boot or/and using OS recovery. This is due to changing of disk or partition GUID during disk cloning/partitioning process, which causes invalid BCD records.
Don't panic. It can be fixed.
The tool we need is BootIce.
If you can't boot into Windows, use Hiren's Boot PE as it contains everything you need.

Step 5: Mount EFI partition:
run diskpart.
list disk
select disk X [select the OS disk in question]
list volume
select volume Z [select the FAT32 volume named ESP]
assign letter=W [choose a drive letter to assign this partition to]
exit

Step 6:
if you use Hiren's Boot PE:
run BootIce [in Utilities\BCD-MBR tools]
select BCD tab, in the BCD file section, make sure 'BCD of current system' is selected.


if you can boot into Windows, just download and run BootIce
select BCD tab, in the BCD file section, make sure 'Other BCD file' is selected.


click '...' button and select file W:\EFI\Microsoft\Boot\BCD
click 'Professional mode'
go through each entry on the left pane to find any element with value UnknownDevice (usually elements named: *Device), if there is a path associated, use this path to look up the correct volume
if no path is given on *Device, look for the element named *Path or SystemRoot next after it , note down the value
click on this UnknownDevice element to edit it using following rules:
- if the value/path contains '\windows', set it to Windows partition (C:)
- if the value/path contains '\sources', set it to DELLSUPPORT partition
- if the value/path contains '\EFI', set it to ESP partition
- if the value/path contains '\Recovery', set it to Recovery partition

Use the same procedures to edit file W:\EFI\dell\SOS\BCD


If you have done everything correctly, SupportAssist OS Recovery should now work.

0 Kudos
1 Reply
trananhtuan
1 Copper

Re: How to clone Dell SupportAssist OS Recovery to a larger SSD

Jump to solution

OK. I figured it out. It was complicated.

NOTE: This procedure also allows you to move recovery partitions to a different disk, free up precious space on SSD. If this is what you choose to do, clone 2 recovery partitions (named Image and DELLSUPPORT to the HDD) while keeping the remaining recovery partition in place. The rest of the procedure should be the same. Keep in mind I have not tested this scenario.

The procedure described here is for UEFI boot with GPT disk.

There is a small recovery partition (no name, 839MB for me) next to the Windows partition (C:). Dell OS Recovery relies on this partition. You need to edit a file on it \Recovery\Logs\Reload.xml.

Before you proceed, I recommend to backup all recovery partitions using a imaging program such as Clonezilla.


Step 1: Mount recovery partition:
run diskpart.

list disk
select disk X [select the OS disk in question]
uniqueid disk [note down/copy the GUID of the disk, you will need it]
list partition [note down the partition offsets, you might need it later]
list volume
select volume Y [select the recovery volume as stated above]
assign letter=W [choose a drive letter to assign this partition to]
exit

 

Step 2: Obtain the disk GUID

From the command prompt, run the following command:
wmic partition get BlockSize, StartingOffset, Name, Index

BlockSize Index Name StartingOffset
512 0 Disk #1, Partition #0 1048576
512 1 Disk #1, Partition #1 659554304
512 2 Disk #1, Partition #2 495540219904
512 3 Disk #1, Partition #3 496420327424
512 4 Disk #1, Partition #4 510962622464
512 0 Disk #0, Partition #0 135266304


Looking at the offset you can see the recovery partition we are looking for is 495540219904 because it's next to the biggest Windows partition (biggest gap between partitions). If you have trouble figuring out which partition, calculate the offset against the rounded value you noted down in diskpart ealier (offset / 1024 = KB, offset / 1024^2 = MB, offset / 1024^3 = GB...).
Note down/copy the offset value.

WARNING: Mounting recovery reveals it's mostly free, which is suspicious. Some BCD elements points to non-existent files on this partition (for instance in Device object 'Windows Recovery', element named SdiPath value is '\Recovery\WindowsRE\boot.sdi'). It could be an image partition, in which case, editing a file with a text editor could corrupt some parts of it. To prevent this, an disk/sector editor might be needed, like Sector Edit function from BootIce. Unfortunately, Sector Edit is very basic and it doesn't allow us to find strings so using it for our purpose is tricky. A better program is Runtime's DiskExplorer for NTFS (license needed). Currently, I have no problem with notepad++. I will update this answer again if needed.

Step 3: Edit \Recovery\Logs\Reload.xml

Once you mounted the recovery partition and obtained disk GUID and partition offset, edit the file W:\Recovery\Logs\Reload.xml. If this file doesn't exist, you got wrong recovery partition.
You can do this inside Windows, but you need to enter the full command into the command prompt [running as admin], for ex:
C:\Program Files (x86)\Notepad++\notepad++.exe W:\Recovery\Logs\Reload.xml
It is a bit easier if you use Hiren's Boot PE as it contains everything you need. I don't recommend to use notepad.exe, use notepad++ instead. Hiren's Boot PE will not detect your M.2 NVME SSD in RAID SATA mode, so go to BIOS and set SATA mode to AHCI temporarily as necessary.
In tag <winrelocation>, replace the attribute "offset" and "guid" with values you obtained. It's best to convert guid to lowercase as I don't know if it's case sensitive or not. Save the file when you are done.

Step 4:

Unmount the recovery drive, run:
C:\> diskpart
select disk X [select the previously selected disk]
list volume
select volume Y [select the recovery volume]
remove letter=W
exit

Go to BIOS and set SATA mode to RAID again if you set it to AHCI before.

Reboot, press F12 and test SupportAssist OS Recovery. It should now works but if it's still not, double check the offset and guid value again.

 

EXTRA STEPS

OK, in some cases, you might need to correct the BCD in order to boot or/and using OS recovery. This is due to changing of disk or partition GUID during disk cloning/partitioning process, which causes invalid BCD records.
Don't panic. It can be fixed.
The tool we need is BootIce.
If you can't boot into Windows, use Hiren's Boot PE as it contains everything you need.

Step 5: Mount EFI partition:
run diskpart.
list disk
select disk X [select the OS disk in question]
list volume
select volume Z [select the FAT32 volume named ESP]
assign letter=W [choose a drive letter to assign this partition to]
exit

Step 6:
if you use Hiren's Boot PE:
run BootIce [in Utilities\BCD-MBR tools]
select BCD tab, in the BCD file section, make sure 'BCD of current system' is selected.


if you can boot into Windows, just download and run BootIce
select BCD tab, in the BCD file section, make sure 'Other BCD file' is selected.


click '...' button and select file W:\EFI\Microsoft\Boot\BCD
click 'Professional mode'
go through each entry on the left pane to find any element with value UnknownDevice (usually elements named: *Device), if there is a path associated, use this path to look up the correct volume
if no path is given on *Device, look for the element named *Path or SystemRoot next after it , note down the value
click on this UnknownDevice element to edit it using following rules:
- if the value/path contains '\windows', set it to Windows partition (C:)
- if the value/path contains '\sources', set it to DELLSUPPORT partition
- if the value/path contains '\EFI', set it to ESP partition
- if the value/path contains '\Recovery', set it to Recovery partition

Use the same procedures to edit file W:\EFI\dell\SOS\BCD


If you have done everything correctly, SupportAssist OS Recovery should now work.

0 Kudos