[9fans] first questions from a lurker

2014-03-10 Thread arnold
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

2014-03-10 Thread arnold
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

2014-03-10 Thread Peter Hull
On Mon, Mar 10, 2014 at 2:41 PM,  arn...@skeeve.com 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

2014-03-10 Thread Charles Forsyth
On 10 March 2014 14:41, arn...@skeeve.com 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

2014-03-10 Thread Anthony Sorace
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

2014-03-10 Thread erik quanstrom
 4. How to do the moral equivalent of shutdown -h now?

fshalt -h

- erik



Re: [9fans] first questions from a lurker

2014-03-10 Thread erik quanstrom
 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

2014-03-10 Thread Bakul Shah
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

2014-03-10 Thread arnold
Pardon my not replying individually - thanks all of you for
the answers!  I'm looking forward to climbing this learning curve. :-)

Arnold



[9fans] About plan9.ini

2014-03-10 Thread Adriano Verardo
I've Plan9 on sdCO and sometimes want to boot from sdE0 (CFlash on ide) 
or from a usb key.
The other devices boots but it seems that the used plan9.ini is always 
from sdC0.

Probably something wrong on the CF/key devs I built.
But, just to be sure, shouldn't always be used the plan9.ini from the 
boot device ?


Thanks in advance

adriano




Re: [9fans] About plan9.ini

2014-03-10 Thread erik quanstrom
On Mon Mar 10 17:53:54 EDT 2014, adriano.vera...@mail.com wrote:
 I've Plan9 on sdCO and sometimes want to boot from sdE0 (CFlash on
 ide) or from a usb key.  The other devices boots but it seems that the
 used plan9.ini is always from sdC0.  Probably something wrong on the
 CF/key devs I built.  But, just to be sure, shouldn't always be used
 the plan9.ini from the boot device ?

yes.  if you're using iplfat, then this is the only thing it can read.

- erik



Re: [9fans] About plan9.ini

2014-03-10 Thread erik quanstrom
according to the atmel docs, it's interrupt in, bulk out.  does this make sense?
http://www.atmel.com/Images/doc4322.pdf.

- erik



Re: [9fans] About plan9.ini

2014-03-10 Thread Adriano Verardo

erik quanstrom ha scritto:

On Mon Mar 10 17:53:54 EDT 2014, adriano.vera...@mail.com wrote:

I've Plan9 on sdCO and sometimes want to boot from sdE0 (CFlash on
ide) or from a usb key.  The other devices boots but it seems that the
used plan9.ini is always from sdC0.  Probably something wrong on the
CF/key devs I built.  But, just to be sure, shouldn't always be used
the plan9.ini from the boot device ?

yes.  if you're using iplfat, then this is the only thing it can read.

- erik


What about Lab's 9load or 9Load on old 9Atom distros ?

adriano

  





Re: [9fans] About plan9.ini

2014-03-10 Thread erik quanstrom
 What about Lab's 9load or 9Load on old 9Atom distros ?

with 9load, you've got no options.  9load is just working
against the machine.

- erik



Re: [9fans] About plan9.ini

2014-03-10 Thread Adriano Verardo

erik quanstrom ha scritto:

What about Lab's 9load or 9Load on old 9Atom distros ?

with 9load, you've got no options.  9load is just working
against the machine.

- erik


Not sure to have unserstood.
Does it mean that plan9.ini is sequentially searched in a fixed order
no matter what is the actual boot device ?

adriano




Re: [9fans] About plan9.ini

2014-03-10 Thread erik quanstrom
On Mon Mar 10 19:07:49 EDT 2014, adriano.vera...@mail.com wrote:
 erik quanstrom ha scritto:
  What about Lab's 9load or 9Load on old 9Atom distros ?
  with 9load, you've got no options.  9load is just working
  against the machine.
 
  - erik
 
 Not sure to have unserstood.
 Does it mean that plan9.ini is sequentially searched in a fixed order
 no matter what is the actual boot device ?

exactly.  9load can't figure out what the boot device is, because it
can't make bios calls very well, and has likely corrupted bios state.

- erik