Productivity Sync Just another WordPress weblog

December 27, 2009

Linux From Scratch guest under VBox

Filed under: Uncategorized — admin @ 7:04 pm

Network setup:

ls /sys/class/net to see what devices the system thinks you have.
I have eth1 and lo

edit /etc/sysconfig/network-devices/ifconfig.eth1/ipv4 to look like:


Then add your names to /etc/sysconfig/network


and update resolv.conf:

domain lfs
nameserver <–HACK I needed to get it working for my system.
I’m pretty sure I’m doing something wrong to need this, or the NAT from the
VBox doesn’t do dns routing to the host.  This problem should go away once
I change things to DHCP within the LFS guest.

then update hosts file localhost lfs.vbox vbox

after all this running /etc/rc.d/init.d/network restart gave me a working
network with DNS support.

Random LFS notes:

you *really* want to have screen installed and use it (Learn it.  Love it).
you also want to boot with the vga=ask option and with a kernel that support
vesa frame buffers to get something better than a 25×80 text window.

Virtual Box PXE boot with serial console

Filed under: Uncategorized — admin @ 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 unix-listen:vbox_tty,reuseaddr,fork –
socat UNIX-LISTEN:vbox_tty –


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.

Powered by WordPress