Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: bitsnbytes on April 28, 2011, 03:09:40 PM
-
I booted off a live cd and installed to hard drive using the instructions here (http://distro.ibiblio.org/tinycorelinux/install.html). The install went through perfect and I'm able to boot via hard disc now. I also added the boot option to menu.lst to change the hostname from the default 'box'
kernel /boot/bzImage quiet host=tinycorepc
However, I cannot ping from an external system using the hostname but I can ping using the ip address :(
If I ping on the tinycore system itself it gives me the output below
ping tinycorepc
PING tinycorepc (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.074ms
The resolved ip is different to the one assigned by the dhcp server (192.168.1.32 and I ping using this ip). What do I change so I can ping via hostname, I'm sure it must be something simple, but I'm not so proficient in linux :(
-
That's completely normal behavior? Windows pc's can scan each other, and some combined dns/dhcp servers add the hostname to dns, but most don't.
-
You need a local name server and a dhcp server that updates it.
Your other option is to put all machines in the hosts file on each machine.
-
ping tinycorepc
PING tinycorepc (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.074ms
That's ping'ing a local loopback ;)
-
So does it mean that this is not possible? ???
-
Read reply #2.
-
You need a local name server and a dhcp server that updates it.
I think the router is definitely capable of it since I can ping my local NAS server (netgear readynas which is unix) using the hostname.
Your other option is to put all machines in the hosts file on each machine.
Do you mean on the windows pc trying to ping the tinycorepc? That would be a pain since I have quite a few windows pcs :( and besides if it does work for my nas then why not for tinycore :(
-
Your nameserver needs to know the name and IP of your tinycore.
-
resolv.conf reports
search lan
nameserver 192.168.1.254
192.168.1.254 is the default gateway. Is there anyway to find out the nameserver ip address? Is this different to the dhcp server?
What confuses me is that in my nas I just set the host name and it worked fine after a reboot, didn't have to do anything special to the windows pc. Is there anything I can check on the nas (to replicate settings)?
-
resolv.conf shows nameserver aquired by dhcp.
-
It's getting all too confusing, best left alone I guess :(
-
Without DNS, the only way for Windows computers to find your tinycore box is to install and run nmbd and smbd (which requires Samba3.tcz).
Add (or change) the following stanzas under [global] in /usr/local/etc/samba/smb.conf:
workgroup = YourWorkgroupName
netbiosname = tinycorepc
hosts allow = 192.168.1. 192.168.2. 127. {remove the ";"}
Then run testparm and fix any errors.
Then run sudo /usr/local/etc/init.d/samba start
Your tinycore pc should now show up as part of the network on the Windows machines.
-
I'd have thought you would need local name resolution running to be able to ping by hostname from a windows (or a linux) box?
-
Yep, on a local peer-peer network you can use NetBios over TCP/IP for name resolution to avoid editing the hosts file on every machine as suggested in reply #2 (which is a royal PITA to maintain).
-
Why not just run dnsmasq?
-
I'm not at home at the moment to double-check, but I enabled netbios over tcp on the windows machines on the network - they might be able to ping each other, but they cannot ping the linux (tc) machine running samba by hostname and it cannot ping them..
-
Why not just run dnsmasq?
I've always wondered how to set it up to resolve local hostnames and nothing else (i.e. let the router do everything else)?
I used to have a hacked router that used dnsmasq to resolve local hostnames, but I never found out how it was configured.