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

Bug#136818: powerpc/new-powermac] will not mount /boot partition



On Mon, 2002-03-04 at 13:57, Matt Kraai wrote:
> Package: boot-floppies
> Version: N/A; reported 2002-03-04
> 
> The boot-floppies do not permit a /boot partition to be
> mounted.  They complain that its file system is not supported by
> the boot loader.

Ok.  Here's my suggested patch.  It is not yet tested, but it *should*
work.  I think.




Index: partition_config.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/partition_config.c,v
retrieving revision 1.146
diff -u -u -r1.146 partition_config.c
--- partition_config.c	2002/02/17 22:00:23	1.146
+++ partition_config.c	2002/03/04 20:40:55
@@ -119,40 +119,40 @@
 #if #cpu(powerpc)
 int
 verify_powerpc_mount(char *mount_point) {
-    /* yaboot can read ext2,ext3,xfs,reiserfs, but crippleware filesystems
-       like hfs will break make-bootable.
-       quik can only read ext2. */
-    if ((!strcmp(mount_point, "/boot")) || (!strcmp(mount_point, "/boot/"))) {
-      if (strstr(Arch2, "PowerMac")) {
-	int is_newworld = !strcmp(Arch3, "NewWorld");
-	if (!is_fstype("/boot", "ext2")
-	    ||
-	    (is_newworld ? !is_fstype("/boot", "ext3")
-	     || !is_fstype("/boot", "xfs")
-	     /* Should someone WANT to lose their data...*/
-                	  || !is_fstype("/boot", "reiserfs")
-	     : 0))
-	  {
-	    snprintf(prtbuf, sizeof(prtbuf),
-		     _("The file system type you have chosen for /boot "
-		       "is not compatible with the %s bootloader. Please "
-		       "choose one of: ext2%s%s"),
-		     is_newworld ? "yaboot" : "quik",
-		     is_ext3 ? " ext3" : "",
-		     is_xfs ? " xfs" : "");
-	    problemBox(prtbuf,
-		       _("Choose another file system"));
-	    return 1;
-	  }
-	else if (!(((Arch3 != NULL) && (0 == strcmp(Arch3, "NewWorld"))) || (0 == strcmp(Arch2, "chrp"))))
-	  if (DLG_NO == yesNoBox(_("Quik may not work correctly if a separate "
-				   "/boot partition is used. Do you wish to continue "
-				   "mounting /boot?"),
-				 _("Quik problems with /boot not on /")))
-	    return 1;
-      }
+  /* yaboot can read ext2,ext3,xfs,reiserfs, but crippleware filesystems
+     like hfs will break make-bootable.
+     quik can only read ext2. */
+  if (!strncmp(mount_point, "/target/boot", 12)) {
+    if (strstr(Arch2, "PowerMac")) {
+      int is_newworld = !strcmp(Arch3, "NewWorld");
+      if ((!is_newworld
+	   && !is_fstype("/boot", "ext2"))
+	  || (is_newworld
+	      && !is_fstype("/boot", "ext2")
+	      && !is_fstype("/boot", "ext3")
+	      && !is_fstype("/boot", "xfs")
+	      && !is_fstype("/boot", "reiserfs")))
+	{
+	  snprintf(prtbuf, sizeof(prtbuf),
+		   _("The file system type you have chosen for /boot "
+		     "is not compatible with the %s bootloader. Please "
+		     "choose one of: ext2%s%s"),
+		   is_newworld ? "yaboot" : "quik",
+		   is_ext3 ? " ext3" : "",
+		   is_xfs ? " xfs" : "");
+	  problemBox(prtbuf, _("Choose another file system"));
+	  return 1;
+	}
+      else if (!(((Arch3 != NULL) && (0 == strcmp(Arch3, "NewWorld")))
+		 || (0 == strcmp(Arch2, "chrp"))))
+	if (DLG_NO == yesNoBox(_("Quik may not work correctly if a separate "
+				 "/boot partition is used. Do you wish to continue "
+				 "mounting /boot?"),
+			       _("Quik problems with /boot not on /")))
+	  return 1;
     }
-    return 0;
+  }
+  return 0;
 }
 #endif
 
@@ -639,16 +639,16 @@
     else {
       mount_point = strdup(mount_points[status].tag);
     }
-#if #cpu(powerpc)
-    if (verify_powerpc_mount(mount_point))
-       return 1;
-#endif
     if (NULL == mount_point) return 1;
     real_mount_point = (char *)malloc(9 + strlen(mount_point));
     strcpy(real_mount_point, "/target");
     if (mount_point[0] != '/')
 	strcat(real_mount_point, "/");
     strcat(real_mount_point, mount_point);
+#if #cpu(powerpc)
+    if (verify_powerpc_mount(real_mount_point))
+      return 1;
+#endif
   }
 
   if (! NAME_ISDIR( real_mount_point, &statbuf ) ) {

Reply to: