mkusbboot 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. .TH MKUSBBOOT 8
  2. .SH NAME
  3. mkusbboot - generate bootable USB disk image
  4. .SH SYNOPSIS
  5. .B mkusbboot
  6. [
  7. .B -p
  8. .I proto
  9. ] [
  10. .B -r
  11. .I root
  12. ] [
  13. .B -s
  14. .I size
  15. ]
  16. .SH DESCRIPTION
  17. .I Mkusbboot
  18. generates a bootable disk image,
  19. called
  20. .BR image ,
  21. from the filesystem at
  22. .I root
  23. (by default
  24. .BR /n/boot ),
  25. .\" but could be
  26. .\" .BR /n/sources/plan9 ),
  27. using the
  28. .IR mkfs (8)
  29. prototype file
  30. .I proto
  31. and files in
  32. .BR /sys/lib/sysconfig/usb .
  33. .PP
  34. The image will be exactly
  35. .IB size *1,000,000
  36. bytes long.
  37. By default, it will be 1,900,000,000 bytes long,
  38. so it should fit on so-called 2 GB
  39. USB devices.
  40. When building from
  41. .BR /n/sources/plan9 ,
  42. the image defaults to 900,000,000 bytes long, to fit so-called 1 GB USB devices.
  43. .PP
  44. The image contains
  45. .I 9fat
  46. and
  47. .IR fossil (4)
  48. file systems and is configured to be bootable
  49. as a CPU server with serial console on
  50. .B 386
  51. (with optional VGA)
  52. or
  53. .B amd64
  54. machines, when copied to a USB disk.
  55. There is an
  56. .I nvram
  57. partition, initially zeroed.
  58. .SH EXAMPLES
  59. Create a bootable USB flash drive from the local Plan 9 installation.
  60. .IP
  61. .EX
  62. mkusbboot
  63. pump <image >/dev/sdU0.0/data
  64. .EE
  65. .SH FILES
  66. .TF /srv/fscons.open
  67. .TP
  68. .B image
  69. the resulting disk image
  70. .TP
  71. .B /sys/lib/sysconfig/usb
  72. .B plan9.ini
  73. and
  74. .B fossil.conf
  75. for the generated system
  76. .TP
  77. .B /sys/lib/sysconfig/proto/stand-usb
  78. default
  79. .I proto
  80. .TP
  81. .B /env/objtype
  82. architecture of the boot programs in the disk image
  83. .TP
  84. .B /tmp/9load
  85. .PD 0
  86. .TP
  87. .B /srv/fossil
  88. .TP
  89. .B /srv/fossil.open
  90. .TP
  91. .B /srv/fscons
  92. .TP
  93. .B /srv/fscons.open
  94. files created while executing
  95. .SH SOURCE
  96. .B /rc/bin/mkusbboot
  97. .SH SEE ALSO
  98. .IR usb (4),
  99. .IR boot (8),
  100. .IR diskparts (8),
  101. .IR loadfossil (8),
  102. .IR partfs (8),
  103. .IR plan9.ini (8),
  104. .IR prep (8)
  105. .SH BUGS
  106. Due to name clashes in
  107. .BR /srv ,
  108. should be run only on machines with no running
  109. .I fossil
  110. instance named
  111. .LR fossil .
  112. .PP
  113. Not all BIOSes can reliably read from USB devices.
  114. Your mileage may vary.