RE: removing rpms in %pre during kickstart upgrade installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So I’ve gotten a bit farther, but I am unable to get the kernel to load the kickstart file off the hard drive. The partition map on the HD is /dev/hda1 is /boot, and /dev/hda2 is /. I’ve put ks=hd:hda1:/ks.cfg in the append line of the relevant grub entry, and it never seems to find it, even though that’s where I’ve placed ks.cfg (in /boot when the system is booted normally) Right now the grub entry looks like:

 

title Upgrade

root (hd0,0)

kernel /vmlinuz-upgrade ro root=LABEL=/

initrd /initrd-upgrade.img

append lang= ramdisk_size=8192 vga=788 ks=hd:hda1/ks.cfg upgradeany

 

-S.

 


From: kickstart-list-bounces@xxxxxxxxxx [mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Shabazian, Chip
Sent: Friday, October 06, 2006 11:46 AM
To: Discussion list about Kickstart
Subject: RE: removing rpms in %pre during kickstart upgrade installation

 

If you can copy a file onto the device and execute it, then you can do the entire build with that one file.  Copy a script that removes the unwanted rpms, installs the build kernel, sets up grub, and reboots the box.  The server will build completely unattended and the unwanted rpms will already be removed.

 

Chip

 


From: kickstart-list-bounces@xxxxxxxxxx [mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Sean Goller
Sent: Friday, October 06, 2006 11:40 AM
To: Discussion list about Kickstart
Subject: RE: removing rpms in %pre during kickstart upgrade installation

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.

 

-Sean.

 


From: kickstart-list-bounces@xxxxxxxxxx [mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Shabazian, Chip
Sent: Friday, October 06, 2006 11:32 AM
To: Discussion list about Kickstart
Subject: RE: removing rpms in %pre during kickstart upgrade installation

 

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.

 

Chip

 


From: kickstart-list-bounces@xxxxxxxxxx [mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Sean Goller
Sent: Friday, October 06, 2006 11:22 AM
To: kickstart-list@xxxxxxxxxx
Subject: removing rpms in %pre during kickstart upgrade installation

Hi,

            I’m currently embroiled in a project to upgrade a RHEL3 installation to RHEL4 unattended via kickstart.

 

            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,

 

            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.

 

 

-Sean.


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux