Jump to content











Photo
- - - - -

iSCSI, USB & XP setup

iscsi ipxe usb xp grub4dos isolinux syslinux

  • Please log in to reply
7 replies to this topic

#1 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 06 March 2016 - 08:25 PM

Hi all.

 

As part of my continuing adventures I'm currently experimenting with iSCSI, in particular installing XP to it using normal text mode setup, using the instructions found here: http://ipxe.org/appn..._direct_install

 

For context, my install medium is a USB (3) stick with SYSLINUX on it, which chains GRUB4DOS, which loads an ISO with ISOLINUX on it. Bit complicated, but it works. The top level lets me boot different OSes, the second level lets me use GRUB4DOS's drive mapping, and the third level gives me a multiboot XP setup ISO that works when burnt directly to disc.

 

Anyway, that all works fine.

 

So, my next experiment is enabling it to install to a iSCSI target. Based upon what I've read I've stuck iPXE on a boot device, and integrated in the required LAN and iSCSI drivers to my setup. I've set up an iSCSI server which works fine from a Linux live install, and the XP setup can see the disk when I boot using iPXe, sanhook the target and then boot through to XP setup.

 

The problem comes when I try to start the install. Setup seems to install the Windows MBR on my USB stick, not the iSCSI target. If I make that read only, setup fails. If I enable writes then setup continues, formatting the iSCSI target successfully, creating the directory tree and copying files, but not installing any of the boot files, and overwriting the MBR on my USB stick. I've just opened up the VHD and the only things in the root are the Windows directory and the pagefile. No boot.ini, no ntldr, etc., and these aren't on my FAT32 USB stick, either.

 

I'm going to keep fiddling with this, but I was hoping someone might have some good ideas?



#2 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 06 March 2016 - 08:30 PM

One possible caveat of (maybe) relevance, the normal G4D boot procedure swaps the local disk and the USB disk, as the BIOS records the USB stick as drive 0x80, and the local disk as drive 0x81. So to ensure XP setup does things correctly, it swaps them so the USB stick becomes 0x81 and the local disk becomes 0x80.

 

Problem is that G4D can't seem to see the sanhook'ed emulated disk as 0x81, so it can't map them. I have to removing the mapping steps to proceed.

 

Should probably try with a burnt disc to bypass grub and see if that works...



#3 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 08 March 2016 - 11:00 PM

Hello.
 
I've continued with this and as suspected, once I remove my USB HDD from the equation (by building a iPXE floppy image and installing XP from the optical drive), text mode setup completes successfully. I will have to fiddle with that later to try and control the drive ordering so it sees the iSCSI target as the system drive (any suggestions appreciated), but for now it lets me move on (abet, not far :/).
 
...but now it won't boot stage 2:
Couldn't open drive multi(0)disk(0)rdisk(0)partition(1)
NTLDR: Couldn't open drive multi(0)disk(0)rdisk(0)partition(1)
...so it's clearly accessing the SAN as it's reading the MBR and NTLDR, but the iSCSI bit clearly isn't firing up. :/
 
I've been working from the instructions given here:
http://ipxe.org/appn..._direct_install
http://labalec.fr/erwan/?cat=10
 
...and the drivers were integrated using integratedrv, based upon the instructions given at ipxe.org.
 
Any suggestions would be appreciated.
 
If it helps any, the boot.ini from my iSCSI target looks like:
 
[boot loader]
timeout=1
default=signature(f62d8415)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
signature(f62d8415)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect

Edited by mr_jrt, 08 March 2016 - 11:02 PM.


#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 March 2016 - 08:30 AM

The instructions on :

http://labalec.fr/erwan/?cat=10

are about a Windows NT 6.x or later that makes use of BOOTMGR (and not NTLDR) to load the Windows system.

 

It is very possible that BOOTMGR has some capabilities that NTLDR misses.

As a general rule the "signature sintax" in BOOT.INI means that the Windows has some difficulties in identifying the disk (in the real mode part of the setup), it is (was) typical of "real" SCSI adapters without a BIOS:

https://technet.micr...y/cc977184.aspx

Still in the case of "real" SCSI adapters a NTbootdd.sys was needed to access the disk.

 

You could try using BOOTMGR to boot the Windows XP :unsure:

 

:duff:

Wonko



#5 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 09 March 2016 - 03:27 PM

As part of my continuing adventures I'm currently experimenting with iSCSI, in particular installing XP to it using normal text mode setup, using the instructions found here: http://ipxe.org/appn..._direct_install

winnt32.exe copies the files to a network drive.
Setup is run at the target machine at next boot. The target hard disk is connected at BIOS level then.

