Mailinglist Archive: opensuse-autoinstall (49 mails)
| < Previous | Next > |
Re: [opensuse-autoinstall] Install / Copy Question
- From: Lee Mayes <autoinst@xxxxxxxxxxx>
- Date: Fri, 08 Jun 2007 17:50:07 -0400
- Message-id: <4669CF0F.9050000@xxxxxxxxxxx>
King, Richard (CE1 UNIX Admin) wrote:
We're deploying SLES9-SP3 (very similar to NLD9) on some VM's hosted by ESX 3.X. SLES9-SP3/RHEL4-U3 VM's need a SCSI patch to work correctly with ESX if you're using a SAN (long story omitted). The bottom line is in pre-init, the installing system will be mounted under /mnt. So here's what I did:
1) crack open the initrd.img of SLES9-SP3, drop the RPM in the root level of initrd.img
2) in autoyast.xml, use pre-init to copy it to the root file system of the installed box, in post-init I rpm install it (with parms of your choice):
<script>
<chrooted config:type="boolean">false</chrooted>
<filename>ESX3_fix</filename>
<source>
<![CDATA[
# This script applies the ESX MPT SCSI RPM Fix for SLES9 VM's
test -r /mptscsi.rpm || exit 0
cp /mptscsi.rpm /mnt/tmp
]]>
</source>
</script>
<script>
<chrooted config:type="boolean">true</chrooted>
<filename>chrooted_ESX3_fix</filename>
<source>
<![CDATA[
# This script applies the ESX MPT SCSI RPM Fix for SLES9 VM's
test -r /tmp/mptscsi.rpm || exit 0;
/bin/rpm -iv /tmp/mptscsi.rpm >>/var/log/LinuxCOE-mpt.log 2>&1
cd /boot
rm initrd
ln -s initrd-2.6.5-7.244-default initrd
]]>
</source>
</script>
That's one way to shave the yak, I'm sure there are more. The test -r's are there because I use the same autoyast.xml to install on real hardware, and they won't have that RPM poked into their initrd and need to fail gracefully.
Best Regards,
Lee
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
Hello All,Hi Rick,
I am installing NLD9 via autoyast, which I've been using for a long
time, and does work very well. However, I have a new RPM to add, but the
only catch is that the rpm will not install unless the "--force" option
is used, if I were to install the rpm by hand with the "--force" option,
the rpm will install. I did edit the control file accordingly and added
the new rpm. After the install is finshed, the new rpm is listed when I
run "rpm -qa", however, the file is not present. I was curious if there
was a way to use the "--force" option during the autoyast install
process for the software section. If not, I could copy the files needed
onto the target machine during the autoyast install. This leads me to my
next question. If I need to copy a binary file to a specific directory
on the target machine, what is the best way to to accomplish this task
during the autoyast install? As a test, I wrote a script in the
pre-script section of the control file to "cp -p binary_file /usr/sbin",
which didn't work. Then I used the absolute path of the binary_file, "cp
-p /local/SuSE/i386/nld9/binary_file /usr/sbin/binary_file", which
didn't work either.
**Background**
The new rpm that I am referring to is the new tg3 NIC driver which I
created an rpm from a source rpm. The old tg3 driver will not work with
the new workstations.
Help with this problem would be greatly appreciated.
--
Rick King
We're deploying SLES9-SP3 (very similar to NLD9) on some VM's hosted by ESX 3.X. SLES9-SP3/RHEL4-U3 VM's need a SCSI patch to work correctly with ESX if you're using a SAN (long story omitted). The bottom line is in pre-init, the installing system will be mounted under /mnt. So here's what I did:
1) crack open the initrd.img of SLES9-SP3, drop the RPM in the root level of initrd.img
2) in autoyast.xml, use pre-init to copy it to the root file system of the installed box, in post-init I rpm install it (with parms of your choice):
<script>
<chrooted config:type="boolean">false</chrooted>
<filename>ESX3_fix</filename>
<source>
<![CDATA[
# This script applies the ESX MPT SCSI RPM Fix for SLES9 VM's
test -r /mptscsi.rpm || exit 0
cp /mptscsi.rpm /mnt/tmp
]]>
</source>
</script>
<script>
<chrooted config:type="boolean">true</chrooted>
<filename>chrooted_ESX3_fix</filename>
<source>
<![CDATA[
# This script applies the ESX MPT SCSI RPM Fix for SLES9 VM's
test -r /tmp/mptscsi.rpm || exit 0;
/bin/rpm -iv /tmp/mptscsi.rpm >>/var/log/LinuxCOE-mpt.log 2>&1
cd /boot
rm initrd
ln -s initrd-2.6.5-7.244-default initrd
]]>
</source>
</script>
That's one way to shave the yak, I'm sure there are more. The test -r's are there because I use the same autoyast.xml to install on real hardware, and they won't have that RPM poked into their initrd and need to fail gracefully.
Best Regards,
Lee
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
| < Previous | Next > |