diff -urN gpxe-0.9.7/src/arch/i386/interface/pcbios/iscsiboot.c gpxe-0.9.7-registeriscsionpxe/src/arch/i386/interface/pcbios/iscsiboot.c
--- gpxe-0.9.7/src/arch/i386/interface/pcbios/iscsiboot.c	2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-registeriscsionpxe/src/arch/i386/interface/pcbios/iscsiboot.c	2009-03-13 14:01:42.000000000 -0400
@@ -20,6 +20,55 @@
 	.type = &setting_type_int8,
 };
 
+static int iscsireg ( const char *root_path ) {
+	struct scsi_device *scsi;
+	struct int13_drive *drive;
+	int rc;
+
+	scsi = zalloc ( sizeof ( *scsi ) );
+	if ( ! scsi ) {
+		rc = -ENOMEM;
+		goto regerr_alloc_scsi;
+	}
+	drive = zalloc ( sizeof ( *drive ) );
+	if ( ! drive ) {
+		rc = -ENOMEM;
+		goto regerr_alloc_drive;
+	}
+
+	printf ( "Configuring iSCSI at %s\n", root_path );
+
+	if ( ( rc = iscsi_attach ( scsi, root_path ) ) != 0 ) {
+		printf ( "Could not attach iSCSI device: %s\n",
+			 strerror ( rc ) );
+		goto regerr_attach;
+	}
+	if ( ( rc = init_scsidev ( scsi ) ) != 0 ) {
+		printf ( "Could not initialise iSCSI device: %s\n",
+			 strerror ( rc ) );
+		goto regerr_init;
+	}
+
+	drive->blockdev = &scsi->blockdev;
+
+	/* FIXME: ugly, ugly hack */
+	struct net_device *netdev = last_opened_netdev();
+	struct iscsi_session *iscsi =
+		container_of ( scsi->backend, struct iscsi_session, refcnt );
+	ibft_fill_data ( netdev, iscsi );
+
+	register_int13_drive ( drive );
+	printf ( "Registered as BIOS drive %#02x\n", drive->drive );
+    return 0;
+ regerr_init:
+	iscsi_detach ( scsi );
+ regerr_attach:
+	free ( drive );
+ regerr_alloc_drive:
+	free ( scsi );
+ regerr_alloc_scsi:
+	return rc;
+}
 static int iscsiboot ( const char *root_path ) {
 	struct scsi_device *scsi;
 	struct int13_drive *drive;
@@ -85,7 +134,9 @@
 	return rc;
 }
 
+
 struct sanboot_protocol iscsi_sanboot_protocol __sanboot_protocol = {
 	.prefix = "iscsi:",
 	.boot = iscsiboot,
+	.reg = iscsireg,
 };
diff -urN gpxe-0.9.7/src/include/gpxe/sanboot.h gpxe-0.9.7-registeriscsionpxe/src/include/gpxe/sanboot.h
--- gpxe-0.9.7/src/include/gpxe/sanboot.h	2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-registeriscsionpxe/src/include/gpxe/sanboot.h	2009-03-13 13:57:04.000000000 -0400
@@ -6,6 +6,7 @@
 struct sanboot_protocol {
 	const char *prefix;
 	int ( * boot ) ( const char *root_path );
+	int ( * reg  ) ( const char *root_path );
 };
 
 #define __sanboot_protocol \
diff -urN gpxe-0.9.7/src/usr/autoboot.c gpxe-0.9.7-registeriscsionpxe/src/usr/autoboot.c
--- gpxe-0.9.7/src/usr/autoboot.c	2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-registeriscsionpxe/src/usr/autoboot.c	2009-03-13 13:58:43.000000000 -0400
@@ -115,6 +115,23 @@
 }
 
 /**
+ * Register a drive in BIOS, but don't boot from it
+ * 
+ * @v root_path Root path
+ * * @ret rc   Return status code
+ */
+int reg_root_path ( const char *root_path ) {
+	struct sanboot_protocol *sanboot;
+	for ( sanboot = sanboot_protocols ;
+	      sanboot < sanboot_protocols_end ; sanboot++ ) {
+		if ( strncmp ( root_path, sanboot->prefix,
+			       strlen ( sanboot->prefix ) ) == 0 ) {
+			return sanboot->reg ( root_path );
+		}
+	}
+      return -ENOTSUP;
+}
+/**
  * Boot using root path
  *
  * @v root_path		Root path
@@ -149,6 +166,7 @@
 	struct setting pxe_boot_menu_setting
 		= { .tag = DHCP_PXE_BOOT_MENU };
 	char buf[256];
+	char ruf[256];
 	struct in_addr next_server;
 	unsigned int pxe_discovery_control;
 	int rc;
@@ -188,6 +206,11 @@
 	fetch_ipv4_setting ( NULL, &next_server_setting, &next_server );
 	fetch_string_setting ( NULL, &filename_setting, buf, sizeof ( buf ) );
 	if ( buf[0] ) {
+        /* Going to PXE, but set up iBFT if applicable first */
+        fetch_string_setting(NULL, &root_path_setting,ruf,sizeof(ruf));
+        if (ruf[0]) {
+            reg_root_path ( ruf );
+        }
 		printf ( "Booting from filename \"%s\"\n", buf );
 		return boot_next_server_and_filename ( next_server, buf );
 	}
