Gentoo networking issues
I've setup the Virtual Gentoo 2006.1 LivePC and have blogged about it. As you can see, I've got a few outstanding issues that I'd like to get help solving:
- This VM is not using X11, it is a console application. How can I get rid of the "Moka 5" logo and change the background color? With a 'real' Gentoo installation I would edit /boot/grub/grub.lst, but I don't know where to find this file with VmWare/moka5, and there doesn't seem to be an entry in /etc/fstab that defines /boot
- I'd like to use a fixed IP address (192.168.2.106) so I can ssh to the VM. I use no-ip.com's dynamic DNS to point to my home router, and then I want the router to direct to the VM as a DMZ host. If I set up a fixed IP address I lose access to My Shared LivePC Documents. Seems there is a secret to configuring NAT Ethernet with VmWare Player. Would upgrading to VmWare Workstation or Server help, or cause new problems?
Any help would be appreciated!
Mike
network mounted user files
If you expand the area below your livepc in the main engine dialog, you will see a button for LivePC local documents. This folder on a host or usb stick is shared with the guest with SMB style sharing so that you can have a folder which is visible in both the host and guest. A NATed virtual ethernet connection allows this share to be specifically restricted to viewing by the guest. In the original profile in /home/me, you'll see some references to vmcmd that get the SMB sharing parameters for the guest to use. If you aren't using this feature any more than you probably dont care about the message and you would be free to check the configuration option that indicates you dont want network mounted user files. I think that will make the error go away.
changing the splash screen
LILO is the boot loader for virtual gentoo. Check /etc/lilo.conf for the line that tells it to use gensplash. You can remove the splash screen by taking out the text splash=verbose,moka from the append line. You'll have to re run /sbin/lilo to install your changes. If lilo isnt installed just emerge it. you can disable the splash manager from running once the system starts by typing 'rc-update del bootsplash' (all obviously as root). best, -tj
Removing the background
The proper command seems to be:
sudo rc-update del splash
('splash', not 'bootsplash'.) I have a nice black background on the console screen now.
Thank you for your help!
Mike
NAT didn't do the job, using bridged networking
I couldn't get multihoming to work properly unless I used bridged networking.
grep says there are no references to vmcmd in any file in the VM. What am I missing?
Mike
example code to mount user files
Here is some example code to mount user files
mkdir -p "/home/me/LivePC local documents"
chown me:me "/home/me/LivePC local documents"
SHARE=`vmcmd 'info-get guestinfo.userprofile.sharename' | tr '\\' /`
USER=`vmcmd 'info-get guestinfo.userprofile.username'`
PASSWD=`vmcmd 'info-get guestinfo.userprofile.password'`
export PASSWD
smbmount "$SHARE" "/home/me/LivePC local documents" -o "rw,uid=me,username=$USER,port=445"
Problems mounting user files
I made a bash script called share from the commands you provided. Here is what I get when I run it:
$ bash -xv share
#!/bin/bash
SHARE_DIR="$HOME/LivePC local documents"
+ SHARE_DIR='/home/mslinn/LivePC local documents'
mkdir -p "$SHARE_DIR"
+ mkdir -p '/home/mslinn/LivePC local documents'
sudo chown $USER:$USER "$SHARE_DIR"
+ sudo chown mslinn:mslinn '/home/mslinn/LivePC local documents'
SHARE=`vmcmd 'info-get guestinfo.userprofile.sharename' | tr '\\' /`
vmcmd 'info-get guestinfo.userprofile.sharename' | tr '\' /
++ vmcmd 'info-get guestinfo.userprofile.sharename'
++ tr '\' /
+ SHARE='//192.168.116.2/T7TU2NM16TN$'
USER=`vmcmd 'info-get guestinfo.userprofile.username'`
vmcmd 'info-get guestinfo.userprofile.username'
++ vmcmd 'info-get guestinfo.userprofile.username'
+ USER=moka55UZ81
PASSWD=`vmcmd 'info-get guestinfo.userprofile.password'`
vmcmd 'info-get guestinfo.userprofile.password'
++ vmcmd 'info-get guestinfo.userprofile.password'
+ PASSWD='Vw9-VqIg2'\'''
export PASSWD
+ export PASSWD
smbmount "$SHARE" "$SHARE_DIR" -o "rw,uid=me,username=$USER,port=445"
+ smbmount '//192.168.116.2/T7TU2NM16TN$' '/home/mslinn/LivePC local documents' -o rw,uid=me,username=moka55UZ81,port=445
WARNING: The "printer admin" option is deprecated
Error connecting to 192.168.116.2 (No route to host)
7627: Connection to 192.168.116.2 failed
SMB connection failed
I get the same result if I run the script as user 'me'.
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:D7:A7:F7
inet addr:192.168.116.128 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42933 errors:0 dropped:0 overruns:0 frame:0
TX packets:20390 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3813181 (3.6 Mb) TX bytes:2593434 (2.4 Mb)
Interrupt:17 Base address:0x10a4
eth0:1 Link encap:Ethernet HWaddr 00:0C:29:D7:A7:F7
inet addr:192.168.2.106 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42938 errors:0 dropped:0 overruns:0 frame:0
TX packets:20399 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3813481 (3.6 Mb) TX bytes:2594804 (2.4 Mb)
Interrupt:17 Base address:0x10a4
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:704 (704.0 b) TX bytes:704 (704.0 b)
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.116.0 * 255.255.255.0 U 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
$ cat /etc/conf.d/net
modules=( "ifconfig" )
config_eth0=( "192.168.{116.128,2.106}/24 brd 192.168.2.255" )
routes_eth0=( "default via 192.168.2.1" )
okie...try having two network interface
Shutdown your LivePC
Go to the LivePC configuration page.
Make sure Enable network mounted userfiles is checked
Set the network in the drop down dialog to use NAT
Choose the option show generated VMX
Add something like this to the text box:
ethernet1.addresstype = "generated"
ethernet1.connectiontype = "bridged"
ethernet1.generatedAddress = "00:0c:29:cd:2e:f5"
ethernet1.generatedAddressOffset = "0"
Make sure your generated address is different for the two interfaces. In gentoo, you will have to:
cp /etc/init.d/net.eth0 /etc/init.d/net.eth1
rc-update add net.eth1 default
/etc/init.d/net.eth1 start
First line creates the init script for the network
Second line adds the network to the default boot up
The last line is to enable the second interface right now
Set your network config for the interfaces to dhcp for eth0, and specify your static address for eth1.
Our software won't export user files to a bridged connection because that would require opening up a windows share to the real network.
Let me know how it works. Happy Thanksgiving,
-tj
Worked around the network problem
I worked around the IP address problem by dual-homing (see my blog for details.) Now I get a message whenever I try to edit and save a change to the configuration (even a null change.) The message says "Network mounted user files require Ethernet NAT connection type". What is that about?
Mike