Skip to contentSkip to conversation

Add support for menu.c32 and vesamenu.c32 in lib/syslinux_parse

bug #44238 Lunar 3 participants 9 messages Feb 13, 2015 – Mar 17, 2015 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Lunar

author
#2 lore raw

Andrei Borzenkov:

Quoted 13 lines

Follow-up Comment #1, bug #44238 (project grub):

(quoted diff) +10 -0
+	    while (*ptr)
+	      {
+		end = ptr;
+		for (end = ptr; *end && !grub_isspace (*end); end++);
+		if (*end)
+		  *end++ = '\0';
+
+		/* "~" is supposed to be current file, so let's skip it */
+		if (grub_strcmp (ptr, "~") == 0)
+		  continue;
Quoted 1 line

If you hit "~" you get endless loop.

Thanks for spotting the mistake.

Quoted 1 line

Could you post fixed version to grub-devel for easier review?

Attached.

Signature · 1 line
Lunar                                             <[email protected]>

From 9b441e5e6c602c71e522c594ca6cff72a12c078c Mon Sep 17 00:00:00 2001
From: Lunar <[email protected]>
Date: Sat, 14 Feb 2015 14:14:25 +0100
Subject: [PATCH 1/2] lib/syslinux_parse: add support for (vesa)menu.c32

Fixes Savannah bug #44238.

---
 grub-core/lib/syslinux_parse.c | 157 ++++++++++++++++++++++++++---------------
 1 file changed, 99 insertions(+), 58 deletions(-)
grub-core/lib/syslinux_parse.c +99 -58
index 2c874b1..b0d5f9e 100644
@@ -840,6 +840,74 @@ simplify_filename (char *str)
 }
 
 static grub_err_t
+print_config (struct output_buffer *outbuf,
+	      struct syslinux_menu *menu,
+              const char *filename, const char *basedir)
+{
+  grub_err_t err;
+  char *new_cwd, *new_target_cwd;
+
+  new_cwd = get_read_filename (menu, basedir);
+  if (!new_cwd)
+    return grub_errno;
+  new_target_cwd = get_target_filename (menu, basedir);
+  if (!new_target_cwd)
+    return grub_errno;
+
+  struct syslinux_menu *menuptr;
+  char *newname;
+  int depth = 0;
+
+  newname = get_read_filename (menu, filename);
+  if (!newname)
+    return grub_errno;
+  simplify_filename (newname);
+
+  print_string ("#");
+  print_file (outbuf, menu, filename, NULL);
+  print_string (" ");
+  print (outbuf, newname, grub_strlen (newname));
+  print_string (":\n");
+
+  for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++)
+    if (grub_strcmp (menuptr->filename, newname) == 0
+        || depth > 20)
+      break;
+  if (menuptr)
+    {
+      print_string ("  syslinux_configfile -r ");
+      print_file (outbuf, menu, "/", NULL);
+      print_string (" -c ");
+      print_file (outbuf, menu, basedir, NULL);
+      print_string (" ");
+      print_file (outbuf, menu, filename, NULL);
+      print_string ("\n");
+    }
+  else
+    {
+      err = config_file (outbuf, menu->root_read_directory,
+                         menu->root_target_directory, new_cwd, new_target_cwd,
+                         newname, menu, menu->flavour);
+      if (err == GRUB_ERR_FILE_NOT_FOUND
+          || err == GRUB_ERR_BAD_FILENAME)
+        {
+          grub_errno = err = GRUB_ERR_NONE;
+          print_string ("# File ");
+          err = print (outbuf, newname, grub_strlen (newname));
+          if (err)
+            return err;
+          print_string (" not found\n");
+        }
+      if (err)
+        return err;
+    }
+  grub_free (newname);
+  grub_free (new_cwd);
+  grub_free (new_target_cwd);
+  return GRUB_ERR_NONE;
+}
+
+static grub_err_t
 write_entry (struct output_buffer *outbuf,
 	     struct syslinux_menu *menu,
 	     struct syslinux_menuentry *curentry)
@@ -1240,6 +1308,36 @@ write_entry (struct output_buffer *outbuf,
 	    break;
 	  }
 
+	if (grub_strcasecmp (basename, "menu.c32") == 0 ||
+	    grub_strcasecmp (basename, "vesamenu.c32") == 0)
+	  {
+	    char *ptr;
+	    char *end;
+
+	    ptr = curentry->append;
+	    if (!ptr)
+	      return grub_errno;
+
+	    while (*ptr)
+	      {
+		end = ptr;
+		for (end = ptr; *end && !grub_isspace (*end); end++);
+		if (*end)
+		  *end++ = '\0';
+
+		/* "~" is supposed to be current file, so let's skip it */
+		if (grub_strcmp (ptr, "~") != 0)
+		  {
+		    err = print_config (outbuf, menu, ptr, "");
+		    if (err != GRUB_ERR_NONE)
+		      break;
+                  }
+		for (ptr = end; *ptr && grub_isspace (*ptr); ptr++);
+	      }
+	    err = GRUB_ERR_NONE;
+	    break;
+	  }
+
 	/* FIXME: gdb, GFXBoot, Hdt, Ifcpu, Ifplop, Kbdmap,
 	   FIXME: Linux, Lua, Meminfo, rosh, Sanbboot  */
 
