Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • parse a line for a particular value (specifically crashkernel)

    Posted on

    We are reviewing our environment and best-practices. One of the items of consideration is crashkernel. I am trying to figure out how to parse grub.conf to determine what the crashkernel is set to at boot time via grub (I'm not interested in what /proc/cmdline has at that time).

    Consider the following 2 scenarios:
    # grep crash /boot/grub/grub.conf
    kernel /vmlinuz-2.6.18-348.12.1.el5 ro root=/dev/VolGroup00/LogVol01 quiet crashkernel=auto

    # grep crash /boot/grub/grub.conf
    kernel /vmlinuz-2.6.18-348.4.1.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet crashkernel=128M@16M

    I would like to return either
    crashkernel=auto or crashkernel=128M@16M
    or.. better yet
    auto or 128M@16M

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat