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:
ONBOOT=yes
SERVICE=ipv4-static
IP=10.0.2.15
GATEWAY=10.0.2.2
PREFIX=24
BROADCAST=10.0.2.255
Then add your names to /etc/sysconfig/network
HOSTNAME=lfs
and update resolv.conf:
domain lfs
nameserver 10.0.2.2
nameserver 192.168.140.1 <–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
127.0.0.1 localhost
10.0.2.15 lfs.vbox
10.0.2.2 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.