@@ -1252,70 +1350,13 @@ write_entry (struct output_buffer *outbuf,
       }
     case KERNEL_CONFIG:
       {
-	char *new_cwd, *new_target_cwd;
 	const char *ap;
 	ap = curentry->append;
 	if (!ap)
 	  ap = curentry->argument;
 	if (!ap)
 	  ap = "";
-	new_cwd = get_read_filename (menu, ap);
-	if (!new_cwd)
-	  return grub_errno;
-	new_target_cwd = get_target_filename (menu, ap);
-	if (!new_target_cwd)
-	  return grub_errno;
-
-	struct syslinux_menu *menuptr;
-	char *newname;
-	int depth = 0;
-	
-	newname = get_read_filename (menu, curentry->kernel_file);
-	if (!newname)
-	  return grub_errno;
-	simplify_filename (newname);
-
-	print_string ("#");
-	print_file (outbuf, menu, curentry->kernel_file, NULL);
-	print_string (" ");
-	print (outbuf, newname, grub_strlen (newname));
-	print_string (":\n");
-
-	for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++)
-	  if (grub_strcmp (menuptr->filename, newname) == 0
-	      || depth > 20)
-	    break;
-	if (menuptr)
-	  {
-	    print_string ("  syslinux_configfile -r ");
-	    print_file (outbuf, menu, "/", NULL);
-	    print_string (" -c ");
-	    print_file (outbuf, menu, ap, NULL);
-	    print_string (" ");
-	    print_file (outbuf, menu, curentry->kernel_file, NULL);
-	    print_string ("\n");
-	  }
-	else
-	  {
-	    err = config_file (outbuf, menu->root_read_directory,
-			       menu->root_target_directory, new_cwd, new_target_cwd,
-			       newname, menu, menu->flavour);
-	    if (err == GRUB_ERR_FILE_NOT_FOUND
-		|| err == GRUB_ERR_BAD_FILENAME)
-	      {
-		grub_errno = err = GRUB_ERR_NONE;
-		print_string ("# File ");
-		err = print (outbuf, newname, grub_strlen (newname));
-		if (err)
-		  return err;
-		print_string (" not found\n");
-	      }
-	    if (err)
-	      return err;
-	  }
-	grub_free (newname);
-	grub_free (new_cwd);
-	grub_free (new_target_cwd);
+	print_config (outbuf, menu, curentry->kernel_file, ap);
       }
       break;
     case KERNEL_NO_KERNEL:
Signature · 1 line
1.9.1
#3 lore raw

В Fri, 13 Feb 2015 21:20:23 +0100
Lunar <[email protected]> пишет:

Quoted 22 lines

From 9b441e5e6c602c71e522c594ca6cff72a12c078c Mon Sep 17 00:00:00 2001
From: Lunar <[email protected]>
Date: Sat, 14 Feb 2015 14:14:25 +0100
Subject: [PATCH 1/2] lib/syslinux_parse: add support for (vesa)menu.c32

Fixes Savannah bug #44238.

---
 grub-core/lib/syslinux_parse.c | 157 ++++++++++++++++++++++++++---------------
 1 file changed, 99 insertions(+), 58 deletions(-)
grub-core/lib/syslinux_parse.c +4 -0
index 2c874b1..b0d5f9e 100644
@@ -840,6 +840,74 @@ simplify_filename (char *str)
 }
 
 static grub_err_t
+print_config (struct output_buffer *outbuf,
+	      struct syslinux_menu *menu,
+              const char *filename, const char *basedir)
+{

grub-core/lib/syslinux_parse.c simplify_filename (char *str) · line 856

Quoted 10 lines
grub-core/lib/syslinux_parse.c +10 -0
+  grub_err_t err;
+  char *new_cwd, *new_target_cwd;
+
+  new_cwd = get_read_filename (menu, basedir);
+  if (!new_cwd)
+    return grub_errno;
+  new_target_cwd = get_target_filename (menu, basedir);
+  if (!new_target_cwd)
+    return grub_errno;
+

Memory leak.

grub-core/lib/syslinux_parse.c simplify_filename (char *str) · line 860

Quoted 4 lines
grub-core/lib/syslinux_parse.c +4 -0
+  struct syslinux_menu *menuptr;
+  char *newname;
+  int depth = 0;
+

If you move code anyway, please move declarations to the beginning.

grub-core/lib/syslinux_parse.c simplify_filename (char *str) · line 863

Quoted 3 lines
grub-core/lib/syslinux_parse.c +3 -0
+  newname = get_read_filename (menu, filename);
+  if (!newname)
+    return grub_errno;

Memory leak.

Quoted 25 lines
grub-core/lib/syslinux_parse.c +25 -0
+  simplify_filename (newname);
+
+  print_string ("#");
+  print_file (outbuf, menu, filename, NULL);
+  print_string (" ");
+  print (outbuf, newname, grub_strlen (newname));
+  print_string (":\n");
+
+  for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++)
+    if (grub_strcmp (menuptr->filename, newname) == 0
+        || depth > 20)
+      break;
+  if (menuptr)
+    {
+      print_string ("  syslinux_configfile -r ");
+      print_file (outbuf, menu, "/", NULL);
+      print_string (" -c ");
+      print_file (outbuf, menu, basedir, NULL);
+      print_string (" ");
+      print_file (outbuf, menu, filename, NULL);
+      print_string ("\n");
+    }
+  else
+    {
+      err = config_file (outbuf, menu->root_read_directory,

grub-core/lib/syslinux_parse.c simplify_filename (char *str) · line 898

Quoted 10 lines
grub-core/lib/syslinux_parse.c +10 -0
+                         menu->root_target_directory, new_cwd, new_target_cwd,
+                         newname, menu, menu->flavour);
+      if (err == GRUB_ERR_FILE_NOT_FOUND
+          || err == GRUB_ERR_BAD_FILENAME)
+        {
+          grub_errno = err = GRUB_ERR_NONE;
+          print_string ("# File ");
+          err = print (outbuf, newname, grub_strlen (newname));
+          if (err)
+            return err;

Memory leak.

grub-core/lib/syslinux_parse.c simplify_filename (char *str) · line 902

Quoted 4 lines
grub-core/lib/syslinux_parse.c +4 -0
+          print_string (" not found\n");
+        }
+      if (err)
+        return err;

Memory leak.

grub-core/lib/syslinux_parse.c simplify_filename (char *str) · line 903

Quoted 1 line
grub-core/lib/syslinux_parse.c +1 -0
+    }

Just use goto and free them all here. I understand that you just move existing code but let's also fix them.

Quoted 119 lines
grub-core/lib/syslinux_parse.c +38 -58
+  grub_free (newname);
+  grub_free (new_cwd);
+  grub_free (new_target_cwd);
+  return GRUB_ERR_NONE;
+}
+
+static grub_err_t
 write_entry (struct output_buffer *outbuf,
 	     struct syslinux_menu *menu,
 	     struct syslinux_menuentry *curentry)
@@ -1240,6 +1308,36 @@ write_entry (struct output_buffer *outbuf,
 	    break;
 	  }
 
+	if (grub_strcasecmp (basename, "menu.c32") == 0 ||
+	    grub_strcasecmp (basename, "vesamenu.c32") == 0)
+	  {
+	    char *ptr;
+	    char *end;
+
+	    ptr = curentry->append;
+	    if (!ptr)
+	      return grub_errno;
+
+	    while (*ptr)
+	      {
+		end = ptr;
+		for (end = ptr; *end && !grub_isspace (*end); end++);
+		if (*end)
+		  *end++ = '\0';
+
+		/* "~" is supposed to be current file, so let's skip it */
+		if (grub_strcmp (ptr, "~") != 0)
+		  {
+		    err = print_config (outbuf, menu, ptr, "");
+		    if (err != GRUB_ERR_NONE)
+		      break;
+                  }
+		for (ptr = end; *ptr && grub_isspace (*ptr); ptr++);
+	      }
+	    err = GRUB_ERR_NONE;
+	    break;
+	  }
+
 	/* FIXME: gdb, GFXBoot, Hdt, Ifcpu, Ifplop, Kbdmap,
 	   FIXME: Linux, Lua, Meminfo, rosh, Sanbboot  */
 
@@ -1252,70 +1350,13 @@ write_entry (struct output_buffer *outbuf,
       }
     case KERNEL_CONFIG:
       {
-	char *new_cwd, *new_target_cwd;
 	const char *ap;
 	ap = curentry->append;
 	if (!ap)
 	  ap = curentry->argument;
 	if (!ap)
 	  ap = "";
-	new_cwd = get_read_filename (menu, ap);
-	if (!new_cwd)
-	  return grub_errno;
-	new_target_cwd = get_target_filename (menu, ap);
-	if (!new_target_cwd)
-	  return grub_errno;
-
-	struct syslinux_menu *menuptr;
-	char *newname;
-	int depth = 0;
-	
-	newname = get_read_filename (menu, curentry->kernel_file);
-	if (!newname)
-	  return grub_errno;
-	simplify_filename (newname);
-
-	print_string ("#");
-	print_file (outbuf, menu, curentry->kernel_file, NULL);
-	print_string (" ");
-	print (outbuf, newname, grub_strlen (newname));
-	print_string (":\n");
-
-	for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++)
-	  if (grub_strcmp (menuptr->filename, newname) == 0
-	      || depth > 20)
-	    break;
-	if (menuptr)
-	  {
-	    print_string ("  syslinux_configfile -r ");
-	    print_file (outbuf, menu, "/", NULL);
-	    print_string (" -c ");
-	    print_file (outbuf, menu, ap, NULL);
-	    print_string (" ");
-	    print_file (outbuf, menu, curentry->kernel_file, NULL);
-	    print_string ("\n");
-	  }
-	else
-	  {
-	    err = config_file (outbuf, menu->root_read_directory,
-			       menu->root_target_directory, new_cwd, new_target_cwd,
-			       newname, menu, menu->flavour);
-	    if (err == GRUB_ERR_FILE_NOT_FOUND
-		|| err == GRUB_ERR_BAD_FILENAME)
-	      {
-		grub_errno = err = GRUB_ERR_NONE;
-		print_string ("# File ");
-		err = print (outbuf, newname, grub_strlen (newname));
-		if (err)
-		  return err;
-		print_string (" not found\n");
-	      }
-	    if (err)
-	      return err;
-	  }
-	grub_free (newname);
-	grub_free (new_cwd);
-	grub_free (new_target_cwd);
+	print_config (outbuf, menu, curentry->kernel_file, ap);
       }
       break;
     case KERNEL_NO_KERNEL:
author
#4 lore raw

Andrei Borzenkov:

Quoted 1 line

[… review and comments …]

Ok, here's another try.

Signature · 1 line
Lunar                                             <[email protected]>

From 9ce42bf6373bdf4c8c66e897e8b00908b5df03bf Mon Sep 17 00:00:00 2001
From: Lunar <[email protected]>
Date: Fri, 13 Feb 2015 22:08:11 +0100
Subject: [PATCH] lib/syslinux_parse: add support for (vesa)menu.c32

Fixes Savannah bug #44238.

---
 grub-core/lib/syslinux_parse.c | 165 ++++++++++++++++++++++++++---------------
 1 file changed, 107 insertions(+), 58 deletions(-)
grub-core/lib/syslinux_parse.c +107 -58
index 2c874b1..432456e 100644
@@ -840,6 +840,82 @@ simplify_filename (char *str)
 }
 
 static grub_err_t
+print_config (struct output_buffer *outbuf,
+	      struct syslinux_menu *menu,
+              const char *filename, const char *basedir)
+{
+  struct syslinux_menu *menuptr;
+  grub_err_t err = GRUB_ERR_NONE;
+  char *new_cwd = NULL;
+  char *new_target_cwd = NULL;
+  char *newname = NULL;
+  int depth = 0;
+
+  new_cwd = get_read_filename (menu, basedir);
+  if (!new_cwd)
+    {
+      err = grub_errno;
+      goto out;
+    }
+  new_target_cwd = get_target_filename (menu, basedir);
+  if (!new_target_cwd)
+    {
+      err = grub_errno;
+      goto out;
+    }
+  newname = get_read_filename (menu, filename);
+  if (!newname)
+    {
+      err = grub_errno;
+      goto out;
+    }
+  simplify_filename (newname);
+
+  print_string ("#");
+  print_file (outbuf, menu, filename, NULL);
+  print_string (" ");
+  print (outbuf, newname, grub_strlen (newname));
+  print_string (":\n");
+
+  for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++)
+    if (grub_strcmp (menuptr->filename, newname) == 0
+        || depth > 20)
+      break;
+  if (menuptr)
+    {
+      print_string ("  syslinux_configfile -r ");
+      print_file (outbuf, menu, "/", NULL);
+      print_string (" -c ");
+      print_file (outbuf, menu, basedir, NULL);
+      print_string (" ");
+      print_file (outbuf, menu, filename, NULL);
+      print_string ("\n");
+    }
+  else
+    {
+      err = config_file (outbuf, menu->root_read_directory,
+                         menu->root_target_directory, new_cwd, new_target_cwd,
+                         newname, menu, menu->flavour);
+      if (err == GRUB_ERR_FILE_NOT_FOUND
+          || err == GRUB_ERR_BAD_FILENAME)
+        {
+          grub_errno = err = GRUB_ERR_NONE;
+          print_string ("# File ");
+          err = print (outbuf, newname, grub_strlen (newname));
+          if (err)
+            goto out;
+          print_string (" not found\n");
+        }
+    }
+
+ out:
+  grub_free (newname);
+  grub_free (new_cwd);
+  grub_free (new_target_cwd);
+  return err;
+}
+
+static grub_err_t
 write_entry (struct output_buffer *outbuf,
 	     struct syslinux_menu *menu,
 	     struct syslinux_menuentry *curentry)
@@ -1240,6 +1316,36 @@ write_entry (struct output_buffer *outbuf,
 	    break;
 	  }
 
+	if (grub_strcasecmp (basename, "menu.c32") == 0 ||
+	    grub_strcasecmp (basename, "vesamenu.c32") == 0)
+	  {
+	    char *ptr;
+	    char *end;
+
+	    ptr = curentry->append;
+	    if (!ptr)
+	      return grub_errno;
+
+	    while (*ptr)
+	      {
+		end = ptr;
+		for (end = ptr; *end && !grub_isspace (*end); end++);
+		if (*end)
+		  *end++ = '\0';
+
+		/* "~" is supposed to be current file, so let's skip it */
+		if (grub_strcmp (ptr, "~") != 0)
+		  {
+		    err = print_config (outbuf, menu, ptr, "");
+		    if (err != GRUB_ERR_NONE)
+		      break;
+                  }
+		for (ptr = end; *ptr && grub_isspace (*ptr); ptr++);
+	      }
+	    err = GRUB_ERR_NONE;
+	    break;
+	  }
+
 	/* FIXME: gdb, GFXBoot, Hdt, Ifcpu, Ifplop, Kbdmap,
 	   FIXME: Linux, Lua, Meminfo, rosh, Sanbboot  */
 
@@ -1252,70 +1358,13 @@ write_entry (struct output_buffer *outbuf,
       }
     case KERNEL_CONFIG:
       {
-	char *new_cwd, *new_target_cwd;
 	const char *ap;
 	ap = curentry->append;
 	if (!ap)
 	  ap = curentry->argument;
 	if (!ap)
 	  ap = "";
-	new_cwd = get_read_filename (menu, ap);
-	if (!new_cwd)
-	  return grub_errno;
-	new_target_cwd = get_target_filename (menu, ap);
-	if (!new_target_cwd)
-	  return grub_errno;
-
-	struct syslinux_menu *menuptr;
-	char *newname;
-	int depth = 0;
-	
-	newname = get_read_filename (menu, curentry->kernel_file);
-	if (!newname)
-	  return grub_errno;
-	simplify_filename (newname);
-
-	print_string ("#");
-	print_file (outbuf, menu, curentry->kernel_file, NULL);
-	print_string (" ");
-	print (outbuf, newname, grub_strlen (newname));
-	print_string (":\n");
-
-	for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++)
-	  if (grub_strcmp (menuptr->filename, newname) == 0
-	      || depth > 20)
-	    break;
-	if (menuptr)
-	  {
-	    print_string ("  syslinux_configfile -r ");
-	    print_file (outbuf, menu, "/", NULL);
-	    print_string (" -c ");
-	    print_file (outbuf, menu, ap, NULL);
-	    print_string (" ");
-	    print_file (outbuf, menu, curentry->kernel_file, NULL);
-	    print_string ("\n");
-	  }
-	else
-	  {
-	    err = config_file (outbuf, menu->root_read_directory,
-			       menu->root_target_directory, new_cwd, new_target_cwd,
-			       newname, menu, menu->flavour);
-	    if (err == GRUB_ERR_FILE_NOT_FOUND
-		|| err == GRUB_ERR_BAD_FILENAME)
-	      {
-		grub_errno = err = GRUB_ERR_NONE;
-		print_string ("# File ");
-		err = print (outbuf, newname, grub_strlen (newname));
-		if (err)
-		  return err;
-		print_string (" not found\n");
-	      }
-	    if (err)
-	      return err;
-	  }
-	grub_free (newname);
-	grub_free (new_cwd);
-	grub_free (new_target_cwd);
+	print_config (outbuf, menu, curentry->kernel_file, ap);
       }
       break;
     case KERNEL_NO_KERNEL:
Signature · 1 line
1.9.1
#5 lore raw

В Fri, 13 Feb 2015 22:09:04 +0100
Lunar <[email protected]> пишет:

Quoted 5 lines

Andrei Borzenkov:

Quoted 1 line

[… review and comments …]

Ok, here's another try.

It looks OK but as someone reported that your patches seem to cause problems elsewhere let's wait for confirmation.

@gluglug - could you test both update versions? Thank you.

author
#6 lore raw

Andrei Borzenkov:

Quoted 6 lines

В Fri, 13 Feb 2015 22:09:04 +0100
Lunar <[email protected]> пишет:

Quoted 3 lines

Andrei Borzenkov:

Quoted 1 line

[… review and comments …]

Quoted 7 lines
Quoted 2 lines

Ok, here's another try.

It looks OK but as someone reported that your patches seem to cause problems elsewhere let's wait for confirmation.

@gluglug - could you test both update versions? Thank you.

fchmmr said that there was an issue with Trisquel 7.0 GNOME. But if there's one, it doesn't seem to be related to the patches.

Attached is the output of grub-syslinux2cfg without and with the patches applied on isolinux.cfg from Trisquel 7.0 GNOME. The differences are only on the linux command lines and the initrd= option:

tmp/with renamed from tmp/without +12 -12
@@ -23,22 +23,22 @@
  default='vesamenu.c32'
 menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt --
+  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt only-ubiquity --
+  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt only-ubiquity --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz.netinst' vga=788 quiet BOOT_IMAGE=linux --
+  linux$linux_suffix '/'/'/casper/vmlinuz.netinst' initrd=/casper/initrd.netinst vga=788 quiet BOOT_IMAGE=linux --
   initrd$linux_suffix '/'/'/casper/initrd.netinst' 
 }
 menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check quiet splash --
+  linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd quiet splash --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
@@ -101,22 +101,22 @@
  default='live'
 menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt --
+  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt only-ubiquity --
+  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt only-ubiquity --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz.netinst' vga=788 quiet BOOT_IMAGE=linux --
+  linux$linux_suffix '/'/'/casper/vmlinuz.netinst' initrd=/casper/initrd.netinst vga=788 quiet BOOT_IMAGE=linux --
   initrd$linux_suffix '/'/'/casper/initrd.netinst' 
 }
 menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check quiet splash --
+  linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd quiet splash --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
@@ -192,22 +192,22 @@
  default='vesamenu.c32'
 menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt --
+  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt only-ubiquity --
+  linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt only-ubiquity --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz.netinst' vga=788 quiet BOOT_IMAGE=linux --
+  linux$linux_suffix '/'/'/casper/vmlinuz.netinst' initrd=/casper/initrd.netinst vga=788 quiet BOOT_IMAGE=linux --
   initrd$linux_suffix '/'/'/casper/initrd.netinst' 
 }
 menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
  if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
-  linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check quiet splash --
+  linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd quiet splash --
   initrd$linux_suffix '/'/'/casper/initrd' 
 }
 menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
Signature · 1 line
Lunar                                             <[email protected]>

background_image '/mnt/isolinux'/'splash.png'
set timeout=30
# D-I config version 2.0
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'

# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
default='vesamenu.c32'
menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt only-ubiquity -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz.netinst' vga=788 quiet BOOT_IMAGE=linux --
initrd$linux_suffix '/'/'/casper/initrd.netinst'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check quiet splash --
initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/isolinux/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//mnt/isolinux/gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//mnt/isolinux/adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
# UNSUPPORTED command 'ui gfxboot bootlogo'
#'/mnt/isolinux'/'prompt.cfg' (host)/mnt/isolinux/prompt.cfg:
background_image '/mnt/isolinux/'/'splash.png'
set timeout=5
# UNSUPPORTED command 'display f1.txt'
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'

# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
default='live'
menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt only-ubiquity -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz.netinst' vga=788 quiet BOOT_IMAGE=linux --
initrd$linux_suffix '/'/'/casper/initrd.netinst'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check quiet splash --
initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/isolinux/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//mnt/isolinux//gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//mnt/isolinux//adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
#'/mnt/isolinux/'/'prompt.cfg' (host)/mnt/isolinux/prompt.cfg:
syslinux_configfile -r '/'/'/' -c '/mnt/isolinux/'/'' '/mnt/isolinux/'/'prompt.cfg'
}
menuentry 'menu' --id 'menu' {
# UNSUPPORTED command 'f1 f1.txt'
# UNSUPPORTED command 'f2 f2.txt'
# UNSUPPORTED command 'f3 f3.txt'
# UNSUPPORTED command 'f4 f4.txt'
# UNSUPPORTED command 'f5 f5.txt'
# UNSUPPORTED command 'f6 f6.txt'
# UNSUPPORTED command 'f7 f7.txt'
# UNSUPPORTED command 'f8 f8.txt'
# UNSUPPORTED command 'f9 f9.txt'
# UNSUPPORTED command 'f0 f10.txt'
#'/mnt/isolinux/'/'isolinux.cfg' (host)/mnt/isolinux/isolinux.cfg:
background_image '/mnt/isolinux//'/'splash.png'
set timeout=30
# D-I config version 2.0
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'

# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
default='vesamenu.c32'
menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed boot=casper splash quiet noprompt only-ubiquity -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz.netinst' vga=788 quiet BOOT_IMAGE=linux --
initrd$linux_suffix '/'/'/casper/initrd.netinst'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check quiet splash --
initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/isolinux/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//mnt/isolinux///gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//mnt/isolinux///adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
# UNSUPPORTED command 'ui gfxboot bootlogo'
#'/mnt/isolinux//'/'prompt.cfg' (host)/mnt/isolinux/prompt.cfg:
syslinux_configfile -r '/'/'/' -c '/mnt/isolinux//'/'' '/mnt/isolinux//'/'prompt.cfg'
}
}
}

