[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#281658: initrd-tools: "cat: getroot: No such file or directory" due to /etc/raidtab parse error



Martin Michlmayr wrote:

While this patch would fix it for Kalle, I don't think it's a general
solution.  I haven't tested it, but from Kalle's conf file I assume
that you can put everything one one line, i.e it's not always the 3rd
argument.  You should therefore look for something like
/raid-disk\s+(\d)/ (in perl reg ex notation).


Attached is a (hopefully) better patch. I tried several (== 4)
test cases I could find for both one line per argument and
everything on one line. The result was always the same. But
something like

raiddev
    /dev/md0
    raid-level
    1
    nr-raid-disks
    2
    nr-spare-disks
    0
    persistent-superblock
    1
    device
    /dev/hde3
    raid-disk
    0
    device
    /dev/hdg3
    raid-disk
    1

does _not_ work. Hope thats OK?

And I am not sure whether I found all special cases. There
is still some risk in this patch.


Regards

Harri

Attachment: mkinitrd.patch3.gz
Description: Unix tar archive

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: