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.
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/12-SP3/html/SLES-all/configuration.html#CreateProfile-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.
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/autoyast/#ay-partition-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.
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
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.
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).
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…
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…
BINGO! The extra ‘drive’ in the path was what was keeping the magic from happening. Removed it, and now Autoyast bows to my wishes!
I’m not sure why the validator didn’t call it out, but things are now working the way I want it to.
Well, I spoke a little too soon. The install went to to the partition selected, but the default partition was totally removed (de allocated). Not exactly the plan. Looks like there is some other setting that needs to change as well…
Expert partitioning implies that you define exact disk configuration, so YaST assumes that only partitions listed in your profile are present. You can avoid formatting existing partitions, but you must at least list them.
You said earlier that you have very strict and well defined partition layout, so you should be able to describe it in autoyast profile.
Humm, the ONLY partition removed WAS the one listed (the default).
I think I’m gonna put this on the back-burner for a while. It was a nice idea, but the amount of effort to get it functional FAR exceeds the time that the procedure it replaces takes…