background_image '/mnt/isolinux'/'splash.png'
set timeout=30
# D-I config version 2.0
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'

# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
default='vesamenu.c32'
menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt only-ubiquity -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz.netinst' initrd=/casper/initrd.netinst vga=788 quiet BOOT_IMAGE=linux --
initrd$linux_suffix '/'/'/casper/initrd.netinst'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd quiet splash --
initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/isolinux/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//mnt/isolinux/gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//mnt/isolinux/adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
# UNSUPPORTED command 'ui gfxboot bootlogo'
#'/mnt/isolinux'/'prompt.cfg' (host)/mnt/isolinux/prompt.cfg:
background_image '/mnt/isolinux/'/'splash.png'
set timeout=5
# UNSUPPORTED command 'display f1.txt'
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'

# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
default='live'
menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt only-ubiquity -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz.netinst' initrd=/casper/initrd.netinst vga=788 quiet BOOT_IMAGE=linux --
initrd$linux_suffix '/'/'/casper/initrd.netinst'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd quiet splash --
initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/isolinux/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//mnt/isolinux//gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//mnt/isolinux//adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
#'/mnt/isolinux/'/'prompt.cfg' (host)/mnt/isolinux/prompt.cfg:
syslinux_configfile -r '/'/'/' -c '/mnt/isolinux/'/'' '/mnt/isolinux/'/'prompt.cfg'
}
menuentry 'menu' --id 'menu' {
# UNSUPPORTED command 'f1 f1.txt'
# UNSUPPORTED command 'f2 f2.txt'
# UNSUPPORTED command 'f3 f3.txt'
# UNSUPPORTED command 'f4 f4.txt'
# UNSUPPORTED command 'f5 f5.txt'
# UNSUPPORTED command 'f6 f6.txt'
# UNSUPPORTED command 'f7 f7.txt'
# UNSUPPORTED command 'f8 f8.txt'
# UNSUPPORTED command 'f9 f9.txt'
# UNSUPPORTED command 'f0 f10.txt'
#'/mnt/isolinux/'/'isolinux.cfg' (host)/mnt/isolinux/isolinux.cfg:
background_image '/mnt/isolinux//'/'splash.png'
set timeout=30
# D-I config version 2.0
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'

# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
default='vesamenu.c32'
menuentry 'Try Trisquel without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true persistent file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel' --hotkey 'i' --id 'install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' cdrom-detect/try-usb=true file=/cdrom/preseed/trisquel.seed initrd=/casper/initrd boot=casper splash quiet noprompt only-ubiquity -- initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Install Trisquel in text mode' --hotkey 'i' --id 'netinstall' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz.netinst' initrd=/casper/initrd.netinst vga=788 quiet BOOT_IMAGE=linux --
initrd$linux_suffix '/'/'/casper/initrd.netinst'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd quiet splash --
initrd$linux_suffix '/'/'/casper/initrd'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/isolinux/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//mnt/isolinux///gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//mnt/isolinux///adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
# UNSUPPORTED command 'ui gfxboot bootlogo'
#'/mnt/isolinux//'/'prompt.cfg' (host)/mnt/isolinux/prompt.cfg:
syslinux_configfile -r '/'/'/' -c '/mnt/isolinux//'/'' '/mnt/isolinux//'/'prompt.cfg'
}
}
}

#7 lore raw

В Sat, 14 Feb 2015 09:22:19 +0100
Lunar <[email protected]> пишет:

Quoted 10 lines

Andrei Borzenkov:

Quoted 9 lines

В Fri, 13 Feb 2015 22:09:04 +0100
Lunar <[email protected]> пишет:

Quoted 5 lines

Andrei Borzenkov:

Quoted 1 line

[… review and comments …]

Ok, here's another try.

Quoted 8 lines
Quoted 4 lines

It looks OK but as someone reported that your patches seem to cause problems elsewhere let's wait for confirmation.

@gluglug - could you test both update versions? Thank you.

fchmmr said that there was an issue with Trisquel 7.0 GNOME. But if there's one, it doesn't seem to be related to the patches.

Well, one of your patches had double free, it may lead to unexpected results. It would still be helpful to confirm that problem went away.

BTW if you could write test for syslinux parser it would be great!

#8 lore raw
In reply to Andrei Borzenkov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, see my other message that I sent a few minutes ago. Those problems that I reported "elsewhere" no longer exist with the latest rebased patch.

Quoted 6 lines · Andrei Borzenkov

В Fri, 13 Feb 2015 22:09:04 +0100 Lunar <[email protected]> пишет:

Quoted 3 lines

Andrei Borzenkov:

Quoted 1 line

[… review and comments …]

Quoted 8 lines
Quoted 2 lines

Ok, here's another try.

It looks OK but as someone reported that your patches seem to cause problems elsewhere let's wait for confirmation.

