[opensuse-autoinstall] Install / Copy Question
Hello All, 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 -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
King, Richard (CE1 UNIX Admin) wrote:
Hello All,
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
Hi Rick, 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@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Bad form to reply to myself, but I worded my previous reply poorly. Use pre/post 'chroot' to install an RPM. If you need that driver at install time, you also need to hack the kernel modules in initrd.img. Send me an email if you need some pointers, it's not rocket science, but it's not trivial either. Best Regards, Lee -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Copying files to the target system is best done in the chroot script, where you have the network, as well as the installed filesystem. Pre scripts are too early (the filesystems have not been created at that point), an post scripts are too late, as you've lost the install network by then. You will probably need to retrieve the file using wget, unless you're installing from DVD / CD. Yan
On 08/06/2007 at 21:55, in message <F4BFA40B06FA5A498AFA998AD4A4E6AC03BC0E22@idbexc02.americas.cpqcorp.net>, "King, Richard (CE1 UNIX Admin)" <rking@hp.com> wrote:
Hello All,
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
-- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
-- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (3)
-
King, Richard (CE1 UNIX Admin)
-
Lee Mayes
-
Yan Fitterer