[opensuse-autoinstall] chroot-scripts on SLES

Hi there... I need to run some scripts after the partitions are formatted on SLES 11SP1. I tried "chroot-scripts", but it's not being executed at all. Is there a known limitation for SLES11 SP1? The other types of scripts are being executed just fine (pre, post, init scripts). -- -- Erico -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org

On 4/27/11 1:54 PM, "Erico Mendonça" <erico.mendonca@gmail.com> wrote:
I need to run some scripts after the partitions are formatted on SLES 11SP1. I tried "chroot-scripts", but it's not being executed at all.
Is there a known limitation for SLES11 SP1? The other types of scripts are being executed just fine (pre, post, init scripts).
I have chroot-scripts in production with SP1 and they are working just fine for me, FWIW. Tim -- Tim Kirby 651-605-9074 trk@cray.com Cray Inc. Information Systems -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org

2011/4/27 Tim Kirby <trk@cray.com>:
On 4/27/11 1:54 PM, "Erico Mendonça" <erico.mendonca@gmail.com> wrote:
I need to run some scripts after the partitions are formatted on SLES 11SP1. I tried "chroot-scripts", but it's not being executed at all.
Is there a known limitation for SLES11 SP1? The other types of scripts are being executed just fine (pre, post, init scripts).
I have chroot-scripts in production with SP1 and they are working just fine for me, FWIW.
That is weird. I've checked and rechecked my XML files, and the tags appears to be correct, but they're not executed at all. According to the official docs, this should be it, under the main profile tag: <scripts> <chroot-scripts config:type="list"> <script> <filename>test.sh</filename> <interpreter>shell</interpreter> <source> <![CDATA[ echo "blah" ]]> </source> </script> </chroot-scripts> </scripts> And indeed the AutoinstScripts.ycp module checks and should execute them as well. In the logs, I see pre/post/init scripts being executed, but I see no mention of chroot-scripts at all. Could you send me one of your working examples (with chroot-scripts, that is) ? -- -- Erico -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org

