File lilo.x86.mount_by_persistent_name.patch of Package lilo

Do not pass root=major:minor to the initrd
---
 bsect.c |   41 ++++++++++++++---------------------------
 1 file changed, 14 insertions(+), 27 deletions(-)

--- a/bsect.c
+++ b/bsect.c
@@ -943,18 +943,6 @@ printf("MAX_IMAGES = %d\n", MAX_IMAGES);
 }
 
 
-static int dev_number(char *dev)
-{
-    struct stat st;
-
-    if (stat(dev,&st) >= 0) return st.st_rdev;
-    if (!isdigit(*dev)) die("Illegal 'root=' specification: %s", dev);
-    if (verbose >= 1) 
-	printf("Warning: cannot 'stat' device \"%s\"; trying numerical conversion\n", dev);
-    return to_number(dev);
-}
-
-
 static int get_image(char *name,char *label,IMAGE_DESCR *descr)
 {
     char *here,*deflt;
@@ -1040,7 +1028,6 @@ static char options[SECTOR_SIZE]; /* thi
 
 static void bsect_common(IMAGE_DESCR *descr, int image)
 {
-    struct stat st;
     char *here,*root,*ram_disk,*vga,*password;
     char *literal,*append,*fback;
     char fallback_buf[SECTOR_SIZE];
@@ -1063,20 +1050,20 @@ if (image) { /* long section specific to
       "read-write")) strcat(options,"rw ");
     if ((root = cfg_get_strg(cf_kernel,"root")) || (root = cfg_get_strg(
       cf_options,"root")))  {
-	if (!strcasecmp(root,"current")) {
-	    if (stat("/",&st) < 0) pdie("stat /");
-	    sprintf(strchr(options,0),"root=%x ",(unsigned int) st.st_dev);
-	}
-	else if (strlen(root)>6 && !strncmp(root,"LABEL=",6)) {
-	    sprintf(strchr(options,0),"root=%s ", root);
-	}
-        else if (strlen(root)>5 && !strncmp(root,"UUID=",5)) {
-            sprintf(strchr(options,0),"root=%s ", root);
-        }
-	else {
-	    sprintf(strchr(options,0),"root=%x ",dev_number(root));
-	}
-      }	
+	/* root= is a property of either:
+	* prepare_namespace()
+	* or /init in initramfs
+	* or /linuxrc in a loopmounted initrd
+	* Its not a property of the bootloader or anything else
+	* related to loading the kernel/initrd into memory (or configuring
+	* that event)
+	*
+	* Pass root= via /proc/cmdline as configured in the config file
+	* If no root= is configured, initrd has a hardcoded value
+	* based on the '/' entry in /etc/fstab
+	*/
+	sprintf(strchr(options,0),"root=%s ", root);
+      }
     if ((ram_disk = cfg_get_strg(cf_kernel,"ramdisk")) || (ram_disk =
       cfg_get_strg(cf_options,"ramdisk")))
 	sprintf(strchr(options,0),"ramdisk=%d ",to_number(ram_disk));