piranna at gmail.com
2017-Jan-03 14:00 UTC
[syslinux] How to show boot prompt and edit kernel cmdline from serial?
For testing purposses, I'm trying to hook on QEmu an ISO image that start automatically with syslinux (just a DEFAULT label and no TIMEOUT option) and change the kernel arguments to redirect the console to a serial port instead of the screen. So far I've seen that the SERIAL statement give me a welcome message and the loading of the kernel and initramfs on the serial port (but curiously, not the "Loading NodeOS" message that I put, just directly the kernel string...), but the system start automatically. I've read in the docs that the boot prompt can be forced to be shown if the caps_lock or the scroll_lock keys are set, but QEmu doen't offer a way to have them enabled at boot time and by using the monitor seems to be too complicated (and since syslinux is booting automatically, too much time constrained too). So I ask: is there a way to force to show the boot prompt on the serial port on demand? Maybe a magic characters sequence I send over the serial port itself after I receive the syslinux welcome message? -- "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." ? Linus Tordvals, creador del sistema operativo Linux
Ady Ady
2017-Jan-03 18:01 UTC
[syslinux] How to show boot prompt and edit kernel cmdline from serial?
> For testing purposses, I'm trying to hook on QEmu an ISO image that > start automatically with syslinux (just a DEFAULT label and no TIMEOUT > option) and change the kernel arguments to redirect the console to a > serial port instead of the screen. > > So far I've seen that the SERIAL statement give me a welcome message > and the loading of the kernel and initramfs on the serial port (but > curiously, not the "Loading NodeOS" message that I put, just directly > the kernel string...), but the system start automatically. I've read > in the docs that the boot prompt can be forced to be shown if the > caps_lock or the scroll_lock keys are set, but QEmu doen't offer a way > to have them enabled at boot time and by using the monitor seems to be > too complicated (and since syslinux is booting automatically, too much > time constrained too). So I ask: is there a way to force to show the > boot prompt on the serial port on demand? Maybe a magic characters > sequence I send over the serial port itself after I receive the > syslinux welcome message? > > > --What's wrong with using "PROMPT 1" in your syslinux.cfg? Generally speaking, posting the entire cfg might help. Regards, Ady.
piranna at gmail.com
2017-Jan-03 21:05 UTC
[syslinux] How to show boot prompt and edit kernel cmdline from serial?
> What's wrong with using "PROMPT 1" in your syslinux.cfg?Nothing at all, in fact the solution I'm using is it combined with TIMEOUT 1, and it works :-) It's not fully nice on regular usage to have a useless "boot: " prompt for just one 1/10 seconds, but at least it gives my test environment an opportunity to hook there, write "NodeOS console=ttyS0" and start doing the boot on the terminal instead of doing the regular boot on the QEmu window :-)> Generally speaking, posting the entire cfg might help.Just for the record, my (somewhat hacky) working syslinux.cfg file is: SERIAL 0 PROMPT 1 TIMEOUT 1 DEFAULT NodeOS LABEL NodeOS SAY Booting NodeOS... LINUX bzImage INITRD initram.gz APPEND vga=0x318 ip=dhcp root=$USERSFS It's really a template, the $USERSFS string is changed for the actual UUID of the partition after it's being generated. -- "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." ? Linus Tordvals, creador del sistema operativo Linux