@gluglug - could you test both update versions? Thank you.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVCGdWAAoJEP9Ft0z50c+UkwIH/3qtVZWG5I9CQCyT4DrAPdfI jYOEvQsMAyFmLlCQVd+3NUlS9txwd9M8eHQ0kYRRBkWVy6kNP2MQKjcQ/hCY/hEt sOMM5f23lKWtUzc8mY3k+eV4SHjnYzCbRLu7UrUu0QCK/kNSXxg/dFKB9ylfNrVW wuF7EUm62bz5N0R/sUDgcfrxecQBvK5D8bPdn8WQJfjeBlI7+vM+KOvx3xF82MXq Oiot0ueJZlUwsDINw4s+d2+Yi6fH3Uf8TwxgGr/UzBAB5n6Li40wlCXMAhw3UC+9 /hhf561zkOGKL+0y1Ttu0sk9TRTT+2jFvXmkNGRDRjkOdAt/9bjvXLt2JMIBEOE= =irs5
-----END PGP SIGNATURE-----

#9 lore raw
In reply to Andrei Borzenkov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<fchmmr> Lunar^, I updated to the latest GRUB and tested those 2 patches. Tails does indeed boot as you said. However, Trisquel ISOLINUX menu now no longer appears: I see these 3 messages: "error:
syntax error.", "error: Incorrect command.", "error: syntax error.". This is with Trisquel 7.0 GNOME, which you can find at
https://trisquel.info/
<fchmmr> Lunar^, shall we take this to #grub?
<fchmmr> Lunar^, this is with the very first patches that you sent. I just noticed the follow-up patches that you posted to grub-devel; I'll try those instead.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJU3sBiAAoJEP9Ft0z50c+UDEUIAIQK0BmGQSoD51yfV4xIcvfG xC82w8ddJICSfo2YZjSbKdcKJZvOKzxZgeudx2f2OVkta2VbHbN6qtNl2IXWxtvH JdMAK9wb/5NQXJ16EGTOYxuzB7eXpyzsY8P44c0O1nS3UxtFsyEGWxS5Mm/JJHMD ROGluN8D2cIgD3vnqtiOl7nOQCqx7ReOdNkUAn454KazP6N7hThtB/XGmF07i3+x HukKTnx5s19wnottlbL+yqaQiYLpdlM3ZyXZ49ZHA0V0b6ULuM07wPe06V2n698G Kak4fqgZsW3SipMOdMJUCSRAbrZ2+CmPUhCpzwcwlIQFVQfU+OKED+xqhkL+Jwc= =FdlH
-----END PGP SIGNATURE-----

#10 lore raw
In reply to Lunar

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

This is a new rebased version of the patch that Lunar linked me to:
https://people.torproject.org/~lunar/volatile/2015-03-17-e3Yp1d7FifQ/0001-lib-syslinux_parse-add-support-for-vesa-menu.c32.patch

I also attached it.

Debian ISOLINUX menu is still broken (syslinux_configfile -i just puts you back to the main screen but with the Debian background). (same issue on gnewsense)
^ this also happens without the patch

Tails ISOLINUX menu now works. (without the patch, it would show the same behaviour as with Debian, mentioned above)

I also tested Trisquel, Trisquel Mini and Parabola - these all still work (they also worked before the patch).

Tested on a ThinkPad X60 running libreboot (deblobbed coreboot), with the GRUB payload.

Regards,
Francis Rowe.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVCGcPAAoJEP9Ft0z50c+UjAcH/Ru66PfB/1VojyWXAWpFwTK/ j2cSXKZvAnca9mZPILAGX+YPTK64u9hhTnVbLmD6xEPtuNUrYJ0bOJMx3soOluhS uKxkFpjJaLVQLT/xUyg3qyblkRzGhBmLks11RirVMPiQoD2B5CTjSFxVwOMEuWtp QJOuE/PFq6kb7BitEE6a8u57G9sM/VsY3rZCHF/DsqNdlCcul0pnbfELHApF+xYo As4TkwvwoxVc5OuWVVReGMKv7Kg6ysnM/KotAcmTSTaKL7Z9h1fcnNuCNs6EpTxC p+KqWFayGFGXQBXuzt2UYdicvsd9Ot1jDZlq3rrxbPAVV5ak3MBSayxbxLJMNK0= =1x6O
-----END PGP SIGNATURE-----

From 191aeee1b67ff30d6c868320a51cb9fb766874be Mon Sep 17 00:00:00 2001
From: Lunar <[email protected]>
Date: Fri, 13 Feb 2015 22:08:11 +0100
Subject: [PATCH] lib/syslinux_parse: add support for (vesa)menu.c32

Fixes Savannah bug #44238.

---
 grub-core/lib/syslinux_parse.c | 165 ++++++++++++++++++++++++++---------------
 1 file changed, 107 insertions(+), 58 deletions(-)
grub-core/lib/syslinux_parse.c +107 -58
index 22389eb..153260b 100644
@@ -840,6 +840,82 @@ simplify_filename (char *str)
 }
 
 static grub_err_t
