<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=313133018-06102006><FONT face=Arial
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=313133018-06102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=313133018-06102006><FONT face=Arial
color=#0000ff size=2>Chip</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> kickstart-list-bounces@redhat.com
[mailto:kickstart-list-bounces@redhat.com] <B>On Behalf Of </B>Sean
Goller<BR><B>Sent:</B> Friday, October 06, 2006 11:22 AM<BR><B>To:</B>
kickstart-list@redhat.com<BR><B>Subject:</B> removing rpms in %pre during
kickstart upgrade installation<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-Sean.</SPAN></FONT></P></DIV></BODY></HTML>