So, my next experiment is enabling it to install to a iSCSI target. Based upon what I've read I've stuck iPXE on a boot device, and integrated in the required LAN and iSCSI drivers to my setup. I've set up an iSCSI server which works fine from a Linux live install, and the XP setup can see the disk when I boot using iPXe, sanhook the target and then boot through to XP setup.

Setup misses a connection between target BIOS and target hard disk at target machine.
 

default=signature(f62d8415)disk(0)rdisk(0)partition(1)\WINDOWS

The target hard disk is not connected at BIOS level.

Adjust the file boot.ini, compare the historic USB XP
e.g. add boot_ren.cmd at winnt.sif
http://www.msfn.org/...e-6#entry653532
http://www.msfn.org/...e-7#entry655345

#6 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 10 March 2016 - 12:42 AM

The instructions on :
http://labalec.fr/erwan/?cat=10
are about a Windows NT 6.x or later that makes use of BOOTMGR (and not NTLDR) to load the Windows system.


A little further down it discusses XP: http://labalec.fr/erwan/?page_id=180
 

Setup is run at the target machine at next boot. The target hard disk is connected at BIOS level then.

Setup misses a connection between target BIOS and target hard disk at target machine.
 
The target hard disk is not connected at BIOS level.

Adjust the file boot.ini, compare the historic USB XP
e.g. add boot_ren.cmd at winnt.sif
http://www.msfn.org/...e-6#entry653532
http://www.msfn.org/...e-7#entry655345


Thanks for the replies.

My bad, I'd left a test HDD plugged in, and iPXE was trying to boot that, so it makes sense it would find NTLDR and it wouldn't match.

Having removed the test HDD, iPXE fails to boot from the iSCSI target:

Boot from SAN device 0x80 failed: Exec format error (http://ipxe.org/2e852001)
Unregistered SAN device 0x80

The error message (http://ipxe.org/2e852001) suggests the disk has no boot data on it...but having examined the iSCSI backing disk image the MBR looks fine to me, so back to the iPXE forum I go... :)


Edited by mr_jrt, 10 March 2016 - 12:43 AM.


#7 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 10 March 2016 - 05:19 AM

A little further down it discusses XP: http://labalec.fr/erwan/?page_id=180

The iSCSI target is mapped at physicaldrive1 at running windows.
And it's used inside a virtual machine, hence it's a local disk inside the virtual machine.

If iSCSI target is mapped at physicaldrive1, then map this to physicaldrive0
Can grub4dos access the iSCSI target disk?
try at grub4dos
map (hd0) (hd1)
map (hd1) (hd0)
map --hook

#8 mr_jrt

mr_jrt

    Member

  • Members
  • 32 posts
  •  
    United Kingdom

Posted 12 March 2016 - 06:16 PM

So, an update for you all. Turns out, it was a bug in iPXE. It wasn't handling some flags correctly in the int13 hooks, so it was continuing down the chain and ultimately calling the BIOS handler for SAN devices...which was always going to fail. This has been resolved by the awesome iPXE devs and everything now works as I thought it should have. :D

 

So, I boot my machine from a USB floppy holding the iPXE image (just until I flash it to my LAN ROM), then hook the iSCSI target with:

iPXE>dhcp
iPXE>sanhook iscsi:<ip>::::<iqn>
iPXE>exit

This then boots the next boot device, which is my multiboot USB stick with SYSLINUX on it. From that I choose the XP option, which boots GRUB4DOS, and from there I map the ISO on the stick to an emulated optical disc and boot the XP installer. The installer finds the iSCSI target  through the hooks established by iPXE, and installs XP to it fine.

 

The machine reboots, and I boot from my floppy drive again, and I use the same script again:

iPXE>dhcp
iPXE>sanhook iscsi:<ip>::::<iqn>
iPXE>exit

...which then boots the next boot device, which again is my multiboot USB stick with SYSLINUX on it. Again, I choose the XP option, which boots GRUB4DOS, and from there I again map the ISO on the stick to an emulated optical disc but this time boot the emulated HDD backed by the iSCSI target, which starts stage-2 GUI mode setup.
 

The machine reboots one final time, and I boot from my floppy drive again, and I use a slightly different script:

iPXE>dhcp
iPXE>sanboot iscsi:<ip>::::<iqn>

...which fires up XP from the iSCSI target just fine. Awesomeness all round. :good:


Edited by mr_jrt, 12 March 2016 - 06:17 PM.






Also tagged with one or more of these keywords: iscsi, ipxe, usb, xp, grub4dos, isolinux, syslinux

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users