Welcome to the community forums for Theopenem. All responses are provided by other users that wish to help out. Theopenem will not respond to these posts. If you require more assistance than what the community can provide, we offer various paid support options.

Imaging unable to create partitions


  • I'm having issues deploying an image onto a specific device model, other devices are fine. It seems to be a problem with partitioning, but I can't figure out why.

    
    WinPE Version:
    
    10.0.25398.0
    
    System Architecture:
    
    @{OSArchitecture=64-bit}
    
    Using Legacy BIOS
    
     ** Looking For Active Task For .MT43I28SF-2XZ2103040540010009.23A728AC-658E-8E45-BFB1-77447A51C546 **
    
    {"computerId":"false","task":"ond","taskId":null,"computerName":null}
    
     ...... This Computer Was Not Found
    
     ** Looking For Active Task For EC:D6:8A:83:21:1A.MT43I28SF-2XZ2103040540010009.23A728AC-658E-8E45-BFB1-77447A51C546 **
    
    {"computerId":"5531","task":"deploy","taskId":"89","computerName":"BX40T-A4"}
    
     ...... Success
    
     ** Verifying Active Task ** 
    
    computer_name=BX40T-A4
    image_name=Windows11_23H2_On-Prem
    profile_id=3
    pre_scripts=""
    before_file_scripts=""
    after_file_scripts=""
    file_copy=True
    sysprep_tags=""
    image_type=File
    set_bootmgr=True
    display_sleep_time=5
    web_cancel=true
    task_completed_action="Reboot"
    direct_smb=true
    change_computer_name=true
    skip_expand_volumes=true
    fix_bcd=true
    randomize_guids=true
    skip_nvram=true
    fix_bootloader=true
    force_dynamic_partitions=true
    partition_method=dynamic
    image_server="http://covs-toemweb.hcps.k12.local:8888/clientimaging/"
    
    
     ...... Success
    
    Current Boot Order
    
    
    Firmware Boot Manager
    
    ---------------------
    
    identifier              {fwbootmgr}
    
    displayorder            {bootmgr}
    
    timeout                 2
    
    
    
    Windows Boot Manager
    
    --------------------
    
    identifier              {bootmgr}
    
    device                  partition=\Device\HarddiskVolume1
    
    path                    \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
    
    description             Windows Boot Manager
    
    locale                  en-US
    
    inherit                 {globalsettings}
    
    default                 {default}
    
    resumeobject            {98dae182-9de5-11ed-95a6-ecd68a839e4b}
    
    displayorder            {default}
    
                            {98dae180-9de5-11ed-95a6-ecd68a839e4b}
    
    toolsdisplayorder       {memdiag}
    
    timeout                 0
    
    
     ** Mounting SMB Share ** 
    
     ...... Connecting To //COVS-TOEMWEB/toems_local_storage
    The command completed successfully.
    
    
    
    
     ...... Success
    
    file_copy_schema: profileId=3
    
    
    Count FilesAndFolders                                                                         
    
    ----- ---------------                                                                         
    
    1     {@{DestinationFolder=; DestinationPartition=; FileName=drivers_tested.zip; ModuleGuid...
    
    
    
    
    
    
     ** Looking For Hard Drive(s) **
    
     ** Displaying Available Devices ** 
    
    
    Number F Serial Number                    HealthStatus         OperationalStatus    Total Size
    
           r                                                                                      
    
           i                                                                                      
    
           e                                                                                      
    
           n                                                                                      
    
           d                                                                                      
    
           l                                                                                      
    
           y                                                                                      
    
                                                                                                  
    
           N                                                                                      
    
           a                                                                                      
    
           m                                                                                      
    
           e                                                                                      
    
    ------ - -------------                    ------------         -----------------    ----------
    
    0      K 50026B7684785F75                 Healthy              Online                238.47 GB
    
    
    
    
    
    
     ...... Found 1 Drives
    
     ** Displaying Current Partition Table On 0
    
    
    
    
       DiskPath: \\?\scsi#disk&ven_&prod_kingston_om8p0s3#4&2b547927&0&000000#{53f56307-b6bf-11d0-
    
    94f2-00a0c91efb8b}
    
    
    
    PartitionNumber  DriveLetter Offset                            Size Type                      
    
    ---------------  ----------- ------                            ---- ----                      
    
    1                           1048576                         100 MB System                    
    
    2                           105906176                        16 MB Reserved                  
    
    3                C           122683392                    237.86 GB Basic                     
    
    4                           255520145408                    515 MB Recovery                  
    
    
    
    
    
    
     ** Processing Hard Drive 0
    
    Get hd_schema:  profileId=3&clientHdNumber=0&newHdSize=256060514304&schemaHds=&clientLbs=0
    
    {"BootPartition":"","Guid":"{9f23656f-e22e-42b0-9a5c-95c42987f7a5}","IsValid":"true","Message":null,"PartitionType":"GPT","PhysicalPartitionCount":4,"PhysicalPartitions":[{"Compression":null,"EfiBootLoader":"","FileSystem":"FAT32","Guid":"{69088a00-e706-481b-8367-59d15c8f3ba9}","ImageType":null,"Number":"1","PartcloneFileSystem":null,"Prefix":null,"Type":"System","Uuid":"","VolumeGroup":null},{"Compression":null,"EfiBootLoader":"","FileSystem":"","Guid":"{bd23da07-dea8-4ca5-b7d4-6b207aec4b41}","ImageType":null,"Number":"2","PartcloneFileSystem":null,"Prefix":null,"Type":"Reserved","Uuid":"","VolumeGroup":null},{"Compression":null,"EfiBootLoader":"","FileSystem":"NTFS","Guid":"{e96f0c84-a44d-4ee4-951e-f5b592e2b9d8}","ImageType":null,"Number":"3","PartcloneFileSystem":null,"Prefix":null,"Type":"Basic","Uuid":"","VolumeGroup":null},{"Compression":null,"EfiBootLoader":"","FileSystem":"NTFS","Guid":"{d853c12f-b7a4-4109-9f62-97e73770e35e}","ImageType":null,"Number":"4","PartcloneFileSystem":null,"Prefix":null,"Type":"Recovery","Uuid":"","VolumeGroup":null}],"SchemaHdNumber":0,"UsesLvm":"false"}
    
     ...... HD Meets The Minimum Sized Required
    
    imageProfileId=3&hdToGet=0&newHDSize=256060514304&clientHD=0&taskType=deploy&partitionPrefix=&lbs=512 http://covs-toemweb.hcps.k12.local:8888/clientimaging/GetPartLayout
    
     ** Partition Creation Script ** 
    New-Partition 0 -GptType '{c12a7328-f81f-11d2-ba4b-00a0c93ec93b}' -Size 100MB 2>&1 >> $clientLog
    
    New-Partition 0 -GptType '{e3c9e316-0b5c-4db8-817d-f92df00215ae}' -Size 16MB 2>&1 >> $clientLog
    
    New-Partition 0 -GptType '{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}' -Size 239044MB | Format-Volume -FileSystem NTFS 2>&1 >> $clientLog
    
    New-Partition 0 -GptType '{de94bba4-06d1-4d40-a16a-bfd50179d6ac}' -Size 800MB | Format-Volume -FileSystem NTFS -NewFileSystemLabel WindowsRE 2>&1 >> $clientLog
    
    New-Partition : A parameter is not valid for this type of partition.
    
     
    
    Extended information:
    
    The parameters GptType, IsHidden, and IsDAX cannot be used on an MBR disk.
    
     
    
    
    
    Activity ID: {d7502885-d397-0001-392d-50d797d3da01}
    
    At X:\newPartLayout.ps1:1 char:1
    
    + New-Partition 0 -GptType '{c12a7328-f81f-11d2-ba4b-00a0c93ec93b}' -Si ...
    
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        + CategoryInfo          : InvalidArgument: (StorageWMI:ROOT/Microsoft/Windows/Storage/MSF 
    
       T_Disk) [New-Partition], CimException
    
        + FullyQualifiedErrorId : StorageWMI 41006,New-Partition
    
     
    
    New-Partition : A parameter is not valid for this type of partition.
    
     
    
    Extended information:
    
    The parameters GptType, IsHidden, and IsDAX cannot be used on an MBR disk.
    
     
    
    
    
    Activity ID: {d7502885-d397-0001-392d-50d797d3da01}
    
    At X:\newPartLayout.ps1:2 char:1
    
    + New-Partition 0 -GptType '{e3c9e316-0b5c-4db8-817d-f92df00215ae}' -Si ...
    
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        + CategoryInfo          : InvalidArgument: (StorageWMI:ROOT/Microsoft/Windows/Storage/MSF 
    
       T_Disk) [New-Partition], CimException
    
        + FullyQualifiedErrorId : StorageWMI 41006,New-Partition
    
     
    
    
    boot partition is 
    
     ** New Partition Table Is ** 
    
    @{Compression=; EfiBootLoader=; FileSystem=FAT32; Guid={69088a00-e706-481b-8367-59d15c8f3ba9}; ImageType=; Number=1; PartcloneFileSystem=; Prefix=; Type=System; Uuid=; VolumeGroup=}
    
    @{Compression=; EfiBootLoader=; FileSystem=; Guid={bd23da07-dea8-4ca5-b7d4-6b207aec4b41}; ImageType=; Number=2; PartcloneFileSystem=; Prefix=; Type=Reserved; Uuid=; VolumeGroup=}
    
    @{Compression=; EfiBootLoader=; FileSystem=NTFS; Guid={e96f0c84-a44d-4ee4-951e-f5b592e2b9d8}; ImageType=; Number=3; PartcloneFileSystem=; Prefix=; Type=Basic; Uuid=; VolumeGroup=}
    
     ** Starting Image Download For Hard Drive 0 Partition 3
    Set-Partition : The requested object could not be found.
    
    At X:\wie_deploy.ps1:275 char:5
    
    +     Set-Partition -DiskNumber $($hardDrive.Number) -PartitionNumber $ ...
    
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        + CategoryInfo          : ObjectNotFound: (PS_StorageCmdlets:ROOT/Microsoft/..._StorageCm 
    
       dlets) [Set-Partition], CimException
    
        + FullyQualifiedErrorId : MI RESULT 6,Set-Partition
    
     
    
    
    wimapply s:\images\Windows11_23H2_On-Prem\hd0\part3.winpe.wim C: 2>>x:\clientlog.log > x:\wim.progress
    wimapply : 
    
    At X:\wie_deploy.ps1:301 char:13
    
    +             wimapply $script:imagePath\part$wimSource.winpe.wim C: 2> ...
    
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    
        + FullyQualifiedErrorId : NativeCommandError
    
     
    
    [WARNING] Failed to get volume information for "C:" (err=3): The system cannot find the path 
    
    specified
    
    
    
    [WARNING] Ignoring FILE_ATTRIBUTE_COMPRESSED of 48 files
    
    
    
    [WARNING] Ignoring FILE_ATTRIBUTE_SPARSE_FILE of 6 files
    
    
    
    [WARNING] Extracting 46031 hard links as independent files
    
    
    
    [WARNING] Ignoring reparse data of 58 files
    
    
    
    [WARNING] Ignoring Windows NT security descriptors of 173642 files
    
    
    
    [WARNING] Ignoring extended attributes of 39720 files
    
    
    
    [WARNING] Ignoring object IDs of 32 files
    
    
    
    [WARNING] Ignoring DOS names of 148687 files
    
    
    
    [ERROR] Can't open or create directory "C:" (status=c000003a): {Path Not Found}
    
    
    
    The path %hs does not exist
    
    ERROR: Exiting with error code 48:
    
           Failed to open a directory.
    
    
     ** Processing File Copy ** 
    
    @{Compression=; EfiBootLoader=; FileSystem=NTFS; Guid={d853c12f-b7a4-4109-9f62-97e73770e35e}; ImageType=; Number=4; PartcloneFileSystem=; Prefix=; Type=Recovery; Uuid=; VolumeGroup=}
    
    Updated Boot Order
    The boot configuration data store could not be opened.
    
    The requested system device cannot be found.
    
    
     ** Closing Active Task ** 
    
    

  • I did some digging and it appears bootType is being incorrectly detected as legacy, so the script is formatting the drive as MBR. $env:firmware_type contains the correct value, EFI. I found that the boot type is determined using Confirm-SecureBootUEFI, interpreting a failure to run as legacy boot. This system does not support secure boot, causing Confirm-SecureBootUEFI to crash, although it does use UEFI. Is there a reason Confirm-SecureBootUEFI is used instead of $env:firmware_type for the boot type?