Plan9

From Rivalug Wiki

Jump to: navigation, search

Contents

Why Plan 9?

Why go through the effort to install a 15 year old operating system that was never had wide spread adoption?

Good:

Bad:

Keep expectations low, read as much as you can, if you ever installed or used linux or unix in the 90s Plan9 will be very similar

Relationship to Inferno OS

Inferno OS is a method to implement many Plan 9 concepts on top of other operating systems or embedded devices, thus it can run Plan 9 applications and connect to Plan 9 systems. Inferno OS has a GPL license.

References

Academic papers:

Installation

steps

Plan 9 Startup Menu: Select 1. Install Plan 9 from this CD
User DMA for ide drives: yes
mouseport is: ps/2
vgasize : default 640x480x8   ( if you want something bigger: 800x600x16 1024x768x24
and 1280x1024x16 also work )
monitor: vesa

This should get you to a gui installer

Task to do [configfs]: 
File system: fossil

Task to do [partdisk]:

The following disk devices were found:

sdC0 - QEMU HARDDISK

sdD0 - QEMU QEMU DVD-ROM 0.12

Disk to partition (sdC0, sdD0)[no default]; sdC0

Install mbr (y, n)[no default]: y

This is disk/fdisk; use it to create Plan 9 partition.
If there is enough room, a Plan 9 partition will be
suggested; you can probably just type 'w' and then 'q'.

cylinder = 4128768 bytes
'* pi                    0 520        (520 cylinders, 1.99 GB) PLAN9
>>> w
>>> q

Task to do [prepdisk]:

The following Plan 9 disk partitions were found.

/dev/sdC0/plan9 
  empty          0 4193217    (4193217 sectors, 1.99 GB)

Plan 9 partition to subdivide (/dev/sdC0/plan9)[/dev/sdC0/plan9}:

This is disk/prep; use it to subdivide the Plan 9 partition.
If it is not yet subdivided, a sensible layout will be suggested;
you can probably just type 'w' and the 'q'.

no plan9 partition table found
9fat 204800
nvram 1
fossil 3190732
swap  797684
' 9fat         0 204800    (204800 sectors, 100.00 MB)
' nvram   204800 204801    (1 sector, 512 B )
' fossil  204801 2295533   (3190732 sectors, 1.52 GB)
' swap   3395533 4193217   (797684 sectors, 389.49 MB)
>>> w
>>> q

Task to do [fmtfossil]:
Fossil partition to format (/dev/sdC0/fossil)[/dev/sdC0/fossil]:

Task to do [mountfs]:
The following partitions named fossil* were found

Please choose one to use as the installation file system
for your Plan 9 installation.

--rw-r----- S 0 glenda glenda 1633654784 Sep 16 04:00 /dev/sdC0/fossil

Fossil parition (

Task to do [configdist}:

Distribution is from (local,net)[local]:

Task to do [mountdist]:

The following storage media were detected.
Choose the one containing the distribution.

  /dev/sdC0/fossil ( plan9 fossil)
  /dev/sdD0/cdboot ( microsoft fat)
  /dev/sdD0/data   ( iso9660 cdrom )

Distribution disk [no default]: /dev/sdD0/data

Location of archives [browse]:
lc
exit

Task to do [copydist]:


Task to do [bootsetup]:

Important: if you press enter without making a selection instead of plan9, in may be unrecoverable and you need to start install again

Enable boot method (floppy, plan9, win9x, winnt)[no default]: plan9

Install the Plan 9 master boot record (y, n)[no default]: y

Task to do [finish]:

Feel free to turn off your computer

kvm

Recommend first install as a virtual machine under kvm:

  • Create a new directory for this install, download Plan9.iso.bz2 into this directory
  • Uncompress
bunzip2 Plan9.iso.bz2
  • Create virtual disk
qemu-img create -f qcow2 Plan9.qcow2.img 2G
  • run initial install with:
SDL_VIDEO_X11_DGAMOUSE=0 qemu-kvm -m 512 -hda Plan9.qcow2.img -cdrom plan9.iso -boot d
  • after install completes start virtual machine with:
SDL_VIDEO_X11_DGAMOUSE=0 qemu-kvm -m 512 Plan9.qcow2.img

Issues with the mouse not being represented correctly in qemu are corrected by using the SDL_VIDEO_X11_DGAMOUSE environmental varible

Its easy to do something to accidentally corrupt the plan9 filesystem or otherwise make it unbootable, frequent snapshots of the virtual disk are recommended.

Using

once booted you get this prompt:

 root is from (tcp, local)[local!#S/sdC0/fossil]:

press enter - the default user in glenda

 user[none]: glenda

you should get a GUI with several window, choose the terminal window

term%

commands

rc is the shell in plan9 - no tab completion, no scrolling to previous commands

rc command guide for unix users: http://plan9.bell-labs.com/wiki/plan9/Unix_to_Plan_9_command_translation/

small list of similarities:

ps

man

lc ~= ls

lc -l

differences:

halt (but no poweroff): fshalt reboot: fshalt -r

video

http://www.9grid.fr/wiki/plan9/Setting_the_right_monitor_size/index.html

If the default size is too small try this to increase the resolution:

aux/vga -m vesa -l 1024x768x24

But the new resolution will not be persistent until the plan9.ini file is edited.

mouse

networking

Enable networking configuration with DHCP and then enable DNS resolution

ip/ipconfig
ndb/dns -r

Display ip address

cat /net/ndb

Manual configuration

todo

Make changes persistant by editing /rc/bin/termrc

todo

How to do a DNS Query

 term% ndb/dnsquery
 > bell-labs.com ns
 	bell-labs.com ns	dirty.research.bell-labs.com
	bell-labs.com ns	filthy.research.bell-labs.com
 > plan9.bell-labs.com
	plan9.bell-labs.com ip	204.178.31.2
 > vcu.edu ns
        vcu.edu ns  uvaarpa.virginia.edu
        vcu.edu ns  lucite.cns.vcu.edu
        vcu.edu ns  cabell.vcu.edu
        vcu.edu ns  ruby.vcu.edu
        vcu.edu ns  hibbs.vcu.edu
 > www.vcu.edu
        jupiter.vcu.edu ip    128.172.30.162

Press DEL to exit

Ping

ip/ping <address>
 term% ip/ping www.vcu.edu
 sending 32 64 byte messages 1000 ms apart to icmp!www.vcu.edu!1
 0: rtt 1649 us, avg rtt 1649 us, ttl =124
 1:  

Press DEL to exit

terminal

To open a new terminal window:

  • Move cursor to any spot on the desktop that not in a window (usually colored dark gray)
  • Right click, select new, release
  • While holding the Right button, drag out a new window to desired size, release

No mouse wheel support for scrolling.

click on scroll bar: left click for up, right click for down

In general, uses left click a lot more than other GUI

web browser

First time:

term% webcookies
term% webfs
term% abaco

Subsequent times:

abaco

To get to google, left click "Google" in top menu to select, middle click to execute.

To go back, left click "Back" in third menu to select, middle click to execute

To Enter urls: Left click "New" in second menu to select, middle click to execute This should put you on the menu below "Del Snarf Get |" Type in full url: http://www.vcu.edu no just www.vcu.edu

To close frame: left click "Del" above url to select, then middle click to exectue

Note: No CSS, No Flash, No Java

editing

Two editors installed: sam & acme

Using sam

Using acme Open acme window at login

creating new user accounts

The list of user account, similar to /etc/passwd in unix is /adm/users

Home directories for users are in /usr The default account is glenda and thus its home directory is /usr/glenda

Connect to the file server console, add a new user called glen, add user to admin group:

term% con -l /srv/fscons
prompt: uname glen glen
prompt: uname sys +glen
prompt: >>> q
term%

The first time you log into this new account it will drop you into the shell (rc) without starting the GUI (rio)

To set up a new user envirnoment run:

/sys/lib/newuser 

more...

Add user password:

auth/changeuser glen

configuration

cat /n/

updating

pull

fossil+venti

Two different kinds of filesystems for Plan9. Basically Venti allows for permanent backup snapshots of Fossil. Use of Venti is not recommended for casual use of Plan9

configfs

File system (fossil+venti)[fossil]: fossil+venti


Skip below about repartitioning, just use a 4Gb virtual disk as the size of a fossil+venti install and the default settings for the partitions will be sufficient

default partitions ( 4 Gb )

9fat  100 MB
nvram 512  B
fossil 614 MB
arenas 3.0 GB
isect 154 MB
swap 154 MB


default partitions ( 2 Gb )

9fat 100.00 MB
nvram 512 B
fossil 295.59 MB
arenas 1.44 GB
isect 73.89 MB
swap 100.00 MB

not sufficient for install

using prep to edit partition table

http://lsub.org/magic/man2html/8/prep

p
d fossil
d arenas
a fossil 204801 2020936
p
a arenas 2020936 3837072
p
w
q
fossil 886.78 MB
arenas 886.78 MB

Video

Personal tools