int init_hurd (const char *ver)
{
  struct fdisk_partition *p;
  int cflag, status;
  char *jflag;
  const char *extra_hint = "";
  int Oflag = DLG_NO;		/* most people don't need the old linux 2.0 version ext2 */

  if (!strcmp(ver, "2"))
    jflag = "";
  else if (!strcmp(ver, "3"))
    jflag = "-j";
  else
    return 1;

  sync();
  snprintf(prtbuf, sizeof(prtbuf), _("Please select the partition to initialize as a Hurd "
				     "\"Ext%s\" filesystem."), ver);
  p = select_not_mounted(prtbuf, _("Select Partition"), 1, FSTYPE_EXT2);
  if (! p)
    return 1;


  cflag = get_cflag(p->name);

  if (! bootargs.isquiet) {
    snprintf(prtbuf, sizeof(prtbuf), _("You have chosen to initialize %s as a Hurd "
				       "\"Ext%s\" filesystem. This will permanently "
				       "erase any data on this partition.\n\n"
				       "Are you sure you want to do this?"), p->name, ver);
    if (yesNoBox(prtbuf, _("Are You Sure?")) == DLG_NO)
      return 1;
  }

  INFOMSG("Initializing partition %s as Ext%s for kernel %s or better", 
          p->name, ver, ( Oflag == DLG_NO ? "2.2" : "2.0"));

  snprintf(prtbuf, sizeof(prtbuf), "mkfs.ext2 %s %s %s %s", jflag, ( Oflag == DLG_YES ? " : "-o hurd"),
	  ( cflag ? "-c" : ""), p->name);
#endif
  boxSuspend();
  printf(CLEAR);
  if ( Oflag == DLG_YES )
    printf(_("Creating Ext%s filesystem (with 2.0 kernel compatibility)...\n"), ver);
  else
    printf(_("Creating Ext%s filesystem (for 2.2 and newer kernels only)...\n"), ver);

  DEBUGMSG("Creating filesystem on %s with cmd: %s", p->name, prtbuf);
  status = system(prtbuf);
  boxResume();

  if (status) {
    ERRMSG("Filesystem creation with cmd '%s' failed (%d)", prtbuf, status);
    problemBox(_("The filesystem was not created."), _("Problem"));
    return 1;
  } else
    return mount_partition(p);
}
