(Background: three new infra boxes are EFI, and grub1 doesn't work there, so I'm getting grub2 sorted for infra use). For infra boxes, we already generate the grub1 grub.conf. Our configurations alternate between serial and non-serial on most machines. So every kernel has two entries, a serial one, and a non-serial one. What's the best way of doing this with the new grub2? Also, I can't find what the conversion of the timeout parameter on the terminal command is. I assume we need to have both terminal_input and terminal_output in grub2? From the generated infra grub.conf: serial --unit=1 --port=0x2f8 --speed=115200 terminal --timeout=5 console serial # Options for cfengine: ##root (hd0,0) ##args root=/dev/md2 panic=180 ##serial console=ttyS1,115200n8 console=tty0 title Gentoo Linux (2.6.39-hardened-r8-infra18) (serial) root (hd0,0) kernel /boot/bzImage-2.6.39-hardened-r8-infra18.amd64 root=/dev/md2 panic=180 console=ttyS1,115200n8 console=tty0 title Gentoo Linux (2.6.39-hardened-r8-infra18) (2.6.39-hardened-r8-infra18) root (hd0,0) kernel /boot/bzImage-2.6.39-hardened-r8-infra18.amd64 root=/dev/md2 panic=180 title Gentoo Linux (2.6.39-hardened-r1-infra17) (serial) root (hd0,0) kernel /boot/bzImage-2.6.39-hardened-r1-infra17.amd64 root=/dev/md2 panic=180 console=ttyS1,115200n8 console=tty0 title Gentoo Linux (2.6.39-hardened-r1-infra17) (2.6.39-hardened-r1-infra17) root (hd0,0) kernel /boot/bzImage-2.6.39-hardened-r1-infra17.amd64 root=/dev/md2 panic=180 ...
(In reply to comment #0) > (Background: three new infra boxes are EFI, and grub1 doesn't work there, so > I'm getting grub2 sorted for infra use). > > For infra boxes, we already generate the grub1 grub.conf. > Our configurations alternate between serial and non-serial on most machines. > So every kernel has two entries, a serial one, and a non-serial one. > What's the best way of doing this with the new grub2? If you are using grub-mkconfig, I think you want to modify /etc/grub.d/10_linux to create another entry. That may be as simple as adding a linux_entry call somewhere around line 242. This seems like a bit of a special case, so you may want to just copy the logic from 10_linux into whatever script you are currently using to generate grub.conf. > Also, I can't find what the conversion of the timeout parameter on the > terminal command is. I assume we need to have both terminal_input and > terminal_output in grub2? I'm not sure on this one; I can't find it in the docs. I suggest asking in #grub on Freenode or mailing help-grub@gnu.org.
I think upstream answered your questions in IRC.