Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
lilo
lilo.x86.mount_by_persistent_name.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lilo.x86.mount_by_persistent_name.patch of Package lilo
Do not pass root=major:minor to the initrd --- bsect.c | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff -urp a/src/bsect.c b/src/bsect.c --- a/src/bsect.c 2010-11-01 17:22:29.000000000 +0100 +++ b/src/bsect.c 2011-09-23 08:22:56.017387013 +0200 @@ -947,18 +947,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,*tmp; @@ -1062,7 +1050,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]; @@ -1085,22 +1072,19 @@ 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)>12 && !strncmp(root,"/dev/mapper/",12)) { - sprintf(strchr(options,0),"root=%s ", root); - } - 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")))
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor