<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: kickstart issues in %post section in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156930#M31853</link>
    <description>Justin: It won't even copy the file from cdrom to /opt so that I can execute /bin/bash -x /opt/rhel_post.bash&lt;BR /&gt;&lt;BR /&gt;In a --nochroot environment, I've ascertained what is mounted &amp;amp; available:&lt;BR /&gt;&lt;BR /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;BR /&gt;/dev                    127812         0    127812   0% /dev&lt;BR /&gt;/tmp/loop0               83264     83264         0 100% /mnt/runtime&lt;BR /&gt;/dev/System/root       6094400   1288952   4490876  23% /mnt/sysimage&lt;BR /&gt;/dev/System/tmp        4062912    139396   3713804   4% /mnt/sysimage/tmp&lt;BR /&gt;/dev/System/csm         507748     18768    462766   4% /mnt/sysimage/csm&lt;BR /&gt;/tmp/sda1               124427     11727    106276  10% /mnt/sysimage/boot&lt;BR /&gt;/dev                    127812         0    127812   0% /mnt/sysimage/dev&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So, logic would tell me that I could mount my cdrom up like so:&lt;BR /&gt;&lt;BR /&gt;/mnt/sysimage/bin/mount /dev/cdrom /mnt/sysimage/media&lt;BR /&gt;&lt;BR /&gt;But this does not work....&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 07 Mar 2008 02:47:06 GMT</pubDate>
    <dc:creator>Dakotak1d</dc:creator>
    <dc:date>2008-03-07T02:47:06Z</dc:date>
    <item>
      <title>kickstart issues in %post section</title>
      <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156926#M31849</link>
      <description>Gurus,&lt;BR /&gt;&lt;BR /&gt;I've been successfully doing network kickstarts for some time now, but needed to create an "all-inclusive" CDROM/(virtual CDROM via ISO image) kickstart for automated builds with no PXE/NFS/HTTP services to a physical box or VMware VM.  &lt;BR /&gt;&lt;BR /&gt;I generate the ISO file with custom ks.cfg &amp;amp; a directory with additional rpms &amp;amp; scripts....it boots up just fine, does what the kickstart file wants it to, up to the %post section, then stuff breaks down bigtime.&lt;BR /&gt;&lt;BR /&gt;I really want to just set a few variables then cp the main post script from the cdrom to the system &amp;amp; execute it. I have put several echos in the %post to find out what's going on. Apparently there is a very limited shell environment at this stage...why is this different from a network build?? (Here's my post section, simplified way beyond the original so I could troubleshoot it:&lt;BR /&gt;&lt;BR /&gt;%post --nochroot&lt;BR /&gt;echo "Here is what we have mounted" &amp;gt; /mnt/sysimage/opt/POST.txt&lt;BR /&gt;df -k &amp;gt;&amp;gt; /mnt/sysimage/opt/POST.txt&lt;BR /&gt;cp /cdrom/third-party/rhel_post.bash /mnt/sysimage/opt/rhel_post.bash&lt;BR /&gt;%post&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;echo "Entering POST section" &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;echo $SHELL &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;ls -la /opt &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;#export METHOD=NETWORK&lt;BR /&gt;export METHOD=CDROM&lt;BR /&gt;echo "METHOD=${METHOD}" &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;export VER=RHEL5_32&lt;BR /&gt;echo "VERSION=${VER}" &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;#&lt;BR /&gt;#/bin/mount -t iso96660 -o ro /dev/cdrom /cdrom&lt;BR /&gt;[ -f /opt/rhel_post.bash ] &amp;amp;&amp;amp; cd /opt&lt;BR /&gt;bash -x /opt/rhel_post.bash ${VER} ${METHOD} &amp;gt;&amp;gt; /opt/POST.txt 2&amp;gt;&amp;amp;1&lt;BR /&gt;#####################&lt;BR /&gt;&lt;BR /&gt;The ONLY output I get are a few of the echos to a file called /opt/POST.txt?    (yes, with a ? at the end of it - dunno where that comes from)&lt;BR /&gt;&lt;BR /&gt;The rhel_post.bash script of course never gets copied or run... &lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Mar 2008 22:48:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156926#M31849</guid>
      <dc:creator>Dakotak1d</dc:creator>
      <dc:date>2008-03-06T22:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: kickstart issues in %post section</title>
      <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156927#M31850</link>
      <description>Before starting to troubleshoot this issue, I want to ask you why do you use that script to write information that you can obtain from /etc/redhat-release and /root/anaconda-ks.cfg?</description>
      <pubDate>Thu, 06 Mar 2008 23:15:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156927#M31850</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2008-03-06T23:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: kickstart issues in %post section</title>
      <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156928#M31851</link>
      <description>I don't have much experience with custom dvd/cd's so just throwing this out there.  Have you tried giving the full path for bash or possibly sh?&lt;BR /&gt;&lt;BR /&gt;/bin/bash -x ........</description>
      <pubDate>Thu, 06 Mar 2008 23:46:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156928#M31851</guid>
      <dc:creator>Justin_99</dc:creator>
      <dc:date>2008-03-06T23:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: kickstart issues in %post section</title>
      <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156929#M31852</link>
      <description>Yes, I realize I can get that info by parsing those 2 files on the server that has just been built. I support multiple versions of RHEL,  therefore I have multiple versions of ks.cfg files anyway - so if they are already unique, I find it very easy to simply pass those arguments to the common rhel_post.bash script, rather than parsing it. 6 of 1, half dozen the other. I wish the ks.cfg file was actually scriptable themselves (beyond the %pre &amp;amp; %post sections) &amp;amp; I would maintain a single copy.&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Mar 2008 23:51:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156929#M31852</guid>
      <dc:creator>Dakotak1d</dc:creator>
      <dc:date>2008-03-06T23:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: kickstart issues in %post section</title>
      <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156930#M31853</link>
      <description>Justin: It won't even copy the file from cdrom to /opt so that I can execute /bin/bash -x /opt/rhel_post.bash&lt;BR /&gt;&lt;BR /&gt;In a --nochroot environment, I've ascertained what is mounted &amp;amp; available:&lt;BR /&gt;&lt;BR /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;BR /&gt;/dev                    127812         0    127812   0% /dev&lt;BR /&gt;/tmp/loop0               83264     83264         0 100% /mnt/runtime&lt;BR /&gt;/dev/System/root       6094400   1288952   4490876  23% /mnt/sysimage&lt;BR /&gt;/dev/System/tmp        4062912    139396   3713804   4% /mnt/sysimage/tmp&lt;BR /&gt;/dev/System/csm         507748     18768    462766   4% /mnt/sysimage/csm&lt;BR /&gt;/tmp/sda1               124427     11727    106276  10% /mnt/sysimage/boot&lt;BR /&gt;/dev                    127812         0    127812   0% /mnt/sysimage/dev&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So, logic would tell me that I could mount my cdrom up like so:&lt;BR /&gt;&lt;BR /&gt;/mnt/sysimage/bin/mount /dev/cdrom /mnt/sysimage/media&lt;BR /&gt;&lt;BR /&gt;But this does not work....&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Mar 2008 02:47:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156930#M31853</guid>
      <dc:creator>Dakotak1d</dc:creator>
      <dc:date>2008-03-07T02:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: kickstart issues in %post section</title>
      <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156931#M31854</link>
      <description>The %post section of my ks.cfg now looks like this: &lt;BR /&gt;&lt;BR /&gt;%post --nochroot&lt;BR /&gt;/mnt/sysimage/bin/mount /dev/cdrom /mnt/sysimage/media&lt;BR /&gt;echo "Here is what we have mounted" &amp;gt; /mnt/sysimage/opt/POST.txt&lt;BR /&gt;df -k &amp;gt;&amp;gt; /mnt/sysimage/opt/POST.txt&lt;BR /&gt;/mnt/sysimage/bin/cp /media/third-party/rhel_post.bash /mnt/sysimage/opt/rhel_post.bash&lt;BR /&gt;%post&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;echo "Entering POST section" &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;echo $SHELL &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;ls -la /opt &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;#export METHOD=NETWORK&lt;BR /&gt;export METHOD=CDROM&lt;BR /&gt;echo "METHOD=${METHOD}" &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;export VER=RHEL5_32&lt;BR /&gt;echo "VERSION=${VER}" &amp;gt;&amp;gt; /opt/POST.txt&lt;BR /&gt;#&lt;BR /&gt;[ -f /opt/rhel_post.bash ] &amp;amp;&amp;amp; cd /opt&lt;BR /&gt;bash -x /opt/rhel_post.bash ${VER} ${METHOD} &amp;gt;&amp;gt; /opt/POST.txt 2&amp;gt;&amp;amp;1&lt;BR /&gt;#####################&lt;BR /&gt;&lt;BR /&gt;CONTENTS of output file: /opt/POST.txt? :&lt;BR /&gt;&lt;BR /&gt;Here is what we have mounted&lt;BR /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;BR /&gt;/dev                    127812         0    127812   0% /dev&lt;BR /&gt;/tmp/loop0               83264     83264         0 100% /mnt/runtime&lt;BR /&gt;/dev/System/root       6094400   1288952   4490876  23% /mnt/sysimage&lt;BR /&gt;/dev/System/tmp        4062912    139396   3713804   4% /mnt/sysimage/tmp&lt;BR /&gt;/dev/System/csm         507748     18768    462766   4% /mnt/sysimage/csm&lt;BR /&gt;/tmp/sda1               124427     11727    106276  10% /mnt/sysimage/boot&lt;BR /&gt;/dev                    127812         0    127812   0% /mnt/sysimage/dev&lt;BR /&gt;Entering POST section&lt;BR /&gt;/bin/bash&lt;BR /&gt;total 24&lt;BR /&gt;drwxr-xr-x  2 root root 4096 Mar  6 19:00 .&lt;BR /&gt;drwxr-xr-x 23 root root 4096 Mar  6 19:00 ..&lt;BR /&gt;-rw-r--r--  1 root root  625 Mar  6 19:00 POST.txt&lt;BR /&gt;METHOD=CDROM&lt;BR /&gt;VERSION=RHEL5_32&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Mar 2008 13:52:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156931#M31854</guid>
      <dc:creator>Dakotak1d</dc:creator>
      <dc:date>2008-03-07T13:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: kickstart issues in %post section</title>
      <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156932#M31855</link>
      <description>Oops yeah guess I overlooked that detail. Again I do not have much experience with "self contained" dvd's and post scripting.  Is it possible that maybe the device links for /dev/cdrom are just not there?  Possibly try /dev/hda as the device.  One would think they would be there since the system has for the most part finished installing.&lt;BR /&gt;&lt;BR /&gt;# ls -ld /dev/cdrom&lt;BR /&gt;lrwxrwxrwx 1 root root 3 Sep 10 12:45 /dev/cdrom -&amp;gt; hda&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Mar 2008 19:45:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156932#M31855</guid>
      <dc:creator>Justin_99</dc:creator>
      <dc:date>2008-03-07T19:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: kickstart issues in %post section</title>
      <link>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156933#M31856</link>
      <description>Mystery solved. A pitfall of working in a joint windows/linux environment.DOS put special characters in the ks.cfg file that I did not see &amp;amp; had me chasing down other avenues. After running ks.cfg through dos2unix, which strips them out, I was good to go: dos2unix ks.cfg &amp;gt; ks.cfg.clean; mv ks.cfg.clean ks.cfg</description>
      <pubDate>Fri, 07 Mar 2008 21:30:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/kickstart-issues-in-post-section/m-p/4156933#M31856</guid>
      <dc:creator>Dakotak1d</dc:creator>
      <dc:date>2008-03-07T21:30:41Z</dc:date>
    </item>
  </channel>
</rss>

