On Feb 25, 2015 10:00 PM, "Peter" <peter at pajamian.dhs.org> wrote:> > I haven't tried this, but see if it works: > yum shell > remove * > install @minimal > run > >I've not tried this to see the effect but don't forget in el6 there is the yum history database... yum history list will show all yum operations that have happened on the system. In principle you could do yum history rollback 1 ... That wouldn't clear up config data of course. For testing stuff VM use and templates or snapshots are essential tools. Or create a bare minimal kick start ... Doesn't take long to do a fresh install to a clean system that way.
The best way to do this is a new minimal install either in the GUI installer or with kickstart. And build up from there. If you do an install to e.g. CentOS-base.qcow2, that image already has machine-id and hostname set. While not running a VM, use guestfish to mount the qcow2, and make /etc/machine-id empty. Now, only use this base.qcow2 as a backing image. That is, never use it directly in a VM. Use qemu-img create -b base.qcow2 -f qcow2 guest1.qcow2 qemu-img create -b base.qcow2 -f qcow2 guest2.qcow2 qemu-img create -b base.qcow2 -f qcow2 guest3.qcow2 Now use the guestn.qcow2 in the VM. And at first boot, the machine-id will be populated. I'm not sure of any negative consequences of not doing this, but if you want to use remote journalling it's necessary so that the single journal can keep machines uniquely identified (even when changing the hostname). http://fedoraproject.org/wiki/Changes/Remote_Journal_Logging https://kashyapc.fedorapeople.org/virt/lc-2012/snapshots-handout.html Extra info: Anaconda uses this on lives to do installations (quite a few of these options are consolidated with -a): rsync -pogAXtlHrDx -- Chris Murphy
Am 26.02.2015 um 08:38 schrieb James Hogarth <james.hogarth at gmail.com>:> On Feb 25, 2015 10:00 PM, "Peter" <peter at pajamian.dhs.org> wrote: >> >> I haven't tried this, but see if it works: >> yum shell >> remove * >> install @minimal >> run >> >> > > I've not tried this to see the effect but don't forget in el6 there is the > yum history database... > > yum history list will show all yum operations that have happened on the > system. > > In principle you could do yum history rollback 1 ... That wouldn't clear up > config data of course.or # rpm -qa --last Lists the last installed package first. That way back would be one way to strip it down. I have here some minimal systems with about 200 packages installed ( rpm -qa | wc ). -- LF
Le 26/02/2015 10:30, Leon Fauster a ?crit :> # rpm -qa --last > > Lists the last installed package first. That way back would be one way to strip it down.Here's a completely empiric approach, tried out on three different machines. It's not perfect, but it's already quite usable : https://kikinovak.wordpress.com/2015/02/26/elaguer-un-systeme-centos/ Cheers, Niki -- Microlinux - Solutions informatiques 100% Linux et logiciels libres 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32