Tiny Core Linux
General TC => Tiny Core on Virtual Machines => Topic started by: core on May 13, 2010, 03:39:14 PM
-
Hi,
I'm trying to get an internet connection with Tinycore. I have a computer with ubuntu 10.04 as host connected by a wireless usb adapter. I have Tinycore 2.11 installed in virtualbox ose. I can't seem to get a connection though. I tried lubuntu 10.04 and it could not connect wirelessly. After installing lubuntu in virtualbox, I was able to connect using the ethernet connection through the virtual machine. I was thinking that I might be able to do that with Tinycore as well, and that it would be easier than trying to get the wireless modules working. However, every time I try to connect in the App Browser, I get "Connection error, check network or mirror."
After looking through many threads here, I tried the dmesg command and found these lines:
eth0: registered as PCnet/FAST III 79C973
...
eth0: link up, 100Mbps, full-duplex
Can anyone help? :)
-
The dmesg responses look correct and indicate that the interface is up and active. what are the results of ifconfig?
-
Here's the results of ifconfig. (I had to type it all; I hope it's correct.)
eth0 Link encap:Ethernet HWaddr 08:00:27:60:C6:7A
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1180 (1.1 KiB) TX bytes:1180 (1.1 KiB)
Interrupt:10 Base address:0xd0d0
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 KiB) TX bytes:0 (0.0 KiB)
-
ifconfig output looks good as well. have you tried pinging the gateway or other boxes on the network or internet?
-
I looked at the network tool in the "panel" and it has no IP, Broadcast, or Gateway addresses filled in. I tried pinging www.google.com and it failed. I tried pinging the wireless router (the connection underneath the virtual machine) and it appeared to work (20 packets - 4% loss) though it just kept giving results. I had to kill it with ^C. (Is that normal? I don't have to stop the ping command on Windows XP.)
-
@core: Don't forget that your TC system is in a VM and that your host system (and / or your router) will probably have a firewall running. It probably depends on the firewall rules what you can do from "inside" the VM.
In my case (using VBox on a XP host system) I have no problem to ping my host (i.e. ping 10.0.2.2), my router, and even 'google.com'. But when using QEMU I can't ping the router or 'google.com'. I put that down to some firewall setting somewhere but can't be bothered to look into this since that is without significance for the "real" traffic (e.g. using 'http').
So in your case we can see that your (emulated) network card was found, has received an IP address (proven by inet addr:10.0.2.15) and has had even some traffic going in and out (proven by RX bytes:1180 (1.1 KiB) TX bytes:1180 (1.1 KiB)). So what you could do next is something like wget http://goggle.com and report back if that results in an error.
BTW in *NIX the 'ping' runs forever (or you could limit it with the '-c' option) whilst in windows it's default is to use 4 attempts (or you could use the '-t' option to let it run forever).
-
I'm getting these error messages:
wget http://www.google.com
wget: bad address 'www.google.com'
wget http://google.com
wget: bad address 'google.com'
wget http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/tinycore_2.11.iso.md5.txt
wget: bad address 'distro.ibiblio.org'
I've not used wget before, so maybe I didn't do something right?
[edit]
It appears to be a dns issue because I can ping http://74.125.47.99/ (www.google.com)
-
You need to have the nameservers in /etc/resolv.conf
nameserver 8.8.8.8
-
I checked /etc/resolv.conf and it has 192.168.1.254. My host ubuntu install has the same address in its /etc/resolv.conf file. Do I really need to change it to 8.8.8.8 if it's already the same as the host operating system?
[edit]
I tried the 8.8.8.8 and I was able to populate the App Browser. :) Can anyone explain why I needed a different nameserver than the host?
-
That is clearly a DNS issue, you could do a nslookup google.com in your VM and in your host. I imagine there will be a difference, even though the '/etc/resolve.conf' appears to be identical. Changing you VM's '/etc/resolve.conf' looks like a good idea to me.
Edit: I can't offer an explanation since my VBox VM works fine with the same DNS server as my host (both are using my router). I guess your router (which I assume is meant with 192.168.1.254) does not "like" your VM. You could still change the DNS server back to your router and do the "nslookup test".
-
192.168.1.254 is not my router's address; I thought it was the nameserver's address? Are you saying I should change /etc/resolv.conf to my routers address? I don't understand. ???
-
/etc/resolv.conf needs to point to your router or and public dns server (ie: google's 8.8.8.8) unless you are running another dns server on your network.
-
Well, kingdomecome does assume in his last comment (and so did I) that your router is also running a DNS service for all attached systems.
That is pretty much the default for all routers I have come accross. The IP address is slightly suspicious as it ends with '.254' instead of '.1' (what most routers do). Nevertheless it is entirely possible that your router (let's assume for a moment that it's '192.168.1.1') has also a DNS server running (on '192.168.1.254'). At the DHCP request of your host (which I assume your router responds to) it also receives back the DNS server information. This information would most likely be used by Vbox to respond to the DHCP request of the guest (your TC system in this case).
Anyway, you seemed to have resolved your immediate issue, so have some fun with TC.
-
Actually, the router is 192.168.2.1. Anyway, I have internet access now. :) Thanks for the help Kingdomcome, gerald_clark, maro, and anyone else if I missed someone.
[edit]
I decided to start a new thread for the persistence issue instead of trying to squeeze it in here.
-
Well, you have multiple options and they all kind off reflect what you'd do in the "non-VM" case:
(1) You could create a (virtual) hard disk (i.e. an image file on your host) and use this for persistence. In this case you'd still use your ISO to boot from (which contains the boot loader, kernel and the initrd). Then you've got the choice to use backup/restore or persistent "home" and "opt" (in addition to your extension storage) to enable your setup to "survive" the next re-boot.
(2) Or you could create a (virtual) hard disk and follow the installation (http://tinycorelinux.com/install.html) instructions. In this case you won't need to keep the ISO around for the boot process.
You could even simulate a USB pen drive, but this might be a bit too much for you to set up and is more or less a variation of above. Please have a careful read of the FAQ, and the Wiki. I'm pretty sure that most (if not all) the questions you might have right now have already been answered in this forum. So use the search function and don't forget to ask questions the smart way (http://catb.org/~esr/faqs/smart-questions.html).
-
I already started a new thread (for easier searching). I guess if you're going to answer here then I should delete the other thread (if I can...).
Thanks for your suggestions. I'm not sure how to create a virtual hard disk. I'll see if I can figure out how to create one (assuming it's different from the .vdi file that virtual box creates?)
-
I wonder what leads you to your assumptions. Maybe a bit more reading around would have shown you that each VM (like VMware, VBox or QEMU) has a different (default) format for the (virtual) disks. All of them have the same purpose: to emulate a "real" hard disk of a computer.
The (default) VBox disks are those .vdi files, but VBox can also handle .vmdk files straight away. Furthermore there are tools available that can convert pretty much any of these formats into any other one. But that would only be required if you move from VM to another one and have a good reason for a conversion.
For example I'm also using a Ubuntu VM (under Vbox) that uses a variant of a .vmdk file to utilize a raw image file created by WUBI which is usually loop-mounted when booted directly. But I consider this a bit more advanced stuff, so don't worry if you did not quite get my setup.
Furthermore there is not much what can go wrong when installing in a VM. You won't screw up your host system. That's the whole point of a VM (at least in my view). It allows you to experiment wildly and if you've stuffed it up you go back and try a different way. All this without risking your host.
-
I'm fairly new to linux, and have never tried a virtual machine before. I did see that there were different formats for the different brands of VMs. For some reason I was confusing virtual hard drives with logical partitions. (It was late, and I was tired.)
Anyway, I have persistence working now; Thanks for being patient. :)