Operating system for OpenComputers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

INSTALL.md 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Installing PsychOS
  2. ## From OpenOS
  3. ### Requirements
  4. In general:
  5. - oppm
  6. - mtar
  7. For installing to an unmanaged drive or tape
  8. - slicer
  9. - partman
  10. - rtfs
  11. - boopu
  12. There are two easy methods to get these packages.
  13. 1. With oppm, if available, you can run `oppm install mtar partman rtfs boopu`.
  14. 2. You can use the `obootstrap.lua` script to set up a temporary environment for installing PsychOS. This can even be used from the OpenOS installer disk.
  15. ```
  16. # wget https://git.shadowkat.net/izaya/OC-PsychOS2/raw/branch/master/obootstrap.lua /tmp/obootstrap.lua
  17. # /tmp/obootstrap.lua
  18. ```
  19. ### Preparing the target disk
  20. #### Managed filesystem
  21. Preparing a managed filesystem is extremely simple: attach it to your computer, and make sure there's nothing that you want to keep in the following locations on the filesystem:
  22. - init.lua
  23. - lib/
  24. - service/
  25. - doc/
  26. - pkg/
  27. - cfg/
  28. #### Unmanaged drive or tape
  29. ##### Creating partitions
  30. First, you'll need to find out how many sectors your target device has. `slicer <addr> show` will show you something like this:
  31. ```
  32. # slicer 9f7 show
  33. Drive 9f755736 - 1024KiB, 2048 sectors:
  34. # Name Type Start Len End
  35. ```
  36. The usable space on the disk is going to be two sectors less than the total size - sectors 2 through 2047, in this case, as you will want to leave space for the OSDI partition table at the start, and the MTPT partition table at the end.
  37. First, we'll create the boot partition. 64KiB is the recommended size, though 48KiB may be enough. OC disks use 512 byte sectors, so that will work out to 128 sectors.
  38. ```
  39. # slicer 9f7 add init.lua boot 2 128
  40. Drive 9f755736 - 1024KiB, 2048 sectors:
  41. # Name Type Start Len End
  42. 1: 9f755736 mtpt 0 0 -1
  43. 2: init.lua boot 2 128 129
  44. ```
  45. Next, we need to create an rtfs partition, for the boot filesystem. This can use the rest of the space on the disk, but should be named `<first 8 characters of computer address>-boot`.
  46. ```
  47. # slicer 9f7 add ffa5c282-boot rtfs 130 1918
  48. Drive 9f755736 - 1024KiB, 2048 sectors:
  49. # Name Type Start Len End
  50. 1: 9f755736 mtpt 0 0 -1
  51. 2: init.lua boot 2 128 129
  52. 3: ffa5c282-boot rtfs 130 1918 2047
  53. ```
  54. Once you're all done, you can restart partman and it should recognise the new partitions.
  55. ```
  56. # rc partman restart
  57. # components part
  58. partition 9f755736-a739-4f45-8c5c-35a66a7f5dbe/2
  59. ```
  60. ##### Formatting the filesystem
  61. Next, we'll use the mkfs.rtfs utility to format the filesystem partition we just created. Do note that the order of components is not fixed, so using a shortened version can result in unreliable behavior, like, for example, formatting the boot partition.
  62. ```
  63. # mkfs.rtfs 9f755736-a739-4f45-8c5c-35a66a7f5dbe/2 ffa5c282-boot
  64. 9f755736-a739-4f45-8c5c-35a66a7f5dbe/2
  65. ```
  66. To make OpenOS mount the filesystem, the simplest way is to restart partman again, as described in the previous section.