2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 01:40:26 +00:00

This custom partition section is very confusing, attempt to clean up a bit...

This commit is contained in:
Victor Hu
2018-09-17 10:54:25 -04:00
parent 7af038b99f
commit a7e5b6de65

View File

@ -1,38 +1,48 @@
.. BEGIN_Overview
By default, xCAT will install the operating system on the first disk and with default partitions layout in the node. However, you may choose to customize the disk partitioning during the install process and define a specific disk layout. You can do this in one of two ways: '**partition definition file**' or '**partition definition script**'.
By default, xCAT will attempt to determine the first physical disk and use a generic default partition scheme for the operating system. You may require a more customized disk partitioning scheme and can accomplish this in one of the following methods:
.. note:: ``partition definition file`` can be used for RedHat, SLES, and Ubuntu. Because disk configuraiton for Ubuntu is different from RedHat, there may be some special sections required for Ubuntu.
* partition definition file
* partition definition script
.. warning:: ``partition definition script`` has only been tested on RedHat and Ubuntu, use at your own risk for SLES.
.. note:: **partition definition file** can be used for RedHat, SLES, and Ubuntu. However, disk configuration for Ubuntu is different from RedHat/SLES, there may be some special sections required for Ubuntu.
.. warning:: **partition definition script** has only been verified on RedHat and Ubuntu, use at your own risk for SLES.
.. END_Overview
.. BEGIN_partition_definition_file_Overview
You could create a customized osimage partition file, say /install/custom/my-partitions, that contains the disk partitioning definition, then associate the partition file with osimage, the nodeset command will insert the contents of this file directly into the generated autoinst configuration file that will be used by the OS installer.
The following steps are required for this method:
#. Create a partition file
#. Associate the partition file with an xCAT osimage
The ``nodeset`` command will then insert the contents of this partition file into the generated autinst config file that will be used by the operation system installer.
.. END_partition_definition_file_Overview
.. BEGIN_partition_definition_file_content
The partition file must follow the partitioning syntax of the installer(e.g. kickstart for RedHat, AutoYaST for SLES, Preseed for Ubuntu). you could refer to the `Kickstart documentation <http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition>`_ or `Autoyast documentation <https://doc.opensuse.org/projects/autoyast/configuration.html#CreateProfile.Partitioning>`_ or `Preseed documentation <https://www.debian.org/releases/stable/i386/apbs04.html.en#preseed-partman>`_ write your own partitions layout. Meanwhile, RedHat and SuSE provides some tools that could help generate kickstart/autoyast templates, in which you could refer to the partition section for the partitions layout information:
The partition file must follow the partitioning syntax of the respective installer
* **[RedHat]**
* Redhat: `Kickstart documentation <http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition>`_
- The file /root/anaconda-ks.cfg is a sample kickstart file created by RedHat installer during the installation process based on the options that you selected.
- system-config-kickstart is a tool with graphical interface for creating kickstart files
* The file ``/root/anaconda-ks.cfg`` is a sample kickstart file created by RedHat installing during the installation process based on the options that you selected.
* system-config-kickstart is a tool with graphical interface for creating kickstart files
* **[SLES]**
* SLES: `Autoyast documentation <https://doc.opensuse.org/projects/autoyast/configuration.html#CreateProfile.Partitioning>`_
- Use yast2 autoyast in GUI or CLI mode to customize the installation options and create autoyast file
- Use yast2 clone_system to create autoyast configuration file /root/autoinst.xml to clone an existing system
* Use yast2 autoyast in GUI or CLI mode to customize the installation options and create autoyast file
* Use yast2 clone_system to create autoyast configuration file /root/autoinst.xml to clone an existing system
* **[Ubuntu]**
* Ubuntu: `Preseed documentation <https://www.debian.org/releases/stable/i386/apbs04.html.en#preseed-partman>`_
- For detailed information see the files partman-auto-recipe.txt and partman-auto-raid-recipe.txt included in the debian-installer package. Both files are also available from the debian-installer source repository. Note that the supported functionality may change between releases.
* For detailed information see the files ``partman-auto-recipe.txt`` and ``partman-auto-raid-recipe.txt`` included in the debian-installer package. Both files are also available from the debian-installer source repository.
.. note:: Supported functionality may change between releases of the Operating System, always refer to the latest documentation provided by the OS.
.. END_partition_definition_file_content
@ -349,14 +359,17 @@ Here is partition definition file example for Ubuntu standard partition in x86_6
.. BEGIN_partition_definition_file_Associate_partition_file_with_osimage_common
Run the following commands to associate the partition with the osimage: ::
If your custom partition file is located at: ``/install/custom/my-partitions``, run the following command to associate the partition file with an osimage: ::
chdef -t osimage <osimagename> partitionfile=/install/custom/my-partitions
nodeset <nodename> osimage=<osimage>
- For RedHat, when nodeset runs and generates the /install/autoinst file for a node, it will replace the #XCAT_PARTITION_START#...#XCAT_PARTITION_END# directives from your osimage template with the contents of your custom partitionfile.
To generate the configuration, run the ``nodeset`` command: ::
- For Ubuntu, when nodeset runs and generates the /install/autoinst file for a node, it will generate a script to write the partition configuration to /tmp/partitionfile, this script will replace the #XCA_PARTMAN_RECIPE_SCRIPT# directive in /install/autoinst/<node>.pre.
nodeset <nodename> osimage=<osimagename>
.. note:: **RedHat:** Running ``nodeset`` will generate the ``/install/autoinst`` file for the node. It will replace the ``#XCAT_PARTITION_START#`` and ``#XCAT_PARTITION_END#`` directives with the contents of your custom partition file.
.. note:: **Ubuntu:** Running ``nodeset`` will generate the ``/install/autoinst`` file for the node. It will write the partition file to ``/tmp/partitionfile`` and replace the ``#XCA_PARTMAN_RECIPE_SCRIPT#`` directive in ``/install/autoinst/<node>.pre`` with the contents of your custom partition file.
.. END_partition_definition_file_Associate_partition_file_with_osimage_common