<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.emailstyle17
{font-family:Arial;
color:windowtext;}
span.EmailStyle18
{font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Unfortunately I am constrained and cannot
do anything that involves something other than booting with a CD or copying a
file onto the device and having it executed. The only other possibility is if,
like you said, I could boot with the kickstart kernel and run a script to
remove the rpms then run the installation initrd. But that seems like even more
hoops than my original attempt.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>-Sean.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
kickstart-list-bounces@redhat.com [mailto:kickstart-list-bounces@redhat.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Shabazian, Chip<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, October 06, 2006
11:32 AM<br>
<b><span style='font-weight:bold'>To:</span></b> Discussion list about
Kickstart<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: removing rpms in %pre
during kickstart upgrade installation</span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>I'm not sure how you are starting the
kickstart, but the way I would probably do this is to simply remove the rpms
BEFORE kickstarting the box. As long as I was touching the box anyway, I
would copy the kickstart kernel down to the box, and set it up in grub to
boot. This way you would still be only touching each box once.</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Chip</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabIndex=-1>
</span></font></div>
<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
kickstart-list-bounces@redhat.com [mailto:kickstart-list-bounces@redhat.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Sean Goller<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, October 06, 2006
11:22 AM<br>
<b><span style='font-weight:bold'>To:</span></b> kickstart-list@redhat.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> removing rpms in %pre
during kickstart upgrade installation</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>
I’m currently embroiled in a project to upgrade a RHEL3 installation to
RHEL4 unattended via kickstart.</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>
I need to do some cleanup work in the %pre section on the existing
installation. (installation state is known and fixed) More specifically, I need
to remove some rpms. I have tried this two ways. First, I tried using rpm
–r to reset the root of the effective filesystem to /mnt/sysimage (I
mount the filesystem manually) but that didn’t seem to work for some
reason. What I’m doing now is mounting the partition, writing a script
(removerpms.sh) into /mnt/sysimage/tmp, then running chroot /mnt/sysimage
/tmp/removerpms.sh. Afterwards I umount the partition. The rpms are
successfully removed, however anaconda subsequently errors out because the umount
has failed. I found that /proc was getting mounted as a side effect of the
script running, so I added a umount for that. Here’s the weird part: If I
deliver the kickstart file over the network, and use an HTTP-based install
source, it works. However, if I change the kickstart file to use CD
installation, and put it on the CD, it errors out because umount doesn’t
work. /etc/mtab reveals nothing mounted other than /mnt/sysimage, </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>
Any thoughts on how to resolve this? I’m about to compile a static
version of lsof to check on this, but if anyone has successfully solved this
problem before (removing rpms in %pre via kickstart) I’d appreciate some
pointers. Google has not been good to me.</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>-Sean.</span></font></p>
</div>
</body>
</html>