on i386, serial configuration, as read from the damned info page, doesn't appear to work: # grub [...] grub> serial --unit=0 --speed=38400 Error 30: invalid argument [actually, no serial xxx command appears to work] And some cause seg fault: grub> terminal serial Segmentation fault
This defect is considered SHOULD-FIX for Fairfax
Raising severity as there appear to be problems with actually using serial console too. I ran these commands when booting with grub, with terminal connected. Setting speed worked fine. 'terminal serial' didn't cause any apparent problems. HOWEVER, on serial there were messages: Press any key to continue. Press any key to continue. If you didn't press any key on the serial console, it would boot using normal console. If you did press a key on the serial console, it would STILL boot using normal console.
If you're running the 'serial --unit=0 --speed=38400' only gives an error when you're running the grub shell from a booted system, you also need to specify a --device=/dev/ttyS0. Will look into the other things...
Segfault should be fixed in the next grub package I build (should be grub-0.90-8). When you were trying to boot with serial console, did you pass the proper options to the kernel to tell it to use the serial console?
Hmm. --device isn't mentioned in the info page at least. Appears like a rather redundant option as you should be able to get the same information based on --unit. No, I didn't pass the options. When doing so, it worked (well, difficult to say whether it worked, as console=primary, serial=secondary kernel console) and both are copied the messages. Other issues: 1) I can't figure how to configure grub from serial, ie. if you need to do 'linux single' or something. Serial only gets active after 'serial' command is run but then it's too late already. 2) if specified 'terminal serial console' or the like, it waits for you to hit any key forever. There should be a timeout and one (e.g. the latter) be chosen if nothing is done. What I'd like to get working is: * every system has secondary serial, primary console * some have primary serial, secondary console * if you plug in a serial cable and run minicom and reboot a computer, you will be able to see "grub" menu, and are able to specify kernel options etc. * most importantly, you should be able to override secondary/primary console settings But this appears to be rather awkward to do with grub, so I guess I might stick to lilo for now...
You should be able to have the serial directive in /boot/grub/grub.conf and have it work (at least, afaict). The timeout should also then still apply. Out of curiosity, what does the lilo.conf you have that works like you want things to work look like?
Like: boot=/dev/md0 map=/boot/map install=/boot/boot.b prompt timeout=50 default=linux serial = 0,38400n8 append = "console=ttyS0,38400 console=tty0" image=/boot/vmlinuz-2.2.19-6.2.1smp label=linux root=/dev/md0 initrd=/boot/initrd-2.2.19-6.2.1smp.img read-only (note: "message" must not be set as it breaks secondary serial console (bugzillaed)). Now you can override console= setting from command-line, either from console or serial.
(Fairfax final) I think you can work around problem 1) by putting 'terminal serial' to grub.conf _before_ any "title" definitions. However, the outstanding issues appear to be: 1) there's no way to timeout "press any key" in "terminal serial console" 2) there is no "append" command, that is, kernel parameters that should affect all kernels (at least I couldn't find it)
From the grub list -- you should be able to make serial be the default without the "Press any key" message by adding '--timeout=0' to the terminal line. And global append lines are directly the opposite of the way grub works; luckily, grubby is careful to preserve all arguments when adding new kernel stanza.
while the following does not show the "press any key" line serial --unit=0 --speed=9600 terminal serial --timeout=10 the default kernel was booted without showing the menu, not really what I expected, is my expectation of seing the grub menu misled? (using grub-0.92-1 from rawhide)
agh, sorry about previous comment. should have checked info page first, order matters. serial --unit=0 --speed=9600 terminal --timeout=10 serial works as expected
I retested this on RHL73. The grub configuration was basically: --8<-- serial --unit=0 --speed=38400 terminal --timeout=5 console serial timeout=10 ... title ... ... kernel /vmlinuz-2.4.18-4 ro root=/dev/hda2 console=ttyS0 38400 console=tty0 --8<-- I noticed the following problems: 1) if you hit enter at 'press any key' from console, the grub boot menu will appear on VGA display, *not* on console. The keys pressed show on grub VGA display. So you'd have to operate blind there.. 2) terminal --timeout=5 serial console (or console serial, and then press enter from console) shows the boot menu in text mode. However, there are a few ANSI control characters in the screen (some glitches?)
I think that things are all getting configured correctly and working properly with the current Milan trees including setting up the grub.conf properly for serial operation if you do a serial install -- at least, it works nicely for me :)
I retested this with limbo2 (grub 0.92) and I can verify that everything seems to be working properly; closing.