2011/4/28 Erico Mendonça <erico.mendonca@gmail.com>:
2011/4/27 Tim Kirby <trk@cray.com>:
On 4/27/11 1:54 PM, "Erico Mendonça" <erico.mendonca@gmail.com> wrote:
I need to run some scripts after the partitions are formatted on SLES 11SP1. I tried "chroot-scripts", but it's not being executed at all.
Is there a known limitation for SLES11 SP1? The other types of scripts are being executed just fine (pre, post, init scripts).
I have chroot-scripts in production with SP1 and they are working just fine for me, FWIW.
That is weird. I've checked and rechecked my XML files, and the tags appears to be correct, but they're not executed at all.
According to the official docs, this should be it, under the main profile tag: <scripts> <chroot-scripts config:type="list"> <script> <filename>test.sh</filename> <interpreter>shell</interpreter> <source> <![CDATA[ echo "blah" ]]> </source> </script> </chroot-scripts> </scripts>
And indeed the AutoinstScripts.ycp module checks and should execute them as well. In the logs, I see pre/post/init scripts being executed, but I see no mention of chroot-scripts at all.
Could you send me one of your working examples (with chroot-scripts, that is) ?
I'm not sure if it's true for SLES11, but in openSUSE 11.4 you have the following situation: chroot = after the first installation has finished but before the bootloader will be installed postpartitioning = after the partitions are formatted, just before the first package will be installed (but after the installation of the new "deploy images" (lzma.... packages) I use the postpartitioning script to copy some additional stuff from my installation medium to the new system, e.g. <postpartitioning-scripts config:type="list"> <script> <filename>postpart2.sh</filename> <interpreter>shell</interpreter> <debug config:type="boolean">false</debug> <feedback config:type="boolean">true</feedback> <source><![CDATA[ #!/bin/bash mkdir /mnt/config InstMode=$(grep Cmdline /etc/install.inf | cut -d "=" -f2- | cut -d " " -f1 ) FULLURL=$(grep Zypp /etc/install.inf | awk 'BEGIN { FS = "//" } ; {print $2}' ) URL=$(echo $FULLURL | cut -d "/" -f1 ) URLPATH=$(echo $FULLURL | cut -d "/" -f2- ) if [ "$InstMode" = "nfs" ]; then mount -o nolock -t nfs $URL:/$URLPATH /download else mount /dev/sr0 /download fi cp -a /download/add-on/s4e /mnt/opt umount /download ]]> </source> </script> </postpartitioning-scripts> -- Best regards, Matthias -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org

On Thu, Apr 28, 2011 at 5:00 PM, Matthias Praunegger <mpraunegger@d4e.at> wrote:
I'm not sure if it's true for SLES11, but in openSUSE 11.4 you have the following situation: chroot = after the first installation has finished but before the bootloader will be installed postpartitioning = after the partitions are formatted, just before the first package will be installed (but after the installation of the new "deploy images" (lzma.... packages)
I use the postpartitioning script to copy some additional stuff from my installation medium to the new system, e.g.
postpartitioning-scripts are not executed on SLES, the official docs say clearly "not SLES11" :( Last try: I'm copying the full example from the docs verbatim... -- -- Erico -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org

2011/4/28 Erico Mendonça <erico.mendonca@gmail.com>:
On Thu, Apr 28, 2011 at 5:00 PM, Matthias Praunegger <mpraunegger@d4e.at> wrote:
I'm not sure if it's true for SLES11, but in openSUSE 11.4 you have the following situation: chroot = after the first installation has finished but before the bootloader will be installed postpartitioning = after the partitions are formatted, just before the first package will be installed (but after the installation of the new "deploy images" (lzma.... packages)
I use the postpartitioning script to copy some additional stuff from my installation medium to the new system, e.g.
postpartitioning-scripts are not executed on SLES, the official docs say clearly "not SLES11" :(
Last try: I'm copying the full example from the docs verbatim...
Oh dear, my mistake. I'm been almost certain that there has been some restriction. Nevertheless, what do you exactly want to do with your script? I just use the postpartitioning-scripts, because at this stage its the only way to have full access to the installation medium. -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org

On Thu, Apr 28, 2011 at 6:02 PM, Matthias Praunegger <mpraunegger@d4e.at> wrote:
Oh dear, my mistake. I'm been almost certain that there has been some restriction. Nevertheless, what do you exactly want to do with your script? I just use the postpartitioning-scripts, because at this stage its the only way to have full access to the installation medium.
I have a pre-script that finds an specific partition, mounts it and creates a tar.gz from a few control files before formatting the disk in /tmp. Then, I need to copy those files back the installed system. This needs to be done before the first boot, or else I'll lose the files (they're on the ramdisk...). The best moment would be the postpartitioning-scripts, but since they're not available on SLES11, I resorted to chroot-scripts... which didn't get executed at all :( -- -- Erico -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org

on Thursday 28 April 2011 Erico Mendonça wrote:
That is weird. I've checked and rechecked my XML files, and the tags appears to be correct, but they're not executed at all.
chroot-scripts work fine actually. There must be something wrong in the XML.
According to the official docs, this should be it, under the main profile tag: <scripts>
you only have one <scripts> section right? If you have more than one, the last one will win ...
<chroot-scripts config:type="list">
... same for chroot-scripts section. Don't have more than one.
<script> <filename>test.sh</filename>
do you have more scripts with that filename? Autoyast will not execute a script for a second time unless you set <rerun ...> to true.
<interpreter>shell</interpreter> <source> <![CDATA[ echo "blah" ]]> </source>
with that script you won't see too many result. Try it with "debug" and "feedback" set to true. With your script above a popup will appear.
Could you send me one of your working examples (with chroot-scripts, that is) ?
they work in the same way like all other scripts. There are examples in the docs. If you checked everything above and it looks fine, I'd like to see your complete XML file if possible. -- ciao, Uwe Gansert Uwe Gansert SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (4)
-
Erico Mendonça
-
Matthias Praunegger
-
Tim Kirby
-
Uwe Gansert