+print_config (struct output_buffer *outbuf,
+	      struct syslinux_menu *menu,
+              const char *filename, const char *basedir)
+{
+  struct syslinux_menu *menuptr;
+  grub_err_t err = GRUB_ERR_NONE;
+  char *new_cwd = NULL;
+  char *new_target_cwd = NULL;
+  char *newname = NULL;
+  int depth = 0;
+
+  new_cwd = get_read_filename (menu, basedir);
+  if (!new_cwd)
+    {
+      err = grub_errno;
+      goto out;
+    }
+  new_target_cwd = get_target_filename (menu, basedir);
+  if (!new_target_cwd)
+    {
+      err = grub_errno;
+      goto out;
+    }
+  newname = get_read_filename (menu, filename);
+  if (!newname)
+    {
+      err = grub_errno;
+      goto out;
+    }
+  simplify_filename (newname);
+
+  print_string ("#");
+  print_file (outbuf, menu, filename, NULL);
+  print_string (" ");
+  print (outbuf, newname, grub_strlen (newname));
+  print_string (":\n");
+
+  for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++)
+    if (grub_strcmp (menuptr->filename, newname) == 0
+        || depth > 20)
+      break;
+  if (menuptr)
+    {
+      print_string ("  syslinux_configfile -r ");
+      print_file (outbuf, menu, "/", NULL);
+      print_string (" -c ");
+      print_file (outbuf, menu, basedir, NULL);
+      print_string (" ");
+      print_file (outbuf, menu, filename, NULL);
+      print_string ("\n");
+    }
+  else
+    {
+      err = config_file (outbuf, menu->root_read_directory,
+                         menu->root_target_directory, new_cwd, new_target_cwd,
+                         newname, menu, menu->flavour);
+      if (err == GRUB_ERR_FILE_NOT_FOUND
+          || err == GRUB_ERR_BAD_FILENAME)
+        {
+          grub_errno = err = GRUB_ERR_NONE;
+          print_string ("# File ");
+          err = print (outbuf, newname, grub_strlen (newname));
+          if (err)
+            goto out;
+          print_string (" not found\n");
+        }
+    }
+
+ out:
+  grub_free (newname);
+  grub_free (new_cwd);
+  grub_free (new_target_cwd);
+  return err;
+}
+
+static grub_err_t
 write_entry (struct output_buffer *outbuf,
 	     struct syslinux_menu *menu,
 	     struct syslinux_menuentry *curentry)
@@ -1227,6 +1303,36 @@ write_entry (struct output_buffer *outbuf,
 	    break;
 	  }
 
+	if (grub_strcasecmp (basename, "menu.c32") == 0 ||
+	    grub_strcasecmp (basename, "vesamenu.c32") == 0)
+	  {
+	    char *ptr;
+	    char *end;
+
+	    ptr = curentry->append;
+	    if (!ptr)
+	      return grub_errno;
+
+	    while (*ptr)
+	      {
+		end = ptr;
+		for (end = ptr; *end && !grub_isspace (*end); end++);
+		if (*end)
+		  *end++ = '\0';
+
+		/* "~" is supposed to be current file, so let's skip it */
+		if (grub_strcmp (ptr, "~") != 0)
+		  {
+		    err = print_config (outbuf, menu, ptr, "");
+		    if (err != GRUB_ERR_NONE)
+		      break;
+                  }
+		for (ptr = end; *ptr && grub_isspace (*ptr); ptr++);
+	      }
+	    err = GRUB_ERR_NONE;
+	    break;
+	  }
+
 	/* FIXME: gdb, GFXBoot, Hdt, Ifcpu, Ifplop, Kbdmap,
 	   FIXME: Linux, Lua, Meminfo, rosh, Sanbboot  */
 
@@ -1239,70 +1345,13 @@ write_entry (struct output_buffer *outbuf,
       }
     case KERNEL_CONFIG:
       {
-	char *new_cwd, *new_target_cwd;
 	const char *ap;
 	ap = curentry->append;
 	if (!ap)
 	  ap = curentry->argument;
 	if (!ap)
 	  ap = "";
-	new_cwd = get_read_filename (menu, ap);
-	if (!new_cwd)
-	  return grub_errno;
-	new_target_cwd = get_target_filename (menu, ap);
-	if (!new_target_cwd)
-	  return grub_errno;
-
-	struct syslinux_menu *menuptr;
-	char *newname;
-	int depth = 0;
-	
-	newname = get_read_filename (menu, curentry->kernel_file);
-	if (!newname)
-	  return grub_errno;
-	simplify_filename (newname);
-
-	print_string ("#");
-	print_file (outbuf, menu, curentry->kernel_file, NULL);
-	print_string (" ");
-	print (outbuf, newname, grub_strlen (newname));
-	print_string (":\n");
-
-	for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++)
-	  if (grub_strcmp (menuptr->filename, newname) == 0
-	      || depth > 20)
-	    break;
-	if (menuptr)
-	  {
-	    print_string ("  syslinux_configfile -r ");
-	    print_file (outbuf, menu, "/", NULL);
-	    print_string (" -c ");
-	    print_file (outbuf, menu, ap, NULL);
-	    print_string (" ");
-	    print_file (outbuf, menu, curentry->kernel_file, NULL);
-	    print_string ("\n");
-	  }
-	else
-	  {
-	    err = config_file (outbuf, menu->root_read_directory,
-			       menu->root_target_directory, new_cwd, new_target_cwd,
-			       newname, menu, menu->flavour);
-	    if (err == GRUB_ERR_FILE_NOT_FOUND
-		|| err == GRUB_ERR_BAD_FILENAME)
-	      {
-		grub_errno = err = GRUB_ERR_NONE;
-		print_string ("# File ");
-		err = print (outbuf, newname, grub_strlen (newname));
-		if (err)
-		  return err;
-		print_string (" not found\n");
-	      }
-	    if (err)
-	      return err;
-	  }
-	grub_free (newname);
-	grub_free (new_cwd);
-	grub_free (new_target_cwd);
+	print_config (outbuf, menu, curentry->kernel_file, ap);
       }
       break;
     case KERNEL_NO_KERNEL:
Signature · 1 line
1.9.1