Search This Blog

Tuesday, September 3, 2013

Good Seats?

Probably the best seats at Fenway. Maybe a future player?


VirtualBox and NIC config settings

After you have a virtual box running you most likely want to ssh, surf, etc to it. So this is what I did for 2 virtual boxes. Power it down and then in the network tab in the "VirtualBox Manager" window select "Bridge Adapter" and then just power on the machine and you should now have an active eth card.

My ifcfg-eth0 file looks like this:

$ cat *eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="08:00:27:2B:3A:87"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="def9a44e-dd65-4c0e-a3b0-f5d18dc2c5c4"


Monday, August 12, 2013

LVM - extending a ext3 volume

Confirm that there is free space in the volume group. Nice - I have 6.84g free!
 
# /usr/sbin/vgs 

VG         #PV #LV #SN Attr   VSize  VFree
VolGroup00   1   9   0 wz--n- 67.88G 6.84G

Just confirm
ing its ext3:
 
# mount | grep opt
/dev/mapper/VolGroup00-LogVol03 on /opt type ext3 (rw)
  

Lets extend it by 2G:
/usr/sbin/lvextend -L+2G /dev/mapper/VolGroup00-LogVol03


Finally resize it:

/usr/sbin/ext2online -v /dev/mapper/VolGroup00-LogVol03



df -hP shows that your all set now.


SGI network install

I did this back in 2005 and was extremly happy that day when this worked, so I thought would share and hopefully an Irix admin finds this helpful! Its outdated I know, but its something.

Server Thulim is currently a boot/install server for the Irix 6.5.26
operating system and has the images NFS mounted. The steps involved to create
that environment are:

On the server:

1. Find a home on the server and copy the 3 Overlays and the Applications
images from cd into a separate directory for each. The current home is
/images/IRIX. The end result is something like:

> ls -l
drwxr-xr-x    6 root     sys         1024 Mar 21 11:00 applications
drwxr-xr-x    7 root     sys         1024 Oct  6 14:57 ovly1
drwxr-xr-x    4 root     sys         1024 Mar 21 10:24 ovly2
drwxr-xr-x    4 root     sys         1024 Oct  6 14:44 ovly3
>

2. Update /etc/hosts on the server to include the clients info.

3. Update /etc/ethers and include the mac address from the client and
hostname. To get the mac address enter this on the client: /etc/nvram eaddr

4. Unlock the guest account. This account will be grabbing the files.
Remember to secure the account after the installation is complete

5. Update /etc/bootptab and include the client's hostname, mac address, IP ,
and the boot file. The file looks something like this:

# host          htype haddr             iaddr           bootfile
#

IRIS            1 01:02:03:8a:8b:8c     192.0.2.1       unix
dissgi          1 08:00:69:05:b2:fb     172.18.41.81
/images/IRIX/ovly1/dist/miniroot/unix.IP32

Do a uname -a on the client to get the correct hardware type (27, 30, 32,
35).

6. Make sure that the following lines are uncommented in /etc/inetd.conf
(make a copy first) and do a '/etc/killall -HUP inetd' after the files is
saved.

shell stream   tcp     nowait  root   /usr/etc/rshd        rshd -L
bootp    dgram    udp    wait    root    /usr/etc/bootp        bootp
tftp    dgram    udp    wait    guest    /usr/etc/tftpd    tftpd

Now move onto the client.

As root, do a init 6 and when the systems is in the going up mode, start to
hit the F1 button, which will bring you to the maintenance mode screen and
click on Remote install button. Enter the install server's name and click
ok. A new window will pop up asking for the the remote location, which is
/images/IRIX/ovly1/dist. After you click ok, it will show a status screen of
the software being copied and will eventually bring you to a inst prompt
where you will need to read in the other images.

Now at the inst prompt, enter 'open thulium:/images/IRIX/ovly2/dist' and
again, it will show you status info on the files being read in. Do the same
for thulium:/images/IRIX/ovly3/dist and thulium
/images/IRIX/applications/dist

After all images have been read in, at the inst prompt enter again 'open
thuilium:/images/IRIX/ovly1/dist', followed by:

inst> keep *
inst> install upgrade
inst> conflicts

After you type conflicts, you will probably get a bunch of issues. This time
around, the conflicts pertained to GNU and Java pkgs. There was exactly 38
conflicts that needed to be addressed, which was done by issuing: c 1a 2a
...38a. This will not install those pkgs and will allow the upgrade to
continue.

Once the conflicts have been resolved, type 'go' at the inst prompt. This
officially has started the upgrade process, which took about an 1hr on a Octan
2. Once the install is done, it will say something like, "100 % done" and
will leave you at the inst prompt. Enter quit, which will take a few minutes
and finally ask you to reboot the client. Once the client has rebooted,
enter uname -R and it should report '6.5 6.5.26m' If it does, your done, but
if still says the old OS version then something went wrong.



Red Hat Proxy server quick client registration script

Doing some post Red Hat installs and decided to add this to register a server with a Red Hat Proxy server for patch maintenance.


# Run this to register with RH will run yum update at the end.
# VAS 03282013

# Check ports with a timeout of 3 seconds for each.
echo "Testing port access..."
nc -z -w 3 xxx.xxx.xxx.xxx 80 >> /dev/null && nc -z -w 3 xxx.xxx.xxx.xxx 440 >> /dev/null
if [[ $? != 0 ]]
then
echo "*** Access looks good.... ***"
echo -e "Enter your RHN id: \c "
read rhn_id
echo -e "Enter your RHN passwd: \c "
stty -echo
read rhn_passwd
stty echo

    rpm -Uvh http://????ssl-cert-1.0-2.noarch.rpm
    /usr/sbin/rhnreg_ks --username=$rhn_id --password=$rhn_passwd --profile=`hostname` --force --sslCACert=/usr/share/SSL-CERT --serverUrl https://???/XMLRPC
    /usr/bin/yum update
else
    echo "Ports 80 and 443 seemed closed on xxx.xxx.xxx.xxx"
    exit 1
 

tcpdump dns requests

A few days ago the Network team ran a top ten list of servers that where doing excessive DNS lookups and some of those hosts where Red Hat. So to confirm on the hosts I issued the following as root to confirm the lookups:

# tcpdump udp dst port 53
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
21:26:13.146807 IP test > cdns01.comcast.net.domain: 9527+ A? yahoo.com. (27)


So for example that shows a lookup up from server 'test' for yahoo.com.







Monday, August 5, 2013

/etc/host.conf

While troubleshooting an issue the other day someone recommended that I check /etc/host.conf, which is a file I have never needed to use before, so further research shows that if /etc/nsswitch.conf exists then /etc/hosts.conf gets ignored and will only get used if something issues the dig or host command.

So there was no need for me to use host.conf, but I did learn something that day.