Thank you geninitrd for screwing my evening

Patryk Zawadzki patrys at pld-linux.org
Tue May 15 22:33:53 CEST 2007


Dear PLD devs,

Please stop changing geninitrd to your liking without performing
sanity checks FIRST.

To your notice:

- geninitrd generates initromfs images by default (why isbeyond my
imagination, I can only think about bootsplash bling bling here)

- initromfs uses the following magic to determine the device
(copy-pasted for your entertainment):

BEGIN {
    num_pattern_short = "[0-9][0-9][0-9]";
    num_pattern = "[0-9]" num_pattern_short;
    dev_pattern = "[hms][a-z][a-z]([0-9])+";
    partition = "no_partition_found";
    min = -1; maj = -1;

    gsub(/.*root=/,NIL,c);
    gsub(/ .*/,NIL,c);

    sub("^0x", "", c);
    if (c ~ "^" num_pattern_short "$") sub("^", "0", c);
    if (c ~ "^" num_pattern  "$") {
        maj = sprintf("%d",substr(c,1,2));
        min = sprintf("%d",substr(c,3));
    }
    if (c ~ "^\/dev\/" dev_pattern "$") sub("^/dev/","", c);
    if (c ~ "^" dev_pattern "$") partition = c;
}

- /dev/vgsys/* does not seem to match any of these clever rules, but
lo and behold as we have an alternative way...

- root=fe00 does not match any of these either, what a clever
coincidence as THE FUCKING LVM2 DEVICE HAPPENS TO BE (major, minor)
exactly 254, 0

- either return to romfs my default or provide us with a barrel of
beer for debugging your mistakes

-- 
Patryk Zawadzki
Generated Content


More information about the pld-devel-en mailing list