[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Patch] make mips/ip22 bootable form harddisk



...let's try again...
 -- Guido
--- utilities/dbootstrap/bootconfig.c.orig	Mon Aug  6 12:12:33 2001
+++ utilities/dbootstrap/bootconfig.c	Mon Aug  6 12:13:42 2001
@@ -1408,6 +1408,52 @@
 }
 #endif /* USE_ELILO */
 
+#ifdef USE_DVHTOOL
+static int run_dvhtool(void)
+{
+  int count;
+  char buf[256];
+  char* disk_name;
+  struct fdisk_partition* volhdr;
+
+  if (strcmp(Arch2, "ip22") != 0) {
+	problemBox(_("Making the system bootable from harddisk is currently only supported for the mips ip22 subarchitecture - sorry."),
+        	_("Not an ip22 machine"));
+	return 0;
+  } 
+  volhdr = fdisk_find_partition_by_type(PTYPE_SGI_VOLHDR);
+  if( !volhdr ) {
+    	problemBox(_("I couldn't find any partitions with SGI disklabel. I can't make your system bootable from harddisk."),
+               _("No SGI disklabel found"));
+    	return 1;
+  } 
+  disk_name = volhdr->disk->name;
+  if ((count=readlink("/target/vmlinuz", buf, sizeof(buf))) == -1) {
+	ERRMSG("Error resolving /target/vmlinuz symlink");
+	return 1;
+  }
+  buf[count] = '\0';
+  snprintf(prtbuf, sizeof(prtbuf), 
+	"dvhtool -d %s --unix-to-vh /target/%s linux", disk_name, buf );
+  if( execlog(prtbuf, LOG_DEBUG) ) {
+	problemBox(_("Dvhtool failed - cannot continue."),"Critical error");
+	 return 1;
+  }
+  vaproblemBox(_("Important"),
+	_("I have coppied the kernel into the volume header of disk %s. "
+	  "Please adjust your PROM settings after rebooting as follows.")
+	  , disk_name);
+  vaproblemBox(_("Prom Settings"),
+	_("setenv OSLoader linux\n"
+	  "setenv SystemPartition scsi(0)disk(X)rdisk(0)partition(8)\n"
+	  "where X is the scsi id of disk %s"), disk_name);
+  vaproblemBox(_("Prom Settings"),
+	_("Furthermore you can set your root partition with:\n"
+	  "setenv OSLoadPartition %s"), Root->name);
+  return 0;
+}
+#endif /* USE_DVHTOOL */
+
 #ifdef USE_ZIPL
 static int install_zipl(void)
 {
@@ -1687,51 +1733,7 @@
 "#	restricted\n" \
 "#	alias=3\n"
 
-#ifdef USE_DVHTOOL
-static int run_dvhtool(void)
-{
-  int count;
-  char buf[256];
-  char* disk_name;
-  struct fdisk_partition* volhdr;
 
-  if (strcmp(Arch2, "ip22") != 0) {
-	problemBox(_("Making the system bootable from harddisk is currently only supported for the mips ip22 subarchitecture - sorry."),
-        	_("Not an ip22 machine"));
-	return 0;
-  } 
-  volhdr = fdisk_find_partition_by_type(PTYPE_SGI_VOLHDR);
-  if( !volhdr ) {
-    	problemBox(_("I couldn't find any partitions with SGI disklabel. I can't make your system bootable from harddisk."),
-               _("No SGI disklabel found"));
-    	return 1;
-  } 
-  disk_name = volhdr->disk->name;
-  if ((count=readlink("/target/vmlinuz", buf, sizeof(buf))) == -1) {
-	ERRMSG("Error resolving /target/vmlinuz symlink");
-	return 1;
-  }
-  buf[count] = '\0';
-  snprintf(prtbuf, sizeof(prtbuf), 
-	"dvhtool -d %s --unix-to-vh /target/%s linux", disk_name, buf );
-  if( execlog(prtbuf, LOG_DEBUG) ) {
-	problemBox(_("Dvhtool failed - cannot continue."),"Critical error");
-	 return 1;
-  }
-  vaproblemBox(_("Important"),
-	_("I have coppied the kernel into the volume header of disk %s. "
-	  "Please adjust your PROM settings after rebooting as follows.")
-	  , disk_name);
-  vaproblemBox(_("Prom Settings"),
-	_("setenv OSLoader linux\n"
-	  "setenv SystemPartition scsi(0)disk(X)rdisk(0)partition(8)\n"
-	  "where X is the scsi id of disk %s"), disk_name);
-  vaproblemBox(_("Prom Settings"),
-	_("Furthermore you can set your root partition with:\n"
-	  "setenv OSLoadPartition %s"), Root->name);
-  return 0;
-}
-#endif
 
 
 static char * get_ramdisk_size(char *files[25])

Reply to: