ref: 83e9d0b9edb4b8013e91c13c95372db66e99c4d7
dir: /install-p9.ms/
In this guide, we will install Plan 9 4th edition with some patches for vmd. Thanks to adi for helping us prepare the ISO: http://adi.host.planetofnix.com/plan9.iso The ISO is also mirrored at https://ircnow.org/software/plan9.iso On the OpenBSD host, we first get serial console into the virtual machine: host$ vmctl console $USER Connected to /dev/ttypq (speed 115200) no vga; serial console only disk loader cpu0: 4596MHz GenuineIntel Core i7 (cpuid: AX 0x206D7 DX 0x79BA97F) ELCR: 02E8 497M memory: 497M kernel data, 0M user, 18M swap found partition #S/sdC0/data 0 41,943,040 found partition #S/sdD0/data 0 147,164 found partition #S/sdD0/data!9fat; 59050+2949120 disks: sdC0 sdD0 trying sdC0...dosinit: can't open #S/sdC0/9fat dosinit #S/sdC0/9fat failed trying sdD0.... Plan 9 Startup Menu: ==================== 1. Install Plan 9 from this CD 2. Boot Plan 9 from this CD Selection: 1 We choose 1 to Install Plan 9 from CD: found 9pcflop.gz .gz........................................................................................................................................................1225840 => 781908+1043156+390320=2215384 entry: 0xf0100020 Plan 9 i8042: kbdinit failed E820: 00000000 0009f800 memory E820: 0009f800 000a0000 reserved E820: 000f0000 00100000 reserved E820: 00100000 3fffa000 memory E820: 3fffa000 40000000 reserved E820: f0000000 100000000 reserved cpu0: 4597MHz GenuineIntel Core i7 (cpuid: AX 0x206D7 DX 0x79BA97F) ELCR: 02E8 intrenable: nil handler for 5, tbdf 0xC001000 for ether0 #l0: virtio: 1Gbps port 0x2000 irq 5: aabbccdded54 1024M memory: 256M kernel data, 767M user, 1392M swap pickmethod...read #e/nobootprompt...pickmethod done bind #æ...bind #S...partinit...auth...mount usbd...boot: can't open /srv/usb: '/srv/usb' file does not exist kfs...version...time... can't stat /srv/partfs.sdXX: '/srv/partfs.sdXX' file does not exist init: starting /bin/rc /bin/dossrv: serving #s/dos use DMA for ide drives[yes]: echo: write error: bad process or channel control request echo: write error: bad process or channel control request mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: vgasize [640x480x8]: text monitor is [xga]: Press enter to use DMA for ide drives, then press enter again for ps2. We select text for vgasize, and for monitor, choose the default. i8042: aux init failed i8042: aux init failed i8042: aux init failed i8042: 00 returned to the ea command /bin/aux/vga: vbecheck: VBE error 0x4f00 rio: can't open display: initdisplay: /dev/draw/new: no frame buffer failed to start rio. you can start a text-based installation by running inst/textonly init: starting /bin/rc % inst/textonly Since we don't have any VGA display on OpenBSD vmm, we run inst/textonly: Mon Oct 7 19:26:17 EDT 2024 Installation process started -------------------------------------- Preparing menu... The following unfinished tasks are ready to be done: configfs - choose the type of file system to install Task to do [configfs]: Press enter to select configfs: -------------------------------------- You can install the following types of file systems: fossil the new Plan9 fileserver fossil+venti fossil + a archival dump server File system (fossil, fossil+venti)[fossil]: Press enter to select fossil: -------------------------------------- Preparing menu... The following tasks are done: configfs - choose the type of file system to install The following unfinished tasks are ready to be done: partdisk - edit partition tables (e.g., to create a plan 9 partition) Task to do [partdisk]: Type enter to select partdisk: -------------------------------------- The following disk devices were found. sdC0 - sdD0 - OpenBSD VMM CD-ROM 001 Disk to partition (sdC0, sdD0)[no default]: sdC0 Choose the disk that isn't the CD-ROM, in this case, sdC0: The disk you selected HAS NO master boot record on its first sector. (Perhaps it is a completely blank disk.) You need a master boot record to use the disk. Should we install a default master boot record? Install mbr (y, n)[no default]: y Type y for yes: This is disk/fdisk; use it to create a 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 = 8225280 bytes '* p1 0 2610 (2610 cylinders, 19.99 GB) PLAN9 >>> w >>> q Enter w and q to write the partitions and quit: -------------------------------------- Preparing menu... The following tasks are done: configfs - choose the type of file system to install partdisk - edit partition tables (e.g., to create a plan 9 partition) The following unfinished tasks are ready to be done: prepdisk - subdivide plan 9 disk partition Task to do [prepdisk]: Type enter to subdivide the parttition: -------------------------------------- The following Plan 9 disk partitions were found. /dev/sdC0/plan9 empty 0 41929587 (41929587 sectors, 19.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 then 'q'. no plan9 partition table found 9fat 204800 nvram 1 fossil 40676210 swap 1048576 ' 9fat 0 204800 (204800 sectors, 100.00 MB) ' nvram 204800 204801 (1 sectors, 512 B ) ' fossil 204801 40881011 (40676210 sectors, 19.39 GB) ' swap 40881011 41929587 (1048576 sectors, 512.00 MB) >>> w >>> q Enter w and q to write and quit: -------------------------------------- Preparing menu... The following tasks are done: configfs - choose the type of file system to install partdisk - edit partition tables (e.g., to create a plan 9 partition) prepdisk - subdivide plan 9 disk partition The following unfinished tasks are ready to be done: fmtfossil - initialize disks for a fossil server Task to do [fmtfossil]: Press enter to format the disk for fossil. -------------------------------------- You have the following fossil partitions. Fossil partition to format (/dev/sdC0/fossil)[/dev/sdC0/fossil]: Done. -------------------------------------- Preparing menu... The following tasks are done: configfs - choose the type of file system to install partdisk - edit partition tables (e.g., to create a plan 9 partition) prepdisk - subdivide plan 9 disk partition fmtfossil - initialize disks for a fossil server The following unfinished tasks are ready to be done: mountfs - choose and mount file system partition Task to do [mountfs]: Type enter to mount the filesystem partition. -------------------------------------- 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 20826219520 Jun 9 15:26 /dev/sdC0/fossil Fossil partition (/dev/sdC0/fossil)[/dev/sdC0/fossil]: Select the correct partition (in this case /dev/sdC0/fossil). -------------------------------------- Preparing menu...% fossil/fossil -c . /env/fossilconf prompt: % mount -c /srv/fossil /n/newfs fsys main create /active/adm adm sys d775 prompt: fsys main create /active/adm/users adm sys 664 prompt: uname upas :upas prompt: users -w nuser 6 len 96 prompt: fsys main create /active/dist sys sys d775 prompt: fsys main create /active/dist/replica sys sys d775 prompt: fsys main create /active/dist/replica/client sys sys d775 prompt: fsys main create /active/dist/replica/client/plan9.db sys sys 664 prompt: fsys main create /active/dist/replica/client/plan9.log sys sys a664 prompt: The following tasks are done: configfs - choose the type of file system to install partdisk - edit partition tables (e.g., to create a plan 9 partition) prepdisk - subdivide plan 9 disk partition fmtfossil - initialize disks for a fossil server mountfs - choose and mount file system partition The following unfinished tasks are ready to be done: configdist - choose the source of the distribution archive download - download or continue to download the distribution archives Task to do [configdist]: Press enter to choose the source of the distribution archive. -------------------------------------- Are you going to download the distribution from the internet or do you have it on local media? Distribution is from (local, net)[local]: On OpenBSD vmm, you should have the ISO loaded in CD-ROM, so press enter for local. -------------------------------------- Preparing menu... The following tasks are done: configfs - choose the type of file system to install partdisk - edit partition tables (e.g., to create a plan 9 partition) prepdisk - subdivide plan 9 disk partition fmtfossil - initialize disks for a fossil server mountfs - choose and mount file system partition configdist - choose the source of the distribution archive The following unfinished tasks are ready to be done: mountdist - locate and mount the distribution download - download or continue to download the distribution archives Task to do [mountdist]: Press enter to mount the distribution. -------------------------------------- Please wait... Scanning storage devices... /dev/sdC0/9fat /dev/sdC0/data /dev/sdC0/fossil /dev/sdC0/nvram /dev/sdC0/swap /dev/sdD0/9fat /dev/sdD0/data The following storage media were detected. Choose the one containing the distribution. /dev/sdC0/fossil (plan9 fossil) /dev/sdD0/9fat (microsoft fat) /dev/sdD0/data (iso9660 cdrom) Distribution disk [no default]: /dev/sdD0/data Enter the path for the CD-ROM, in this case /dev/sdD0/data. % 9660srv /bin/9660srv 2688: serving /srv/9660 % mount /srv/9660 /n/distmedia /dev/sdD0/data Which directory contains the distribution? Any of the following will suffice (in order of preference): - the root directory of the cd image - the directory containing plan9.iso - the directory containing plan9.iso.bz2 Typing `browse' will put you in a shell that you can use to look for the directory. Location of archives [browse]: Type enter to browse for the root directory of the CD image. This is a simple shell. Commands are: cd directory - change to directory lc - list contents of current directory exit - exit shell Move to the directory containing the distribution and then exit. Type lc to list contents: /% lc 386 NOTICE bootdisk.img lp power64 9load NOTICE.old cfg mail rc LICENSE README cron mips sparc LICENSE.afpl acme dist mnt sys LICENSE.gpl adm env n tmp LICENSE.lucida amd64 fd pbsraw usr LICENSE.old arm lib power Once you've confirmed this is the CD-ROM, type exit: /% exit -------------------------------------- Preparing menu... The following tasks are done: configfs - choose the type of file system to install partdisk - edit partition tables (e.g., to create a plan 9 partition) prepdisk - subdivide plan 9 disk partition fmtfossil - initialize disks for a fossil server mountfs - choose and mount file system partition configdist - choose the source of the distribution archive mountdist - locate and mount the distribution The following unfinished tasks are ready to be done: copydist - copy the distribution into the file system Task to do [copydist]: Type enter to copy the distribution: -------------------------------------- |############################################################| 100% -------------------------------------- Preparing menu... The following tasks are done: configfs - choose the type of file system to install partdisk - edit partition tables (e.g., to create a plan 9 partition) prepdisk - subdivide plan 9 disk partition fmtfossil - initialize disks for a fossil server mountfs - choose and mount file system partition configdist - choose the source of the distribution archive mountdist - locate and mount the distribution copydist - copy the distribution into the file system The following unfinished tasks are ready to be done: bootsetup - create a boot floppy or configure hard disk to boot plan 9 Task to do [bootsetup]: Type enter to configure the hard disk to boot Plan 9. -------------------------------------- Initializing Plan 9 FAT configuration partition (9fat) Initializing Plan 9 FAT partition. add 9load at clust 2 Initializing FAT file system type hard, 100 tracks, 64 heads, 32 sectors/track, 512 bytes/sec Adding file /n/newfs/386/9load, length 369368 add 9load at clust 2 used 372736 bytes % cp /n/newfs/386/9load /n/9fat/9load % cp /n/newfs/386/9pcf /n/9fat/9pcf There are myriad ways to boot a Plan 9 system. You can use any of the following. floppy - create a boot floppy plan9 - make the plan 9 disk partition the default for booting win9x - add a plan 9 option to windows 9x boot menu winnt - add a plan 9 option to windows nt/2000/xp boot manager If you are upgrading an extant third edition installation and booting from something other than a floppy, you needn't run anything here. Just type ctl-d. Enable boot method (floppy, plan9, win9x, winnt)[no default]: plan9 Type plan9 to have plan 9 boot by default. If you use the Windows NT/2000/XP master boot record or a master boot record from a Unix clone (e.g., LILO or FreeBSD bootmgr), it is probably safe to continue using that boot record rather than install the Plan 9 boot record. Install the Plan 9 master boot record (y, n)[no default]: y Type y to install the Plan 9 master boot record. Setting Plan 9 partition active. The Plan 9 partition is now marked as active. -------------------------------------- Preparing menu... The following tasks are done: configfs - choose the type of file system to install partdisk - edit partition tables (e.g., to create a plan 9 partition) prepdisk - subdivide plan 9 disk partition fmtfossil - initialize disks for a fossil server mountfs - choose and mount file system partition configdist - choose the source of the distribution archive mountdist - locate and mount the distribution copydist - copy the distribution into the file system bootsetup - create a boot floppy or configure hard disk to boot plan 9 The following unfinished tasks are ready to be done: finish - finish the installation and reboot Task to do [finish]: Press enter to finish the installation. -------------------------------------- Congratulations; you've completed the install. Halting file systems...fsys all halt prompt: done Remember to take the install disk out of the drive. Feel free to turn off your computer. At this point, we escape the serial console by typing ~~., then stop and restart the virtual machine: $ vmctl stop $USER $ vmctl start -c $USER Connected to /dev/ttyp4 (speed 115200) MBR...PBS2... Plan 9 from Bell Labsi8042: kbdinit failed no vga; serial console only disk loader cpu0: 4604MHz GenuineIntel Core i7 (cpuid: AX 0x206D7 DX 0x79BA97F) ELCR: 02E8 497M memory: 497M kernel data, 0M user, 18M swap found partition #S/sdC0/data 0 41,943,040 found partition #S/sdD0/data 0 147,164 found partition #S/sdD0/data!9fat; 59050+2949120 disks: sdC0 sdD0 trying sdC0....found 9pcf .1131572..........................................................................................................................................+2018112......................................................................................................................................................................................................................................................+457544=3607228 entry: 0xf0100020 Plan 9 i8042: kbdinit failed E820: 00000000 0009f800 memory E820: 0009f800 000a0000 reserved E820: 000f0000 00100000 reserved E820: 00100000 3fffa000 memory E820: 3fffa000 40000000 reserved E820: f0000000 100000000 reserved cpu0: 4599MHz GenuineIntel Core i7 (cpuid: AX 0x206D7 DX 0x79BA97F) ELCR: 02E8 intrenable: nil handler for 5, tbdf 0xC001000 for ether0 #l0: virtio: 1Gbps port 0x2000 irq 5: aabbccdded54 1024M memory: 256M kernel data, 767M user, 1392M swap usbinit...usbd.../boot/usbd: /dev/usb: no hubs no /srv/usb...no usb disk...pickmethod...read #e/nobootprompt...read #e/bootargs...outin...root is from (tcp, local)[local!#S/sdC0/fossil]: Press enter to boot from local!#S/sdC0/fossil. pickmethod done bind #æ...bind #S...partinit...auth...user[none]: glenda Type glenda to run as user glenda. usbinit...usbd.../boot/usbd: /dev/usb: no hubs no /srv/usb...no usb disk...mount usbd...boot: can't open /srv/usb: '/srv/usb' file does not exist time... fossil(#S/sdC0/fossil)...version...can't stat /srv/partfs.sdXX: '/srv/partfs.sdXX' file does not exist init: starting /bin/rc i8042: aux init failed i8042: aux init failed i8042: aux init failed i8042: 00 returned to the ea command aux/vga: vbecheck: VBE error 0x4f00 rio: can't open display: initdisplay: /dev/draw/new: no frame buffer init: rc exit status: rio 30: display open init: starting /bin/rc Congrats, you now have a working Plan 9 installation. You can type ~~. to exit the serial console. Or, you can continue configuring your server. In particular, you may want to set up a cpu server.