mkusbboot 2.2 KB

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