I am trying to boot from a usb-hdd, which is supposed later to pass control to a full-fledged Ubuntu 18 installation, on a different HDD.
The usb-hdd has only the following directories and files:
- grub2 and its directory tree (including grub.cfg)
- the linux kernel (vmlinuz)
- initrd.
Grub is supposed to transfer control to the full-fledged system, using the command:
linux /boot/vmlinuz-5.0.0-37-generic root=UUID=23ac2c37-... ...-be3a8f82fdc1 ro
During the boot process, I am encountering all kinds of error messages, but they are printed on the console, and some of them disappear; also, sometimes it is necessary to turn the computer off manually; then dmesg and all buffers are gone (since there is no /var/log directory on the usb-hdd, and the full-fledged Ubuntu on a separate HDD has not been mounted yet).
Is there a grub.cfg command, (or a linux kernel parameter), to redirect the boot messages to a file? (or, even better, to "tee" them to a file?)
netconsole
to send boot messages via UDP over the network, and process them on a second machine in any way you like.