Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was following http://fedoraproject.org/wiki/How_to_use_kdump_to_debug_kernel_crashes and in step 2 I need to add the line to grub.cfg, but grub.cfg is a shell I do not know how to edit it, most available resources tell you only the method to rearrange menu items, can anyone tell me what should be added to the file. I use 64-bit Fedora 18.

share|improve this question
up vote 1 down vote accepted

The kernel line in grub should looks like:

kernel /vmlinuz-3.1.4-1.fc16.x86_64 ro root=/dev/VolGroup00/LogVol00 rhgb LANG=en_US.UTF-8 crashkernel=128M

There's a note in the instructions:

(...) An example command line might look like this (for grub2, "kernel" is replaced by "linux"):

So, the one you are looking for is how to replace the kernel boot parameters. This is easily achievable modifying the GRUB_CMDLINE_LINUX_DEFAULT in the /etc/default/grub file. Then running su -c 'grub2-mkconfig -o /boot/grub2/grub.cfg' to update the script.

  1. Open with an editor /etc/default/grub
  2. Look for the GRUB_CMDLINE_LINUX_DEFAULT, add it if it's not present.
  3. Append the crashkernel=128M to the line, like this:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet crashkernel=128M"
  4. Save the file.

  5. Run su -c 'grub2-mkconfig -o /boot/grub2/grub.cfg'
  6. Check the grub.cfg file, that contains the lines correctly:

    grep -i quiet /boot/grub/grub.cfg
        linux   /vmlinuz-3.12-1-amd64 root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet crashkernel=128M
        linux   /vmlinuz-3.12-1-amd64 root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet crashkernel=128M
  7. Restart and done.

share|improve this answer

If you mean this:

Next, edit /boot/grub/grub.conf or /boot/grub2/grub.cfg and add the "crashkernel=128M" command line option.

it means just add that to the end of the line in a menuentry { ... } block that begins with "linux" -- the first such block is usually the default, but whichever one you want, as long as you can remember at boot. Or all of them, if you want. They will all have (only) one such line.

Grub2 was supposed to eventually have some kind of CLI tool or console app you could use to configure stuff, which never materialized AFAIK. It's managed with some kind of sourcing and templating system, which most users can't be bothered with, so now they have yet another config file which says "do not edit" that everybody hack edits. Oh well. As long as it works...

share|improve this answer
With the upstream Grub2, and on Debian and derivatives, grub.cfg is generated by a script, and you must put custom additions in a file in /etc/grub.d. Does Fedora do things differently? – Gilles Feb 26 '13 at 23:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.