1
0

mkfile 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #
  2. # Assumptions:
  3. # 1) $fileserver and /env/sysname will be correctly set
  4. # 2) the standalone kernel will eventually be booted with
  5. # bootargs=local -B 4096
  6. #
  7. # 'From scratch' procedure:
  8. # 1) bring system up as a terminal:
  9. # boot /386/9pcdisk
  10. # root is from 'il'
  11. # login as 'bootes'
  12. # 2) don't forget to
  13. # echo 'dma on'>/dev/sdC0/ctl
  14. # 3) initialise the disc from scratch and make a 9fat boot partition:
  15. # mk partinit
  16. # remember to have up to date local copies of plan9.ini and plan9.nvr
  17. # and remember the kernel names will be truncated on the FAT parititon.
  18. # 4) ream the kfs partition
  19. # mk ream
  20. # 5) initialise the fs partition for the system
  21. # mk $sysname
  22. #
  23. partinit:
  24. disk/mbr -m /386/mbr /dev/sdC0/data
  25. disk/fdisk -baw /dev/sdC0/data
  26. disk/prep -banw /dev/sdC0/plan9
  27. disk/format -b /386/pbslba -d -r 2 /dev/sdC0/9fat\
  28. /386/9load\
  29. /386/9pcauth\
  30. $sysname/plan9.ini\
  31. $sysname/plan9.nvr
  32. ream:
  33. disk/kfs -rb16384 -B 4096 -f /dev/sdC0/fs
  34. fsinit:V:
  35. 9fs kfs
  36. 9fs $fileserver
  37. disk/kfscmd allow
  38. disk/kfscmd 'create /adm sys sys 775 d'
  39. disk/kfscmd 'create /adm/users adm adm 664'
  40. cp -x /n/$fileserver/adm/users /n/kfs/adm/users
  41. disk/kfscmd user
  42. disk/mkfs -u /adm/users -s /n/$fileserver ./authproto
  43. boundary:V:
  44. mk fsinit
  45. disk/kfscmd allow
  46. cp -x /n/$fileserver/adm/keys /n/kfs/adm/keys
  47. cp -x /n/$fileserver/adm/keys.who /n/kfs/adm/keys.who
  48. cp -x /n/$fileserver/adm/netkeys /n/kfs/adm/netkeys
  49. cp -x /n/$fileserver/adm/netkeys.who /n/kfs/adm/netkeys.who
  50. cp -x /n/$fileserver/adm/warn.keys /n/kfs/adm/warn.keys
  51. cp -x /n/$fileserver/adm/warn.netkeys /n/kfs/adm/warn.netkeys
  52. cp $sysname/auth /n/kfs/lib/ndb/auth
  53. cp $sysname/consoledb /n/kfs/lib/ndb/consoledb
  54. cp $sysname/httppasswords /n/kfs/sys/lib/httppasswords
  55. cp $sysname/lib.ndb.mkfile /n/kfs/lib/ndb/mkfile
  56. cp $sysname/namespace.$sysname /n/kfs/lib/namespace.$sysname
  57. cp $sysname/cpurc /n/kfs/rc/bin/cpurc
  58. cp $sysname/sys.log.mkfile /n/kfs/sys/log/mkfile
  59. {
  60. cd /n/kfs/lib/ndb; mk
  61. bind -c /n/kfs/sys/log /sys/log
  62. mk -f /sys/log/mkfile
  63. unmount /sys/log
  64. cd /n/kfs/sys/src/9; mk clean
  65. cd /n/kfs/sys/src/fs; mk clean
  66. }
  67. disk/kfscmd disallow
  68. disk/kfscmd sync
  69. saveboundary:V:
  70. 9fs $fileserver
  71. savedir=/usr/jmk/auth/$sysname
  72. cp /adm/keys /n/$fileserver/$savedir/keys
  73. cp /adm/keys.who /n/$fileserver/$savedir/keys.who
  74. cp /adm/netkeys /n/$fileserver/$savedir/netkeys
  75. cp /adm/netkeys.who /n/$fileserver/$savedir/netkeys.who
  76. cp /adm/warn.keys /n/$fileserver/$savedir/warn.keys
  77. cp /adm/warn.netkeys /n/$fileserver/$savedir/warn.netkeys
  78. cp /lib/ndb/auth /n/$fileserver/$savedir/auth
  79. cp /lib/ndb/consoledb /n/$fileserver/$savedir/consoledb
  80. cp /sys/lib/httppasswords /n/$fileserver/$savedir/httppasswords
  81. cp /lib/ndb/mkfile /n/$fileserver/$savedir/lib.ndb.mkfile
  82. cp /lib/namespace.$sysname /n/$fileserver/$savedir/namespace.$sysname
  83. cp /rc/bin/cpurc /n/$fileserver/$savedir/cpurc
  84. cp /sys/log/mkfile /n/$fileserver/$savedir/sys.log.mkfile