Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Autoyast question

  1. #1

    Default Autoyast question

    Greetings All,

    For a number of years, I have used an AUTOYAST .xml file to do installations for the various machines that I support.
    Most of these machines are multi-boot, with a number of different OSs installed.
    To accomplish this, I have rigidly defined partition number assignments.

    What would make life a lot easier is to be able to override the default partition number specified.
    After slogging through the Autoyast manual, I discovered that I can add questions to modify the settings in the .xml.
    After placing the section in the XML, I was overjoyed to find that I could indeed enter a different partition number than the default.

    However, When the system rebooted, it turns out that Autoyast ignored the entered partition number and installed on the default.

    Here are the relevant sections of the XML:
    Code:
                             
               
    <general>
        <ask-list config:type="list">
            <ask>
               <title>Partition for install</title>
               <pathlist config:type="list">
                 <path>partitioning,0,drive,partitions,0,partition_nr</path>
                 <path>partitioning,0,drive,use</path>
               </pathlist>
               <question>Select the partition number For install. WARNING! Partition will be formatted!</question>
               <stage>initial</stage>
               <type>integer</type>
               <default>3</default>
            </ask>
        </ask-list>  
        
        <mode>
          <confirm config:type="boolean">false</confirm>
        </mode>
        
      </general>
      
     
      <partitioning config:type="list">
        <drive>
             
          <disklabel>msdos</disklabel>
          <initialize config:type="boolean">false</initialize>
          
          <partitions config:type="list">
          
            <partition>
              <create config:type="boolean">false</create>
              <crypt_fs config:type="boolean">false</crypt_fs>
              <filesystem config:type="symbol">ext4</filesystem>
              <format config:type="boolean">true</format>
              <fstopt>acl,user_xattr,noatime</fstopt>
              <label>SSUSE-15.2</label>
              <mount>/</mount>
              <mountby config:type="symbol">label</mountby>
              <partition_id config:type="integer">131</partition_id>
              <partition_nr config:type="integer">3</partition_nr>
            </partition>
            
          </partitions>
        
          <type config:type="symbol">CT_DISK</type>
          <use>3</use>
           
        </drive>
      </partitioning>
    What am I missing or doing wrong??

    Thanx for any assistance...

    Richard Rosa

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,746
    Blog Entries
    2

    Default Re: Autoyast question

    The more I thought about what you're trying to do,
    I kept thinking of more info that's likely needed to be successful.

    But first... a couple of things...
    - I don't know if your label "SSUSE" <sic> is really supposed to mean anything... If you're deploying SLES or SLED technically you should be asking your question in the SUSE forums, not here in openSUSE... Although your question likely has no bearing which product you're working on.
    - Before wandering down a road of complexity, you should probably consider a possibly simple problem and likely fix... In the following AutoYaST documentation, it describes how "some products" no longer define installation Stage 1 as different from Stage 2 but without further explanation what those products are or what to look for. I haven't noticed any difference in how openSUSE 15.2 installs from normal downloaded sources, so I don't think it applies here but who knows? You should verify your AutoYaST script is ordered sequentially and properly or otherwise runs properly so that the variables you set in your interactive session are available... If your script runs out of order, your variables might not be set or otherwise available. I imagine there should be a way to instrument the script if needed to generate informative output if necessary.
    https://documentation.suse.com/sles/...e-General-wait

    Aside from the above,
    I assume that you didn't see any errors after installation, the system runs fine but installed in the wrong partition.
    - Curious you don't initialize your disk which means existing disk configurations aren't wiped out and can affect later use
    https://doc.opensuse.org/projects/au...-advanced-wipe

    - I suspect that if your new partition layout is not default, then after Stage 1 which creates the partitions, you need to "keep" the existing layout for your installation to be able to choose which partition to install in. I'm guessing, but if that's how the install has to work, then the following section is important
    https://doc.opensuse.org/projects/au...-advanced-keep

    From what you posted, I also assume you're installing on MBR and not GPT disks which means 4 primary partitions... If different, then that may need to be configured as well.

    HTH and doing a lot of guessing...
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Smile Re: Autoyast question

    Quote Originally Posted by tsu2 View Post
    The more I thought about what you're trying to do,
    I kept thinking of more info that's likely needed to be successful.

    But first... a couple of things...
    - I don't know if your label "SSUSE" <sic> is really supposed to mean anything... If you're deploying SLES or SLED technically you should be asking your question in the SUSE forums, not here in openSUSE... Although your question likely has no bearing which product you're working on.
    - Before wandering down a road of complexity, you should probably consider a possibly simple problem and likely fix... In the following AutoYaST documentation, it describes how "some products" no longer define installation Stage 1 as different from Stage 2 but without further explanation what those products are or what to look for. I haven't noticed any difference in how openSUSE 15.2 installs from normal downloaded sources, so I don't think it applies here but who knows? You should verify your AutoYaST script is ordered sequentially and properly or otherwise runs properly so that the variables you set in your interactive session are available... If your script runs out of order, your variables might not be set or otherwise available. I imagine there should be a way to instrument the script if needed to generate informative output if necessary.
    https://documentation.suse.com/sles/...e-General-wait

    Aside from the above,
    I assume that you didn't see any errors after installation, the system runs fine but installed in the wrong partition.
    - Curious you don't initialize your disk which means existing disk configurations aren't wiped out and can affect later use
    https://doc.opensuse.org/projects/au...-advanced-wipe

    - I suspect that if your new partition layout is not default, then after Stage 1 which creates the partitions, you need to "keep" the existing layout for your installation to be able to choose which partition to install in. I'm guessing, but if that's how the install has to work, then the following section is important
    https://doc.opensuse.org/projects/au...-advanced-keep

    From what you posted, I also assume you're installing on MBR and not GPT disks which means 4 primary partitions... If different, then that may need to be configured as well.

    HTH and doing a lot of guessing...
    TSU
    Thanx for the reply.

    Yes, this is for OpenSUSE (15.2) The extra 'S' in the label is there for a naming convention that was adopted (ALL the partition labels on the disk start with 'S').

    No errors occurred during the installation. I also ran the XML code though the 'validation' routine in the Autoyast GUI, and nothing failed.
    Everything works correctly EXCEPT the partition selected in the <ASK> section is ignored.

    As per the order of specification. The <general> section is specified first, then the <partitioning>. It is possible that the order should be reversed. I'll give that a try (tomorrow).

    The disk is NOT initialized as there are a number of other partitions (some with important data) that should NOT be touched. I only want the partition that is being installed formatted. This is the way it has always worked. I would just like to be able to pick a different partition number for some machines WITHOUT having to modify the XML each time. I'm beginning to think that this MAY not be possible...

    I will also add that the partition I picked in the selection was also a primary (partition 2) and was already formatted as EXT4, with more than enough space (40gb). The disk is a 512gb MBR formatted Solid State disk.

    Autoyast works like my kids. Agrees with what you say and then does what it wants anyway


    Richard Rosa

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,746
    Blog Entries
    2

    Default Re: Autoyast question

    Am wondering if your pre-formatted partition is the cause of your problem.
    A default openSUSE install looks for, or expects free, unformatted (although possibly partitioned) space,although you can of course modify what happens.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Sep 2012
    Posts
    5,914

    Default Re: Autoyast question

    Quote Originally Posted by richardrosa View Post
    Autoyast ignored the entered partition number and installed on the default.
    Code:
                             
               
      <partitioning config:type="list">
        <drive>
             
          <disklabel>msdos</disklabel>
          <initialize config:type="boolean">false</initialize>
          
          <partitions config:type="list">
          
            <partition>
              <create config:type="boolean">false</create>
    ...
              <partition_nr config:type="integer">3</partition_nr>
            </partition>
            
          </partitions>
        
          <type config:type="symbol">CT_DISK</type>
          <use>3</use>
           
        </drive>
      </partitioning>
    Does partition 3 exist? Do you have multiple disks?

  6. #6

    Default Re: Autoyast question

    Quote Originally Posted by arvidjaar View Post
    Does partition 3 exist? Do you have multiple disks?
    Partition 3 exists (as does partition 2, the desired partition). Although the target machines MAY have multiple disks, the machine I have been trying to get this working on does not. There is only the solitary 512gb SSD. The Install image and XML are retrieved from another partition on this drive, so there is not even a Thumb Drive present (which is one of the MANY reasons not to format the ENTIRE disk).

  7. #7

    Default Re: Autoyast question

    Quote Originally Posted by tsu2 View Post
    Am wondering if your pre-formatted partition is the cause of your problem.
    A default openSUSE install looks for, or expects free, unformatted (although possibly partitioned) space,although you can of course modify what happens.

    TSU
    If that were true, then it wouldn't work on the default either (as it is also pre-formatted). However I am giving this a try now. I DID try placing the <general> section at the end rather than the beginning of the XML (as suggested), but it made no difference.

    I have ALWAYS been able to select the partition to format by manually changing the XML. (<partition_nr> and <use> tags). However, I was hoping to find a way around this, as manual editing has resulted in more than a few undesirable results

    Another solution I have though about is to generate a number of XML files, each one for a different partition, then add a bunch of entries in the GRUB menu. This, however seems a bit cumbersome at best...

    Being able to prompt for a partition at install time SEEMED like the right solution, but there is some magic spell that I do not have the incantation for....

    Thanx again for the suggestions...

    Richard Rosa

  8. #8
    Join Date
    Sep 2012
    Posts
    5,914

    Default Re: Autoyast question

    Quote Originally Posted by richardrosa View Post
    Partition 3 exists (as does partition 2, the desired partition).
    Partition 2 is mentioned nowhere in your configuration.

  9. #9

    Default Re: Autoyast question

    Quote Originally Posted by arvidjaar View Post
    Partition 2 is mentioned nowhere in your configuration.
    Correct. Partition 3 is the default. The idea is to allow a change to a DIFFERENT partition other than the default using an input prompt.
    Yes, I CAN change the XML for whatever partition should be defaulted and that works. What is NOT working is when a partition number is prompted for, and the input is something OTHER than the default value specified in <partition_nr> and <use> (which is normally '3').


    What SHOULD happen (at least from what I understand from the documentation) is that the prompted input should replace the values in <partition_nr> and <use> tags. This is NOT happening. Regardless of what is entered at the prompt, Autoyast continues to use the default values.

    As I indicated, I can (and have) manually changed the values of these tags to install on a different partition. This is what I had hoped to get away from...

    Richard Rosa

  10. #10
    Join Date
    Sep 2012
    Posts
    5,914

    Default Re: Autoyast question

    Quote Originally Posted by richardrosa View Post
    The idea is to allow a change to a DIFFERENT partition other than the default using an input prompt.
    Ah, OK, I missed it.
    Quote Originally Posted by richardrosa View Post
    Code:
                             
               
    <general>
        <ask-list config:type="list">
            <ask>
               <title>Partition for install</title>
               <pathlist config:type="list">
                 <path>partitioning,0,drive,partitions,0,partition_nr</path>
                 <path>partitioning,0,drive,use</path>
               </pathlist>
    "drive" seems to be redundant here. "partitioning,0" selects the first "drive" element already.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •