[9fans] first questions from a lurker
Hello All. I've been a lurker on 9fans for many years. Today I finally did an install - +9atom.iso.bz2 into a virtual box VM. The VM is NAT'ed to a corporate network and I can ping by IP address with no problem. First questions. 0. How to see my IP address? Cat a file in /net/... somewhere? 1. How to change the hostname - just edit /rc/bin/termrc and choose whatever I want to echo into /dev/sysname? Will that get reflected back out to the corporate net via DHCP? 2. How to use DHCP to get to the corporate DNS servers? (This worked pretty much OOTB on the labs dist, but I think that 9atom will be the better match for the work we want to do.) Right now all hostname lookups (via ping) fail. Unrelated: 3. I would like to generate a PDF (or even .PS file) of Volume 1 of the manual. What's in the dist has dates from over 10 years ago. I tried running 'mk print.out' in the manual directory (as glenda) but got an error. (Erik - can you do that automatically as part of your build process? :-) So. How can I produce such a file suitable for duplex printing? (Bonus points if the intro(N) page of each section comes out first. :-) Please go easy on the Plan 9 newbie who has to unlearn 30+ years of Unix habits. Thanks! Arnold
Re: [9fans] first questions from a lurker
And of course, I forgot another question: 4. How to do the moral equivalent of shutdown -h now? Thanks, Arnold - arn...@skeeve.com wrote: > Hello All. > > I've been a lurker on 9fans for many years. Today I finally did an > install - +9atom.iso.bz2 into a virtual box VM. The VM is NAT'ed > to a corporate network and I can ping by IP address with no problem. > > First questions. > > 0. How to see my IP address? Cat a file in /net/... somewhere? > > 1. How to change the hostname - just edit /rc/bin/termrc and choose >whatever I want to echo into /dev/sysname? Will that get reflected >back out to the corporate net via DHCP? > > 2. How to use DHCP to get to the corporate DNS servers? (This worked >pretty much OOTB on the labs dist, but I think that 9atom will be >the better match for the work we want to do.) Right now all >hostname lookups (via ping) fail. > > Unrelated: > > 3. I would like to generate a PDF (or even .PS file) of Volume 1 of the > manual. What's in the dist has dates from over 10 years ago. I tried > running 'mk print.out' in the manual directory (as glenda) but got > an error. (Erik - can you do that automatically as part of your build > process? :-) So. How can I produce such a file suitable for duplex > printing? (Bonus points if the intro(N) page of each section comes > out first. :-) > > Please go easy on the Plan 9 newbie who has to unlearn 30+ years > of Unix habits. > > Thanks! > > Arnold
Re: [9fans] first questions from a lurker
On Mon, Mar 10, 2014 at 2:41 PM, wrote: > First questions. I'm new too but I'll have a go, then someone will correct me! > > 0. How to see my IP address? Cat a file in /net/... somewhere? cat /net/ndb > > 1. How to change the hostname - just edit /rc/bin/termrc and choose >whatever I want to echo into /dev/sysname? Will that get reflected >back out to the corporate net via DHCP? I'd edit plan9.ini - you'll need to mount the 9fat partition (either 9fat or 9fs 9fat(?)) then edit /n/9fs/plan9.ini > > 2. How to use DHCP to get to the corporate DNS servers? (This worked >pretty much OOTB on the labs dist, but I think that 9atom will be >the better match for the work we want to do.) Right now all >hostname lookups (via ping) fail. If you edit /rc/bin/termrc and uncomment the lines about ip/ipconfig then reboot it should come up networked, then try ndb/dnsquery to test your connectivity Bonus answer: to shutdown I'd do fshalt wait a bit, then close the VM Pete
Re: [9fans] first questions from a lurker
On 10 March 2014 14:41, wrote: > 0. How to see my IP address? Cat a file in /net/... somewhere? cat /net/ipselftab shows all local IP addresses configured in the IP stack #I0. (In Plan 9, you can have more than one independent IP stack: #I0, #I1, ... .)
Re: [9fans] first questions from a lurker
Welcome to the party. On Mar 10, 2014, at 10:41 , arn...@skeeve.com wrote: > 0. How to see my IP address? Cat a file in /net/... somewhere? As Charles said, 'cat /net/ipselftab'. You most likely want the lines with 'u' in the flags filed (third column), which will most likely include just the loopback address and your "real" address. > 1. How to change the hostname - just edit /rc/bin/termrc and choose > whatever I want to echo into /dev/sysname? Will that get reflected > back out to the corporate net via DHCP? You could do that. The "right" way to do it is make your ndb database in /lib/ndb map your ip address to the sysname you want. Take a look at the examples in there and ndb(6) and see if that gets you what you're after. I'm not sure what your second sentence means. DHCP clients don't broadcast changes out. If you want that server to advertise things, you'll have to look there. > 2. How to use DHCP to get to the corporate DNS servers? (This worked > pretty much OOTB on the labs dist, but I think that 9atom will be > the better match for the work we want to do.) Right now all > hostname lookups (via ping) fail. I'm not sure why this would behave differently. Check if the local dns resolver is running; 'ps | grep dns' and 'ls /srv/dns' should both give positive results. If either one doesn't, it's not running; rm any stale /srv/dns and re-start it with 'ndb/dns -r'. I don't know that VBox's NAT will do anything helpful with the dhcp requests, though. > 3. I would like to generate a PDF (or even .PS file) of Volume 1 of the > manual. What's in the dist has dates from over 10 years ago. I tried > running 'mk print.out' in the manual directory (as glenda) but got > an error. (Erik - can you do that automatically as part of your build > process? :-) So. How can I produce such a file suitable for duplex > printing? (Bonus points if the intro(N) page of each section comes > out first. :-) What error did you get? I just tried that on my (slightly out-of-date) 9atom installation (as myself) and it worked fine. The resulting print.out is troff output; lp can give you PostScript from that. You could also buy a lovely bound copy of both volumes from Vita Nuova. :-) Hard copy is still very nice from time to time. > 4. How to do the moral equivalent of shutdown -h now? 'fshalt -h'. I'm not confident the -h part will do much in Virtual Box. Have fun. signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [9fans] first questions from a lurker
> 4. How to do the moral equivalent of shutdown -h now? fshalt -h - erik
Re: [9fans] first questions from a lurker
> 2. How to use DHCP to get to the corporate DNS servers? (This worked >pretty much OOTB on the labs dist, but I think that 9atom will be >the better match for the work we want to do.) Right now all >hostname lookups (via ping) fail. i hope this isn't too redundant. i have a little different approach ip/ipconfig will configure your machine via dhcp. to get name lookup you'll need to run ndb/cs ndb/dns -r on the man pages, i've submitted/applied a patch that should fix the ptx1.c build issue so the outfile should be generated now. i'll work on automaticly generating the manual. correctly. :-) - erik
Re: [9fans] first questions from a lurker
On Mon, 10 Mar 2014 08:41:12 MDT arn...@skeeve.com wrote: > Hello All. > > I've been a lurker on 9fans for many years. Today I finally did an > install - +9atom.iso.bz2 into a virtual box VM. The VM is NAT'ed > to a corporate network and I can ping by IP address with no problem. > > First questions. > > 0. How to see my IP address? Cat a file in /net/... somewhere? /net/ndb has your ip address, gateway, dns servers, domain. > 2. How to use DHCP to get to the corporate DNS servers? (This worked >pretty much OOTB on the labs dist, but I think that 9atom will be >the better match for the work we want to do.) Right now all >hostname lookups (via ping) fail. Others have answered what to do within plan9. On the virtualbox side you need to attach to 'bridged adapter' instead of NAT. Pick the right "name" (which is really the interface name on the host) -- wi-fi (airport) for instacnce if you are on a MBP. I think the default adapter type should work (Intel pro/1000 MT desktop). You may also have to tell the dhcp server about mac address etc. depending on how it is set up.
Re: [9fans] first questions from a lurker
Pardon my not replying individually - thanks all of you for the answers! I'm looking forward to climbing this learning curve. :-) Arnold
Re: [9fans] first questions from a lurker
On Mon, Mar 10, 2014 at 4:55 PM, Bakul Shah wrote: > Others have answered what to do within plan9. On the > virtualbox side you need to attach to 'bridged adapter' > instead of NAT. Pick the right "name" (which is really the > interface name on the host) -- wi-fi (airport) for instacnce > if you are on a MBP. I think the default adapter type should > work (Intel pro/1000 MT desktop). You may also have to tell > the dhcp server about mac address etc. depending on how it is > set up. In my experience*, only the Intel Pro/1000 MT Server works. What did you want to do with your Plan 9 installation? If you just want a standalone system that can make outgoing connections, then NAT mode works fine - in that case DHCP is provided by VirtualBox itself and it passes through the ip addresses of the DNS servers from the host. If you want external systems to make connections to Plan 9 servers then you'll need Bridged mode as Bakul says. Pete * The Bell Labs distribution in VirtualBox 4.3.8 on Windows host.
Re: [9fans] first questions from a lurker
Reading your mails, I recommend you to read carefully and patiently all the docs in /says/doc, the man pages, starting with the intros, the great info in cat-v.org and of course the wiki! Don't forget searching in the mail archive, you'll see a lot of info about the things you are asking for (including my newbie's questions through the last year). Enjoy the little bunny!