Jump to content











Photo
- - - - -

Installing Win10 from iscsi to iscsi "media driver your computer needs" and NDIS.SYS "IRQL NOT LESS OR EQUAL" errors ?

iscsi ipxe windows

  • Please log in to reply
6 replies to this topic

#1 shodanx

shodanx
  • Members
  • 3 posts
  •  
    Canada

Posted 21 October 2022 - 09:52 AM

Hi,

I'm trying to boot plain windows install and install to iscsi drive

 

Using ipxe to  boot , I tried various ways

 

:iscsiwin
sanhook iscsi:192.168.1.20:::1:iqn.2022-10.lan.proxmox:target01
sanboot iscsi:192.168.1.20:::6:iqn.2022-10.lan.proxmox:wininstall

:iscsiwin2
sanhook --drive 0x80 iscsi:192.168.1.20:::1:iqn.2022-10.lan.proxmox:target01
sanboot --no-describe iscsi:192.168.1.20:::6:iqn.2022-10.lan.proxmox:wininstall

:iscsiwin3
sanhook --drive 0x80 iscsi:192.168.1.20:::1:iqn.2022-10.lan.proxmox:target01
sanhook --drive 0x81 iscsi:192.168.1.20:::6:iqn.2022-10.lan.proxmox:wininstall
sanboot --no-describe --drive 0x81

I tried slipstreaming boot.wim and install.wim with all the drivers

 

When I boot real computers, I get the error "A media driver your computer needs is missing"

 

And looking at diskpart, I can't see the mounted iscsi drive, even after running wpeutil initializenetwork

 

If I try in proxmox, I can see the drive and start the installer, but on the second step it immediately bluescreens with an error NDIS.SYS IRQL NOT LESS OR EQUAL

 

I'm hoping to boot a mostly plain windows installer (not a winpe if it can be avoided) with iscsi  or http wimboot and then install it either to local storage or iscsi storage.

 

Is there a tutorial for this here ?

 

 

 

 



#2 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 22 October 2022 - 04:58 PM

Hello,

 

My install script (step 1) : i boot to a winpe, mount my win10 iso, and launch my win10 setup from there.

#!ipxe
#dhcp net0
clear net0.dhcp/gateway:ipv4
set keep-san 1
set initiator-iqn iqn.2006-11.1
#we will assume your iscsi target runs on your pxe server
sanhook iscsi:${next-server}:tcp:3260:0:iqn.1991-05.com.microsoft:win10
set boot-url http://${dhcp-server}
kernel ${boot-url}/wimboot
#we will assume a pcbios setup, not efi
initrd -n bootmgr.exe ${boot-url}/BOOTMGR bootmgr
initrd -n bcd ${boot-url}/BOOT/BCD bcd
initrd ${boot-url}/BOOT/BOOT.SDI BOOT.SDI
initrd -n boot.wim ${boot-url}/SOURCES/X64/BOOT.WIM BOOT.WIM
boot

My boot script (step 2), i.e once the setup has completed.

#!ipxe
#dhcp
clear net0.dhcp/gateway:ipv4
set initiator-iqn iqn.2006-11.1
set keep-san 1
#we will assume your iscsi target runs on your pxe server
sanboot --keep iscsi:${next-server}:tcp:3260:0:iqn.1991-05.com.microsoft:win10

Note : i will systematically get a BSOD in step 2 while completing the installation.

 

For this, you need to empty the registry key named PagingFiles in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management.

You can either do this after the setup (edit the registry) by calling setup /noreboot in step 1 while still logged in your WinPE OR by mounting your iscsi image while logged on your iscsi target before booting in step 2.

See more here.

 

Note that you can also install your win10 to a local image and then clone on to your iscsi target but then you also need to take care of the LWF binding.

That is another discussion/approach : see more here.

 

Cheers,

Erwan



#3 shodanx

shodanx
  • Members
  • 3 posts
  •  
    Canada

Posted 27 October 2022 - 12:46 AM

Thank you for your reply,

I have been trying to get this working but yet no success.

 

I have a few questions about your setup

 

First is keep-san

 

My understanding is this function is only to leave the san hooked in case of boot failure ?

 

Is it required ?

 

My setup so far is, lvm volumes shared using tgtadm as iscsi targets

 

I have two installation medium, one plain, the other is plain with added network drivers to both boot.wim and install.wim

 

