ref-kickstart.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
  4. <chapter id='ref-kickstart'>
  5. <title>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</title>
  6. <section id='openembedded-kickstart-wks-reference'>
  7. <title>Introduction</title>
  8. <para>
  9. The current Wic implementation supports only the basic kickstart
  10. partitioning commands:
  11. <filename>partition</filename> (or <filename>part</filename>
  12. for short) and <filename>bootloader</filename>.
  13. <note>
  14. Future updates will implement more commands and options.
  15. If you use anything that is not specifically supported, results
  16. can be unpredictable.
  17. </note>
  18. </para>
  19. <para>
  20. This chapter provides a reference on the available kickstart
  21. commands.
  22. The information lists the commands, their syntax, and meanings.
  23. Kickstart commands are based on the Fedora kickstart versions but
  24. with modifications to reflect Wic capabilities.
  25. You can see the original documentation for those commands at the
  26. following link:
  27. <literallayout class='monospaced'>
  28. <ulink url='http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html'>http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html</ulink>
  29. </literallayout>
  30. </para>
  31. </section>
  32. <section id='command-part-or-partition'>
  33. <title>Command: part or partition</title>
  34. <para>
  35. Either of these commands creates a partition on the system and uses
  36. the following syntax:
  37. <literallayout class='monospaced'>
  38. part [<replaceable>mntpoint</replaceable>]
  39. partition [<replaceable>mntpoint</replaceable>]
  40. </literallayout>
  41. If you do not provide <replaceable>mntpoint</replaceable>, Wic
  42. creates a partition but does not mount it.
  43. </para>
  44. <para>
  45. The <filename><replaceable>mntpoint</replaceable></filename> is
  46. where the partition is mounted and must be in one of the
  47. following forms:
  48. <itemizedlist>
  49. <listitem><para>
  50. <filename>/<replaceable>path</replaceable></filename>:
  51. For example, "/", "/usr", or "/home"
  52. </para></listitem>
  53. <listitem><para>
  54. <filename>swap</filename>:
  55. The created partition is used as swap space
  56. </para></listitem>
  57. </itemizedlist>
  58. </para>
  59. <para>
  60. Specifying a <replaceable>mntpoint</replaceable> causes the
  61. partition to automatically be mounted.
  62. Wic achieves this by adding entries to the filesystem table (fstab)
  63. during image generation.
  64. In order for Wic to generate a valid fstab, you must also provide
  65. one of the <filename>--ondrive</filename>,
  66. <filename>--ondisk</filename>, or
  67. <filename>--use-uuid</filename> partition options as part of the
  68. command.
  69. <note>
  70. The mount program must understand the PARTUUID syntax you use
  71. with <filename>--use-uuid</filename> and non-root
  72. <replaceable>mountpoint</replaceable>, including swap.
  73. The busybox versions of these application are currently
  74. excluded.
  75. </note>
  76. Here is an example that uses "/" as the
  77. <replaceable>mountpoint</replaceable>.
  78. The command uses <filename>--ondisk</filename> to force the
  79. partition onto the
  80. <filename>sdb</filename> disk:
  81. <literallayout class='monospaced'>
  82. part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
  83. </literallayout>
  84. </para>
  85. <para>
  86. Here is a list that describes other supported options you can use
  87. with the <filename>part</filename> and
  88. <filename>partition</filename> commands:
  89. <itemizedlist>
  90. <listitem><para>
  91. <emphasis><filename>--size</filename>:</emphasis>
  92. The minimum partition size in MBytes.
  93. Specify an integer value such as 500.
  94. Do not append the number with "MB".
  95. You do not need this option if you use
  96. <filename>--source</filename>.
  97. </para></listitem>
  98. <listitem><para>
  99. <emphasis><filename>--fixed-size</filename>:</emphasis>
  100. The exact partition size in MBytes.
  101. You cannot specify with <filename>--size</filename>.
  102. An error occurs when assembling the disk image if the
  103. partition data is larger than
  104. <filename>--fixed-size</filename>.
  105. </para></listitem>
  106. <listitem><para>
  107. <emphasis><filename>--source</filename>:</emphasis>
  108. This option is a Wic-specific option that names the source
  109. of the data that populates the partition.
  110. The most common value for this option is "rootfs", but you
  111. can use any value that maps to a valid source plug-in.
  112. For information on the source plug-ins, see the
  113. "<ulink url='&YOCTO_DOCS_DEV_URL;#wic-using-the-wic-plug-ins-interface'>Using the Wic Plug-Ins Interface</ulink>"
  114. section in the Yocto Project Development Tasks Manual.
  115. </para>
  116. <para>If you use <filename>--source rootfs</filename>, Wic
  117. creates a partition as large as needed and fills it with
  118. the contents of the root filesystem pointed to by the
  119. <filename>-r</filename> command-line option or the
  120. equivalent rootfs derived from the <filename>-e</filename>
  121. command-line option.
  122. The filesystem type used to create the partition is driven
  123. by the value of the <filename>--fstype</filename> option
  124. specified for the partition.
  125. See the entry on <filename>--fstype</filename> that follows
  126. for more information.</para>
  127. <para>If you use
  128. <filename>--source <replaceable>plugin-name</replaceable></filename>,
  129. Wic creates a partition as large as needed and fills it
  130. with the contents of the partition that is generated by the
  131. specified plug-in name using the data pointed to by the
  132. <filename>-r</filename> command-line option or the
  133. equivalent rootfs derived from the <filename>-e</filename>
  134. command-line option.
  135. Exactly what those contents are and filesystem type used are
  136. dependent on the given plug-in implementation.
  137. </para>
  138. <para>If you do not use the <filename>--source</filename>
  139. option, the <filename>wic</filename> command creates an
  140. empty partition.
  141. Consequently, you must use the <filename>--size</filename>
  142. option to specify the size of the empty partition.
  143. </para></listitem>
  144. <listitem><para>
  145. <emphasis><filename>--ondisk</filename> or <filename>--ondrive</filename>:</emphasis>
  146. Forces the partition to be created on a particular disk.
  147. </para></listitem>
  148. <listitem><para>
  149. <emphasis><filename>--fstype</filename>:</emphasis>
  150. Sets the file system type for the partition.
  151. Valid values are:
  152. <itemizedlist>
  153. <listitem><para>
  154. <filename>ext4</filename>
  155. </para></listitem>
  156. <listitem><para>
  157. <filename>ext3</filename>
  158. </para></listitem>
  159. <listitem><para>
  160. <filename>ext2</filename>
  161. </para></listitem>
  162. <listitem><para>
  163. <filename>btrfs</filename>
  164. </para></listitem>
  165. <listitem><para>
  166. <filename>squashfs</filename>
  167. </para></listitem>
  168. <listitem><para>
  169. <filename>swap</filename>
  170. </para></listitem>
  171. </itemizedlist>
  172. </para></listitem>
  173. <listitem><para>
  174. <emphasis><filename>--fsoptions</filename>:</emphasis>
  175. Specifies a free-form string of options to be used when
  176. mounting the filesystem.
  177. This string is copied into the
  178. <filename>/etc/fstab</filename> file of the installed
  179. system and should be enclosed in quotes.
  180. If not specified, the default string is "defaults".
  181. </para></listitem>
  182. <listitem><para>
  183. <emphasis><filename>--label label</filename>:</emphasis>
  184. Specifies the label to give to the filesystem to be made on
  185. the partition.
  186. If the given label is already in use by another filesystem,
  187. a new label is created for the partition.
  188. </para></listitem>
  189. <listitem><para>
  190. <emphasis><filename>--active</filename>:</emphasis>
  191. Marks the partition as active.
  192. </para></listitem>
  193. <listitem><para>
  194. <emphasis><filename>--align (in KBytes)</filename>:</emphasis>
  195. This option is a Wic-specific option that says to start
  196. partitions on boundaries given
  197. <replaceable>x</replaceable> KBytes.
  198. </para></listitem>
  199. <listitem><para>
  200. <emphasis><filename>--no-table</filename>:</emphasis>
  201. This option is a Wic-specific option.
  202. Using the option reserves space for the partition and
  203. causes it to become populated.
  204. However, the partition is not added to the partition table.
  205. </para></listitem>
  206. <listitem><para>
  207. <emphasis><filename>--exclude-path</filename>:</emphasis>
  208. This option is a Wic-specific option that excludes the given
  209. relative path from the resulting image.
  210. This option is only effective with the rootfs source
  211. plug-in.
  212. </para></listitem>
  213. <listitem><para>
  214. <emphasis><filename>--extra-space</filename>:</emphasis>
  215. This option is a Wic-specific option that adds extra space
  216. after the space filled by the content of the partition.
  217. The final size can exceed the size specified by the
  218. <filename>--size</filename> option.
  219. The default value is 10 Mbytes.
  220. </para></listitem>
  221. <listitem><para>
  222. <emphasis><filename>--overhead-factor</filename>:</emphasis>
  223. This option is a Wic-specific option that multiplies the
  224. size of the partition by the option's value.
  225. You must supply a value greater than or equal to "1".
  226. The default value is "1.3".
  227. </para></listitem>
  228. <listitem><para>
  229. <emphasis><filename>--part-name</filename>:</emphasis>
  230. This option is a Wic-specific option that specifies a name
  231. for GPT partitions.
  232. </para></listitem>
  233. <listitem><para>
  234. <emphasis><filename>--part-type</filename>:</emphasis>
  235. This option is a Wic-specific option that specifies the
  236. partition type globally unique identifier (GUID) for GPT
  237. partitions.
  238. You can find the list of partition type GUIDs at
  239. <ulink url='http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs'></ulink>.
  240. </para></listitem>
  241. <listitem><para>
  242. <emphasis><filename>--use-uuid</filename>:</emphasis>
  243. This option is a Wic-specific option that causes Wic to
  244. generate a random GUID for the partition.
  245. The generated identifier is used in the bootloader
  246. configuration to specify the root partition.
  247. </para></listitem>
  248. <listitem><para>
  249. <emphasis><filename>--uuid</filename>:</emphasis>
  250. This option is a Wic-specific option that specifies the
  251. partition UUID.
  252. </para></listitem>
  253. <listitem><para>
  254. <emphasis><filename>--fsuuid</filename>:</emphasis>
  255. This option is a Wic-specific option that specifies the
  256. filesystem UUID.
  257. You can generate or modify
  258. <link linkend='var-WKS_FILE'><filename>WKS_FILE</filename></link>
  259. with this option if a preconfigured filesystem UUID is
  260. added to the kernel command line in the bootloader
  261. configuration before you run Wic.
  262. </para></listitem>
  263. <listitem><para>
  264. <emphasis><filename>--system-id</filename>:</emphasis>
  265. This option is a Wic-specific option that specifies the
  266. partition system ID, which is a one byte long, hexadecimal
  267. parameter with or without the 0x prefix.
  268. </para></listitem>
  269. <listitem><para>
  270. <emphasis><filename>--mkfs-extraopts</filename>:</emphasis>
  271. This option specifies additional options to pass to the
  272. <filename>mkfs</filename> utility.
  273. Some default options for certain filesystems do not take
  274. effect.
  275. See Wic's help on kickstart
  276. (i.e. <filename>wic help kickstart</filename>).
  277. </para></listitem>
  278. </itemizedlist>
  279. </para>
  280. </section>
  281. <section id='command-bootloader'>
  282. <title>Command: bootloader</title>
  283. <para>
  284. This command specifies how the bootloader should be configured and
  285. supports the following options:
  286. <note>
  287. Bootloader functionality and boot partitions are implemented by
  288. the various <filename>--source</filename> plug-ins that
  289. implement bootloader functionality.
  290. The bootloader command essentially provides a means of
  291. modifying bootloader configuration.
  292. </note>
  293. <itemizedlist>
  294. <listitem><para>
  295. <emphasis><filename>--timeout</filename>:</emphasis>
  296. Specifies the number of seconds before the bootloader times
  297. out and boots the default option.
  298. </para></listitem>
  299. <listitem><para>
  300. <emphasis><filename>--append</filename>:</emphasis>
  301. Specifies kernel parameters.
  302. These parameters will be added to the syslinux
  303. <filename>APPEND</filename> or <filename>grub</filename>
  304. kernel command line.
  305. </para></listitem>
  306. <listitem><para>
  307. <emphasis><filename>--configfile</filename>:</emphasis>
  308. Specifies a user-defined configuration file for the
  309. bootloader.
  310. You can provide a full pathname for the file or a file that
  311. exists in the <filename>canned-wks</filename> folder.
  312. This option overrides all other bootloader options.
  313. </para></listitem>
  314. </itemizedlist>
  315. </para>
  316. </section>
  317. </chapter>
  318. <!--
  319. vim: expandtab tw=80 ts=4
  320. -->