Productivity Sync

December 27, 2009

Virtual Box PXE boot with serial console

Filed under: Uncategorized — markgross @ 6:47 pm

Some notes on working with VBox as a PXE test target for booting test linux kernels….

(BTW linux-next-20091224 fails to boot for me)

Step 1:

get tftp-hpa installed.  (you don’t need the daemon.  just the program)

Step 2:

set up the pxe directory root.
mkdir $HOME/.VirtualBox/TFTP
mkdir $HOME/.VirtualBox/TFTP/pxelinux.cfg

Step 3:

Copy pxelinux.0 to $HOME/.VirtualBox/TFTP
make symbolic link to pxelinux.0 named <guest-vmname>.pxe.
i.e. ln -s pxelinux.0 LFS.pxe

step 4:

copy kernel and perhaps initrd to $HOME/.VirtualBox/TFTP
cp /boot/*2.6.32* .

step 5:

edit $HOME/.VirtualBox/TFTP/pxelinux.cfg/default
mine looks like:
LABEL linux
KERNEL vmlinuz-2.6.32
#APPEND root=/dev/sda2
APPEND root=/dev/sda2  console=ttyS0,115200n8 vga=343
#APPEND initrd=initrd.img-2.6.32 root=/dev/sda2 console=ttyS0,115200n8

Notes on getting a serial output from Virtual box guest and host over named pipe:

from the VirtualBox GUI for guest settings select Serial Ports:

enable com1, with port mode Host Pipe.
enable create pipe
set pathname for pipe.
e.g. /home/mgross/vbox_tty

connecting to this pipe:

socat:

socat unix-listen:vbox_tty,reuseaddr,fork -
socat UNIX-LISTEN:vbox_tty -
see: http://www.reactos.org/wiki/VirtualBox

http://blino.org/blog/mandriva/virtualbox-pipe.html

minicom:

for minicom change the serial device to be the pipe using the unix# syntax.
A -    Serial Device      : unix#/home/mgross/vbox_tty
This worked for me.
i.e. run minicom -s and then Serial port setup menu option and put unix#pipe_path

I didn’t like the behavior of socat and it actually is one of the complicated
programs to use with 2 zillion options.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress