9fans¤È¤«¤Ç¸«¤«¤±¤¿Tips¤È¤«¤Ç¤¹
run 9660srv to create /srv/9660. you also may need to give mount a full path name for python.iso, since the path gets interpreted relative to the current directory for 9660srv, not your own.
lib/profile font=/lib/font/bit/pelm/unicode.9.font
better utf support an implementation of the dial(2) routines >>> from plan9 import * >>> dial('tcp!sources.cs.bell-labs.com!9fs') (5, '/net/tcp/51', -1) >>> close(5) None >>> a simulation of sockets above the dial routines >>> import _socket >>> s=_socket.socket() >>> s.connect(('sources.cs.bell-labs.com', 564)) >>> s.close() >>> the socket simulation is minimal but good enough to run the various HTTPServer classes in /sys/lib/python % cd /tmp; python /sys/lib/python/SimpleHTTPServer.py ... the environment doesn't pick up extra nul bytes, supports assignment, and knows about rc-style lists >>> from plan9 import * >>> environ['path'] ['.', '/bin'] >>> environ['path'] = ['.', '/bin', '/tmp'] importing subclasses (subdirectories of /sys/lib/python) works now too.
By default the factotum on CPU servers does not prompt for extra keys, since there's typically no one sitting at the console to give them. You need to preload the factotum with the sources key, or start a new one: auth/factotum 9fs sources or echo 'proto=p9sk1 user=bozo !password=not.telling dom=outside.plan9.bell-labs.com' >/mnt/factotum/ctl
To update your kfs system, runpullor, if you're not logged in as glenda,/usr/glenda/bin/rc/pullSee the man page replica(1) for more information. If you have set up a real file server, you will need to edit the pull script as well as /dist/replica/network to remove the dependence on kfs. The script updates using the Plan 9 file server sources.cs.bell-labs.com. The additional packages are also available on the same server. After updating, you can do9fs sources ls -l /n/sources/extra
From: "Russ Cox"Date: 2003.03.26 06:58:45 Asia/Tokyo To: 9fans@cse.psu.edu Subject: [9fans] backwards-incompatible changes Reply-To: 9fans@cse.psu.edu There are two backwards incompatible changes that will appear on sources tomorrow. If you prepare for them, nothing will break when you do the pull. First, namespace files now have a `.' syntax to include other files. /lib/namespace will include /lib/namespace.$sysname. Thus, namespace.$sysname will become additions to the default name space rather than replacing it. To prepare for this change, add the line ``clear'' to the top of any namespace.$sysname files you have. The old code will ignore it, and the new code will do rfork(RFCNAMEG) when it sees it. Once you are running the new code everywhere, you can trim your namespace.$sysname files considerably. Second, the handling of rsa keys is redone. The new tools are already out -- see rsa(8). There will be a new ssh client that looks for keys identified by proto=rsa service=ssh rather than proto=sshrsa If you put both tags on the key, that will work with either ssh. Once you've switched, you can remove the proto=sshrsa tag. There will be a new sshserve that uses factotum to hold the host key, identified by proto=rsa service=sshserve You can convert with awk '{ printf("key proto=rsa service=sshserve owner=* "); printf("size=%s ek=%s !dk=%s n=%s !p=%s !q=%s !kp=%s !kq=%s !c2=%sހn", $1, $2, $3, $4, $5, $6, $7, $8, $9); }' /sys/lib/ssh/hostkey.secret After the switch you can delete hostkey.secret. TLS will look for keys identified by proto=rsa service=tls rather than proto=sshrsa As with the ssh client, if you put both tags on the key, it will work with old and new. Also, and not an incompatibility, there is a new factotum that knows about an ``owner'' tag to specify who can use the key. owner=* means anyone, otherwise you give a list owner=rsc owner=presotto etc. This way, you can publish, in bootes's factotum, the SSH host key and TLS key, and then services using them can run as none. Summary: - add "clear" to the top of your namespace.$sysname files - add "proto=rsa service=ssh" to your ssh client keys - add your ssh host key to factotum - add "proto=rsa service=tls" to your tls server keys Russ
From: "Russ Cox"Date: 2003.04.10 08:50:16 Asia/Tokyo To: 9fans@cse.psu.edu Subject: Re: [9fans] building 9load Reply-To: 9fans@cse.psu.edu cd /sys/src/boot/pc; mk will build 9load. to build a boot floppy, cd /sys/lib/dist/pc; mk ndisk i'm not 100% sure a fresh 9pcflop kernel works. you definitely need to change the nobootprompt=local!/bzroot in the usual plan9.ini to nobootprompt=local!/boot/bzroot due to the great /boot restructuring. a fresh 9pccd kernel is known to work.
sorry, forgot about the commands. from a fresh install: cd /sys/lib/dist/cmd mk install mk clean cd /sys/lib/dist/pc mk clean rm -f boot.raw # may be necessary if you have a failed build there mk ndisk there is some indication that the resulting disk will work if you copy plan9.ini.vmware to the disk as the plan9.ini (by default it is empty). that indication is that nobootprompt is already set to local!/boot/bzroot. i feel like i fixed it for someone a few months ago, but i forget who (steve simon, perhaps). i'll test it again a bit later.
From: "Russ Cox"Date: 2003.04.22 02:03:21 Asia/Tokyo To: 9fans@cse.psu.edu Subject: Re: [9fans] the make .ISO file under plan9 Reply-To: 9fans@cse.psu.edu You can fetch a fresh ISO file from http://plan9.bell-labs.com/plan9dist/ureg.html Look for the link named "Sources Snapshot" for a file plan9-new.iso.bz2. This file can be used to update your Plan 9 system or to install a fresh up-to-date system. The file is generated nightly from the sources data. To update your system you'd download the file, uncompress it, mount it, and then use the replica tools: 9660srv bunzip2 < plan9-new.iso.bz2 > plan9-new.iso mount /srv/9660 /n/dist plan9-new.iso disk/kfscmd allow replica/pull -v /dist/replica/cd disk/kfscmd disallow If you wrote it to a real CD first, the mount sequence would look like: 9660srv mount /srv/9660 /n/dist /dev/sdD0/data assuming the CD drive was /dev/sdD0/data. If you want to build your own ISO images you can look at /sys/lib/dist/mkfile, but the process will need some editing to make it work on machines outside Bell Labs. Russ
From: "Russ Cox"Date: 2003.04.22 04:06:15 Asia/Tokyo To: 9fans@cse.psu.edu Subject: Re: [9fans] (no subject) Reply-To: 9fans@cse.psu.edu this is /rc/bin/termrc.local from my laptop. just a switch between a static ip address and whatever i can get from dhcp. a prompt to select which one would be fine. i used to do that. i can't configure the vmware dhcp server to give out a static address (at least, not easily) so i just do it myself. if(aux/isvmware){ ip/ipconfig -g 192.168.233.2 ether /net/ether0 192.168.233.51 255.255.255.0 echo ' dom=.localdomain' >> /net/ndb echo ' dns=192.168.233.2' >>/net/ndb echo 'add 0 0 192.168.233.2' >>/net/iproute } if not ip/ipconfig ether /net/ether0
From: Charles ForsythDate: 2003.05.14 15:54:59 Asia/Tokyo To: 9fans@cse.psu.edu Subject: Re: [9fans] Some question about PowerPC? Reply-To: 9fans@cse.psu.edu 1I want to port plan9 to MPC8260. How can I do? 1) Where to get compiler for PowerPC? 2) My host is a i386 pc, how do I make cross-compiler? 1. the compiler suite is qc/qa/ql, see manual page 2c(1), although you will not typically use it directly, since the system mkfiles (see mk(1)) already set up its use correctly when the target is power 1a. for some reason the executables aren't supplied ready-made for x86, but it's easy to build them (see part 2). 2. plan 9 compilers don't have a special `cross-compile' mode. just compile the powerpc compiler suite with the x86 compiler suite (8a/8c/8l), as follows. cd /sys/src/cmd for(a in cc qa qc ql)@{cd $a; mk install} 2a. you'll need the libraries as well, and if you've got the file system space, the easiest thing is to build everything for power (you'll need some of it sooner or later): cd /sys/src objtype=power mk install the above builds the libraries and commands for power (powerpc) architecture and leaves the binaries under /power/lib/... and /power/bin/...
the password change doesn't fly around in the clear anymore -- cpu connections are encrypted. i type "service=terminal passwd" all the time.
Open new window
term% con /srv/fscons prompt: srv -APW main
Open one more new window
term% mount /srv/main /n/fossil
Caution
after operation, you need sync on console
prompt: fsys main sync
just type ctl-\
At python.iso, it expect that target filesystem is kfs. So you need some change for install it
Open new window
term% con /srv/fscons prompt: srv -APW replica
Open one more new window
term% mount /srv/replica /n/kfs
Mount Python.iso
term% srv9660 mount /srv/9660 /n/dist /path/to/python.iso
Change /n/dist/python
term% cp /n/dist/python .
edit ./python line clinetmount
clinetmount = { status = '' }
bind ./python on /n/dist/python .
bind /path/to/your/python /n/dist/python
run replica/pull
finish
% fossil/conf /dev/sdC0/fossil > flproto % acme flproto # and make youir modifications (-AWP take the permision checking away), save the file and then % cat flproto | fossil/conf -w /dev/sdC0/fossil now, when you restart, your system starts without permision checking.
ALT+X+4digits
home% ip/ping localhost ip/ping: couldn't dial: cs: can't translate address: dns: resource does not exist home% echo 'sys=localhost ip=127.0.0.1 dom=localhost' > /net/ndb home% ip/ping localhost sending 32 64 byte messages 1000 ms apart 0: rtt 615 ¦Ìs, avg rtt 615 ¦Ìs, ttl = 128 1: rtt 539 ¦Ìs, avg rtt 577 ¦Ìs, ttl = 128 2: rtt 635 ¦Ìs, avg rtt 596 ¦Ìs, ttl = 128 home%
echo refresh >/net/cs echo refresh >/net/dns
If you've booted Plan 9 from the Plan 9 distribution CD, you should be able to do: disk/kfs -f/dev/sdC0/fs disk/kfscmd 'check r' Replace "sdC0" with the name of your kfs disk device.
make snapshot
con /srv/fscons snap
view snapshot. If you use terminal server, use -AWP options.
con /srv/fscons srv -AWP main
Open another window
mount /srv/main /n/snap main/snapshot ls /n/snap
I included the boyd/forsyth keyboard map stuff in the kernel. man kbmap for details.
In general you can
bind -a'#¦Ê' /dev
cat /dev/kbmap > /tmp/xxx
edit /tmp/xxx
cat /tmp/xxx > /dev/kbmap
I also changed /sys/src/9/boot/boot.c to automaticly load a map if specified in plan9.ini as
kbmap=
In this casehas to be something you can get at before there's a file system so you'll have to make sure its in /boot/. The reason it gets done so early is that factotum starts before you have an fs and it would be nice if your keyboard had the right mapping when you type in your login name ans password.
No idea of the boot change works yet. Haven't tested it...
As usual, my apologies to the japanese/chinese/etc.
I'll put any mapping files I get into /sys/lib/kbmap on sources.
% cd /sys/src/cmd
% mk kbmap.install
it's a device you need to bind to dev, the device is named '#¦Ê' (greek small letter kappa), you can either generate it by 'alt+*+k' or pick it up from /lib/keyboard:
% bind -ac '#¦Ê' /dev
% kbmap
after you've convinced yourself that it works you can put it in /rc/bin/termrc and /rc/bin/cpurc...
fn + delete
you can make your own screen shot with the old code:
font=/lib/font/bit/lucida/unicode.8.font1 rio
draw a new window
pretend you typed Esc twice but don't
cat /dev/screen