Removing non-present devices from Windows 2008

I had a W2K8 vm where I was adding / removing NICs like they were going out of fashion. As a result by the end of it I had a mess of non-present devices.

So how do you fix that mess?

I found (or more accurately was advised) that I can start a command prompt and

SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
devmgmt.msc

Click on the ‘view’ / ‘Show Hidden devices’

Hey presto, there the were.

Then it’s just a case of right-click on the devices you no longer want and select uninstall.

End result is nice and neat.

Minimal Centos 6 build

I was in need of creating a minimal Centos6 system, here’s how I did it in case anyone else is interested.

kickstart for minimal Centos 6 install.   Hit tab at the boot screen

In this case as my environment doesn’t have a dhcp server I pass the ip of the new machine as a kernel option such that the request for the kickstart file will work,

Here is the kickstart file that I used.

install

text

lang en_US

keyboard us

bootloader –location=mbr –append=”crashkernel=auto rhgb vga=791 quiet”

zerombr yes

clearpart –all –initlabel –drives=vda

ignoredisk –only-use=vda

part /boot –fstype ext3 –size=512 –ondisk=vda

part pv.6 –size=8000 –grow –ondisk=vda

volgroup vgsys0 –pesize=32768 pv.6

logvol / –fstype ext3 –name=root –vgname=vgsys0 –size=1000

logvol /usr –fstype ext4 –name=lvusr –vgname=vgsys0 –size=2000

logvol /var –fstype ext4 –name=lvvar –vgname=vgsys0 –size=1000

logvol /opt –fstype ext4 –name=lvopt –vgname=vgsys0 –size=500

logvol /home –fstype ext4 –name=lvhome –vgname=vgsys0 –size=100

logvol /srv –fstype ext4 –name=lvsrv –vgname=vgsys0 –size=1000

logvol swap –fstype swap –name=lvswap –vgname=vgsys0 –size=1000

timezone Australia/Melbourne

authconfig –enableshadow –passalgo=sha512

selinux –permissive

firewall –service=ssh –service=smtp –port=143:tcp,80:tcp,443:tcp

rootpw  –iscrypted $1$ZV4gC5MB@IvTI#j5jK2BFt/j1cnZiP0

network –bootproto static –ip 10.100.0.252 –netmask 255.255.255.0 –gateway 10.100.0.1 –nameserver 10.100.0.1 –hostname pxe.example.com

reboot –eject

%packages –nobase

@core

@server-policy

wget

%end

 %post –log=/root/ks.log

cd /root

wget http://10.100.0.01/postks.sh

bash postks.sh

Only 204 packages installed 🙂