Grub2 setup question
Jamon Camisso
jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Fri Nov 20 15:30:49 UTC 2009
Madison Kelly wrote:
> Thanks Jamon,
>
> I am trying to avoid directly editing files unless that is what I am
> supposed to do. The reason being that when a new kernel is released now,
> the grub tools rerun and regenerate the boot.cfg file. I see that there
> is now an '/etc/grub.d/' directory that I think I am supposed to work with.
>
> After sending the email, I came across a doc that said to run
> 'update-grub2'. When I do this with the CentOS drive connected, it shows
> it but when I reboot, the entry isn't in grub:
<snip>
> ### BEGIN /etc/grub.d/40_custom ###
> # This file provides an easy way to add custom menu entries. Simply
> type the
> # menu entries you want to add after this comment. Be careful not to
> change
> # the 'exec tail' line above.
> ### END /etc/grub.d/40_custom ###
> ----------------------------------------------
>
> If I am to add your suggestion directly, where would be safest?
Ah I understand. The Debian (or Grub, I'm not sure) packagers were
rather prescient and created /etc/grub.d/40_custom for just that
purpose. Take a look:
jamon at phaedrus: cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply
# type the menu entries you want to add after this comment. Be
# careful not to change the 'exec tail' line above.
So try putting your suitable edited Centos menuentry in there:
menuentry "Centos 5.3" {
insmod ext2
set root=(hd1,3)
linux /boot/vmlinuz-foo root=/dev/sdb3
initrd /boot/initrd-foo.img
}
Jamon
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list