Lastly I have AMPE winpe 

 

 

As for clients I have, proxmox EFI VM, two real computers with realtek network cards and one with an intel network card

 

In all cases except for the VM, I can boot into the install/ampe, I run wpeutil initializenetwork and the iscsi drive does not appear in diskpart (even if previously formatted with nfs). 

 

On the VM, I can boot into windows installer, initially the drive isn't present, but running wpeutil initializenetwork and now the iscsi drive is present, I can partition and format it, I click next and after a few seconds I get a bluescreen with the message as in the title of this post. 

 

Next chance I get, I will try this keep-san command

 

I suspect that I'm having a really basic config issue and that the iscsi destination storage drives should have been visible in all cases already ?!

 

Through my other research I found that the pagefile issue, LFW binding or gateway set to the wrong thing might at fault here.

 

In your config you have 

 

set initiator-iqn iqn.2006-11.1

 

I imagine this is only for the access control of the server ?

 

On my server, I have set it to allow all, so I imagine I don't need to set an initiator string ?

 

tgtadm --lld iscsi --op bind --mode target --tid 1 --initiator-address ALL

 

Can you explain why unsetting the dhcp is in your script ? 

 

clear net0.dhcp/gateway:ipv4

 

Is this to free up the address on the server before the windows os requests a new one ?

 

How does the iscsi connection continue working after clearing out the dhcp lease ? 

 

 

 

Regarding NDIS / LFW

 

I can't seem to obtain nvspbind while booted into the windows installer

 

Is there an already included command that would allow me to test the status of this driver and determine if it is the cause of my issue ? 

 

I'm really hoping to make a mostly stock, one-size-fits-all windows installation disc that works installing from usb/from wimboot http/from iscsi and to local storate or to iscsi storage both on real computers and virtual machines. That might be biting more than I can chew !



#4 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 27 October 2022 - 10:47 AM

Hi,

 

Thats many questions :)

I'll try to reply to each one by one.

This also kind of summarize many of the issues/challenges for a new comer to the iscsi boot adventure...

 

keep-san is mandatory : you want to attach a drive from a remote iscsi target as early as possible during the booting process (using sanhook) AND keep this drive attached so that you find it again while booted in your OS.

I quote ipxe web page : "you can use the keep-san setting to prevent iPXE from detaching a SAN drive".

 

the initiator-iqn is optional if your iscsi target accepts any source/initiator.

In short, you need to ensure you are "authorized" on the iscsi target side.

 

clear net0.dhcp/gateway:ipv4 sorts out a known bug when booting on san : you need to clear out/blank the gateway part of your DHCP lease  (i.e switch to 0.0.0.0) or else you may BSOD somewhere during your journey.

And clearly I dont see why you would need a gateway during the network boot phase : this is only asking for troubles.

The OS once booted later on will have its own network config (static or dhcp).

 

Regarding NDIS / LFW : this only applies while cloning an existing windows image, NOT when installing a fresh windows image (setup then properly takes care of this part).

Or else some OS will just BSOD (again, in a cloning context only).

 

Last but not least, dont forget the PagingFiles registry key at the end of your windows setup (i.e before rebooting to complete the installation using sanboot --keep this time, not sanhook anymore).

 

And to add some more complexity :

-not all iscsi targets are equal... In the past I myself used Starwind, nowadays I use W2k19

-not all operating systems are equal...I mostly use english versions and some windows versions work better than others

-you can attach (sanhook) an iscsi drive and then boot (sanboot) to your windows install media BUT i clearly prefer to boot (using wimboot) to a winpe and launch my setup from there, then giving me more control before/after the setup phase.

 

Regards,

Erwan



#5 shodanx

shodanx
  • Members
  • 3 posts
  •  
    Canada

Posted 28 October 2022 - 04:08 AM

Thank you for this informative answer

I am excited to give this a shot again this weekend !

 

As for --keep , this other line of the manual threw me off

 

From sanboot ( https://ipxe.org/cmd/sanboot )

 

"This drive will be automatically detached if booting then fails, unless the --keep option is specified."

 

also 

 

"For the sake of backwards compatibility, you can use the keep-san setting to prevent iPXE from detaching a SAN drive, and you can use the skip-san-boot setting to prevent iPXE from booting from a SAN drive. The combination of both of these settings provides functionality which is approximately equivalent to the sanhook command."

 

the sanhook page does not mention the word keep ( https://ipxe.org/cmd/sanhook )

 

and the page you refer to, doesn't exist ? ( https://ipxe.org/cfg/keep-san )

 

 

(screenshot posting is disabled ?)

 

That is quite a few pitfalls for beginners ! I hope they find this current topic in their future  search !

 

----

 

As for set initiator, I'm good for now, I have so many moving parts that aren't fitting together that for now I disabled access control entirely to remove it as a potential confounding factor in my trials !

 

------

 

regarding clear net0.dhcp/gateway:ipv4

Thanks, I was really confused whether this was really  existing and whether clearing the dhcp configuration would hurt rather than help, I have not yet tried it.

 

However there are cases where I would like a working gateway.

Case where the iscsi drive is on another network, I will probably cut my home network into several vlan separated networks so I assume I will need to set gateways to get accross networks. 

 

But the case that interests me the most would be iscsi booting from one my of VPS in a datacenter in a provider like racknerd or linode

 

I don't know yet if iscsi over internet is possible but I've seen people claim it is possible. 

 

I would like to carry a usb stick with ipxe on it, stick in into a random internet connected computer and boot into my own OS drive, even if it is slow and causes data corruption (disposable OS copies)

 

---------------------------

 

For now I would be very happy to get through the windows install phase 1 until reboot without a bluescreen (the boot.wim part)

 

So if I understand correctly the pagefile issue and NDIS / LWF issues are not going to be a factor during phase 1 ?

 

So, it looks like the only thing I got wrong was the missing keep san !

 

--------------------------

 

I don't really know what I"m going to do with installing and booting windows of a iscsi drive but my idea is like this

 

create vdo deduplicated thin LVM volumes, share over iscsi, install windows to my taste on it. 

Then freeze a snapshot, and from any remote ipxe client, using ipxe + php scripts, 

create new LVM volumes from the snapshot, iscsi share and then boot them

 

I imagine if this works I could create new windows OS as easily as I create new browser tabs and get rid of them just as easily.

 

Then repeat this process for every windows version, maybe all the way back to windows 95/dos and linux . 

 

With a finely tuned snapshot of each OS, I would create new instances and put prepared software in them. 

 

That way, I could for instance, summon a ready to use software package without having to maintain all that software at the same time on my computer all the time. 

 

Example, photoshop CS6 offline running on windows 7, I only need that once in a blue moon so I don't really need it or even want that on my main computer, but with the setup I could have that software ready to go at any time. Like a piece of software frozen in time. It is possible that I'm just being silly. 



#6 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 28 October 2022 - 04:22 PM

---------------------------

 

So if I understand correctly the pagefile issue and NDIS / LWF issues are not going to be a factor during phase 1 ?

 

So, it looks like the only thing I got wrong was the missing keep san !

 

--------------------------

 

Pagefile needs to be taken care of, always.

LWF needs to be taken care of only if/when cloning.

 

Yes I believe your main issue for now is keep-san.



#7 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 28 October 2022 - 04:24 PM

--------------------------

 

I don't really know what I"m going to do with installing and booting windows of a iscsi drive but my idea is like this

 

create vdo deduplicated thin LVM volumes, share over iscsi, install windows to my taste on it. 

Then freeze a snapshot, and from any remote ipxe client, using ipxe + php scripts, 

create new LVM volumes from the snapshot, iscsi share and then boot them

 

I imagine if this works I could create new windows OS as easily as I create new browser tabs and get rid of them just as easily.

 

Then repeat this process for every windows version, maybe all the way back to windows 95/dos and linux . 

 

With a finely tuned snapshot of each OS, I would create new instances and put prepared software in them. 

 

That way, I could for instance, summon a ready to use software package without having to maintain all that software at the same time on my computer all the time. 

 

Example, photoshop CS6 offline running on windows 7, I only need that once in a blue moon so I don't really need it or even want that on my main computer, but with the setup I could have that software ready to go at any time. Like a piece of software frozen in time. It is possible that I'm just being silly. 

 

You may want to look at ths : https://labalec.fr/erwan/?p=2338 .

 

I build a master image and then, any new client will san boot to a child (i.e differencing disk) of the master image : more or less what you are willing to achieve i believe.

I am using ipxe + powershell but any scripting langage on the server side (like php) will do.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users