Force MDT to choose install to NVMe.

Discussion in 'Windows 11' started by Rab, Jan 31, 2022.

  1. Rab

    Rab MDL Member

    May 18, 2009
    155
    19
    10
    I’ve spent the better part of a week to get this to work, but all I managed to do is to irreversible destroy my customsettings.ini and task sequence.

    Now when recreating new ones from scratch I decided to get some help from you guys.

    The functionality I’m after is from Lenovo's site. They have a working (supposedly) PowerShell script that not only checks for an NVMe, but compares the sizes to not install onto small Optane disks. Then enumerate the OSDDiskIndex to the correct number, then let the whole format and install begin. And to make things even more fun. I want this to work on any machine. Not only Lenovos.

    …and that's where I’m completely stuck.



    Deployment fails claiming removable media is Disk 0


    I'd upload the script, but since it's not mine and I'm unsure of the forum's rules regarding posting copyrighted code or links to external sites. I will only upload if allowed...

    EDIT:
    Damn! Wrong OS, but the same problem is on any OS so this will work...
     
  2. MS_User

    MS_User MDL Guru

    Nov 30, 2014
    4,630
    1,343
    150
    #2 MS_User, Feb 3, 2022
    Last edited: Feb 3, 2022
    what model of lenovo are you using?
     
  3. endbase

    endbase MDL Guru

    Aug 12, 2012
    4,671
    1,708
    150
    Disable the Optane disk in bios for install?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. WindowsGeek

    WindowsGeek MDL Expert

    Jun 30, 2015
    1,457
    419
    60
    Are you sure your machine supports MVMe
     
  5. Rab

    Rab MDL Member

    May 18, 2009
    155
    19
    10
    #5 Rab, Feb 19, 2022
    Last edited: Mar 2, 2022
    (OP)
    Sorry for the late response. It's a T480 20L5.
    There's no Optane in my system (the Lenovo script makes a calculation just in case for this, but my system does not have one), and yes. It does support NVMe's.

    The only workaround I got working so far is for in place upgrade, IE to start the process from within Windows.
    But since there is a small stack of these and not all of them have the NVMe installed (some got pulled for security reasons) I want to get this going by PXE.
    Chuck a new disk in them and just go over the network.

    Symptom as follows:

    PXE boot - OK
    Choose TS - OK
    Choose programs - OK
    Start process - OK

    Process starts - OK
    Process tries to format drive - Fails

    Message - First drive is removable media. ----------- there is NO removable media in the machines. There is provision for an extra M.2 drive, but it is unoccupied. EDIT: The M.2 carrier for the main M.2 NVMe SSD is occupied with a fully functional NVMe SSD. And this is the supposed target disk, which however isn't found when I run the TS.

    Found a sort of workaround, Run the deployment off of a USB-stick and it works flawlessly... ???
     
  6. MS_User

    MS_User MDL Guru

    Nov 30, 2014
    4,630
    1,343
    150
    #6 MS_User, Feb 20, 2022
    Last edited: Feb 20, 2022
    so you have no HD in the machine at the moment and your going to install one ...so it could be... The boot sequence or order is incorrect or BIOS settings are incorrect
     
  7. atgpud2003

    atgpud2003 MDL Addicted

    Apr 30, 2015
    524
    85
    30
    Are you using secured Boot manager to able do processing, Also, need driver to load the Windows 11 installer? (Try use Windows 10 Driver and should works) in these case refuse format, then may reflect issues bios and NVME drive problems.

    ATGPUD2003
     
  8. Jay69V

    Jay69V MDL Member

    Apr 6, 2010
    106
    22
    10
    Your Litetouch.wim need to chave Nvme drivers you ca add them by create a profile by select drivers from Out-of-Box-Drivers. you can add a pause in your TS and in a CMD launc diskpart and launch list disk
    normally you need to view your drive(s).
     
  9. Rab

    Rab MDL Member

    May 18, 2009
    155
    19
    10
    Yes I have one HD in the machine. Over PXE it fails miserably. From USB-media (the same settings and TS, made from within MDT) it works flawlessly. Now I "just" need to figure out why it fails from PXE.
     
  10. Rab

    Rab MDL Member

    May 18, 2009
    155
    19
    10
    #10 Rab, Mar 2, 2022
    Last edited: Mar 2, 2022
    (OP)
    Not interested in Windows 11 actually. Got in this forum part by mistake, but as the problem is there no matter which version of Windows I try I let it stay here since I don't know how to change to the Windows 10 thread.
    As for the Secured Boot manager, I'm actually not sure of what you mean.
     
  11. Rab

    Rab MDL Member

    May 18, 2009
    155
    19
    10
    Yes, I know, but the goal is to automate this.
    Since you can run scripts from within the TS my plan is to get a TS that checks if an NVMe or SATA SSD is present. If yes, choose the quicker one, unless it's an Optane (usually quite small so limit the SSD to a minimum size of 128 Gb) and dynamically set OSDDISKINDEX accordingly.
    This is to make the deployment immune to this type of problem in the future, as multi-disk laptops are getting more frequent and, unfortunately not always registering as Disk0.
     
  12. Jay69V

    Jay69V MDL Member

    Apr 6, 2010
    106
    22
    10
    Yes I understand better in this case you need a powershell script (for this you need to activate PoerShell in the litetouch.wim) that lists all the disks with Get-disk | fl You need to filter and search for a character string that differentiates between HDD and SSD and Nvme and then this script sets the OSDDISKINDEX.
    upload_2022-3-3_8-23-21.png
     
  13. Rab

    Rab MDL Member

    May 18, 2009
    155
    19
    10
    Yes, please. I'd much like one of those that actually work. I've tried all I can get my hands on, but haven't succeeded at all. Powershell is activated in PE which is where all the magic happens, but still no go.
    I've even tried Lenovos own script and still not getting this to work, so for the time being I'll deploy these laptops from a USB stick. I actually only need to start from the USB device and then let the network take over and then it works just fine. Just not over PXE.