[opensuse-autoinstall] Don't delete a partition, if it doesn't exist...create it.
Hello, some "strange" target for an autoinstallation.... We want a partition on the system to store some settings in it which should not be deleted at a new installation. If the partition is not there it should be created. Doesn't matter if the partition is at the beginning or the end of the harddisk. Any ideas how to do that? Regards Daniel -- Daniel Spannbauer Systemadministration marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
On Wed, Jun 25, 2014 at 3:42 PM, Daniel Spannbauer <ds@marco.de> wrote:
We want a partition on the system to store some settings in it which should not be deleted at a new installation.
If the partition is not there it should be created. Doesn't matter if the partition is at the beginning or the end of the harddisk.
Sorry, been meaning to answer for weeks. It is possible, hope you have found it yourself in the meantime… You can just set a partition to be kept with initialize=false for the drive (http://doc.opensuse.org/projects/autoyast/configuration.html#idm139795988123...) and create=false, format=false for the partition(s) in question (http://doc.opensuse.org/projects/autoyast/configuration.html#idm139795988095...). We use it to keep our /scratch. If you want, I can give you the snippet of our live (12.3) profile next week. -- Kind regards Christopher 'm4z' Holm / 686f6c6d "We must respect the other fellow's religion, but only in the sense and to the extent that we respect his theory that his wife is beautiful and his children smart." --H. L. Mencken -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Am 07/19/2014 11:00 AM, schrieb 686f6c6d:
On Wed, Jun 25, 2014 at 3:42 PM, Daniel Spannbauer <ds@marco.de> wrote:
We want a partition on the system to store some settings in it which should not be deleted at a new installation.
If the partition is not there it should be created. Doesn't matter if the partition is at the beginning or the end of the harddisk.
Sorry, been meaning to answer for weeks. It is possible, hope you have found it yourself in the meantime… You can just set a partition to be kept with initialize=false for the drive (http://doc.opensuse.org/projects/autoyast/configuration.html#idm139795988123...) and create=false, format=false for the partition(s) in question (http://doc.opensuse.org/projects/autoyast/configuration.html#idm139795988095...).
We use it to keep our /scratch. If you want, I can give you the snippet of our live (12.3) profile next week.
Hmmm, create=false only works if there was a partition before the installation. but what if the Disk is brand-new? Or if the disk was partitioned with a different way? Then I have to wipe the complete disk to get my partitioning on that disk. So, I have only to reformat my disk if the partitioning is not as I want it.... Regards Daniel -- Daniel Spannbauer Systemadministration marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
On Wed, Jul 23, 2014 at 11:53 AM, Daniel Spannbauer <ds@marco.de> wrote:
Hmmm,
create=false only works if there was a partition before the installation.
but what if the Disk is brand-new? Or if the disk was partitioned with a different way? Then I have to wipe the complete disk to get my partitioning on that disk.
So, I have only to reformat my disk if the partitioning is not as I want it....
Ok, I misunderstood your initial mail. What you are trying to do isn't easily possible AFAIK. 1. The brand-new case is pretty simple. In that case, you don't have to worry about keeping the partition, you just create a complete layout. 2. The case where you have a known layout and just want to keep that one partition is our case, I have attached the relevant snippets of our profile. (You can even decide during install if /scratch should be kept; the machines get the profile snippets via rules.xml.) A similar case is the one where in your known partition layout you resize your existing partitions and then add your permanently-kept partition (I've never done it, but IIRC it's one of the examples in the docs). 3. The hard case is the whatever-existing layout. - I would assume this doesn't work automatically with non-interactive AutoYAST, because the partitioning is only easy to keep if the layout is already known (see attached files). - So if you only have one or a few existing layouts (f.e. they were all created from the same AutoYAST profile(s)) then you should be fine, this is the "easy" (it is a bit of work…) case #2 above. - If you have a large number of existing layouts, this becomes unmanageable and I would assume reinstalling them as case #1 would be easier. But I might be wrong, this is just how I would try to do it. Merging/streamlining/converging the different cases might be beneficial in the long run, if reinstalling and possible downtime is an option. - Another option might be to use the y2confirm boot parameter during AutoYAST install and then resize and add manually (or to do that from the installed system). -- HTH Christopher 'm4z' Holm / 686f6c6d "We must respect the other fellow's religion, but only in the sense and to the extent that we respect his theory that his wife is beautiful and his children smart." --H. L. Mencken
Am 07/23/2014 02:42 PM, schrieb 686f6c6d:
On Wed, Jul 23, 2014 at 11:53 AM, Daniel Spannbauer <ds@marco.de> wrote:
Hmmm,
create=false only works if there was a partition before the installation.
but what if the Disk is brand-new? Or if the disk was partitioned with a different way? Then I have to wipe the complete disk to get my partitioning on that disk.
So, I have only to reformat my disk if the partitioning is not as I want it....
Ok, I misunderstood your initial mail. What you are trying to do isn't easily possible AFAIK.
1. The brand-new case is pretty simple. In that case, you don't have to worry about keeping the partition, you just create a complete layout. 2. The case where you have a known layout and just want to keep that one partition is our case, I have attached the relevant snippets of our profile. (You can even decide during install if /scratch should be kept; the machines get the profile snippets via rules.xml.) A similar case is the one where in your known partition layout you resize your existing partitions and then add your permanently-kept partition (I've never done it, but IIRC it's one of the examples in the docs). 3. The hard case is the whatever-existing layout. - I would assume this doesn't work automatically with non-interactive AutoYAST, because the partitioning is only easy to keep if the layout is already known (see attached files). - So if you only have one or a few existing layouts (f.e. they were all created from the same AutoYAST profile(s)) then you should be fine, this is the "easy" (it is a bit of work…) case #2 above. - If you have a large number of existing layouts, this becomes unmanageable and I would assume reinstalling them as case #1 would be easier. But I might be wrong, this is just how I would try to do it. Merging/streamlining/converging the different cases might be beneficial in the long run, if reinstalling and possible downtime is an option. - Another option might be to use the y2confirm boot parameter during AutoYAST install and then resize and add manually (or to do that from the installed system).
Hello, we only have two cases: 1. Disk is completley empty or a system without rescue-partition is installed......simply erease the whole disk an prepare it, but now with rescue-partition 2. Disk already has a rescue partition: leave the rescue partition untouched, with the other partitions do what you have to do But I thin you are right...that couldn't be done by autoyast.... Regards Daniel -- Daniel Spannbauer Systemadministration marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
On Wed, Jul 23, 2014 at 04:11:31PM +0200, Daniel Spannbauer wrote:
we only have two cases:
1. Disk is completley empty or a system without rescue-partition is installed......simply erease the whole disk an prepare it, but now with rescue-partition
2. Disk already has a rescue partition: leave the rescue partition untouched, with the other partitions do what you have to do
But I thin you are right...that couldn't be done by autoyast....
Not easily, but using pre scripts and modifying your autoyast file you could probably do it. I have stuff to handle cases where if an existing host is being rejumped and matches some validation (some basic "security" features) and has valid partitions, then the autoyast file has the <partitioning-advanced> bits and re-uses partitions, else it uses regular <partitioning> logic and wipes/initializes the disk. So, in theory, you could do a pre-script to look for existing partitions, and if you see one (and I'd validate it by mounting any visible partitions and looking for (a) specific file(s) to make sure it is a rescue partition, unless it uses a different partition type, then that's easy to check) and have the resulting xml written based on seeing said valid rescue partition or not. But I also do a lot of pre-processing of the xml in our current imaging process. -- Mike Marion-Unix SysAdmin/Sr. Staff IT Engineer-http://www.qualcomm.com Homer (Singing to Chumbawumba's "Tubthumping"): "I get knocked down. I get, knocked down again. You're never gonna knock me down." ... "I take a whiskey drink, I take a chocolate drink, and when I have to pee, I use the kitchen sink. I sing the song that reminds me I'm a urinating guy. Left, right, left, right..." => Simpsons -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
participants (3)
-
686f6c6d
-
Daniel Spannbauer
-
Mike Marion