Posted in Uncategorized on January 31st, 2012 by Brad Turnbough – Be the first to comment
To rebuild the grub bootloader, follow these commands:
mkdir /harddrive
mount /dev/sda1 /harddrive
mount -o bind /dev /harddrive/dev
mount -o bind /proc /harddrive/proc
chroot /harddrive bash
sudo update-grub
reboot
Posted in Uncategorized on January 31st, 2012 by Brad Turnbough – Be the first to comment
Use the following key sequence to switch between TTY’s in a virtualbox VM.
If your HOST KEY is the right ctrl, you want to press:
right ctrl + F1
Posted in Uncategorized on January 31st, 2012 by Brad Turnbough – Be the first to comment
Although this isn’t exactly what I was looking for, this will suffice for the time being. This will stop lightdm from loading upon bootup and instead kick you to tty1.
Drop to a terminal and blast in the following:
echo “manual” >> /etc/init/lightdm.override
sed -i ’s/quiet splash/text/’ /etc/default/grub
update-grub
reboot
Posted in Uncategorized on January 19th, 2012 by Brad Turnbough – Be the first to comment
Ssh-agent bash
Ssh-add /user/username/id_dsa
Enter in password
Then you can log in to the machine (additional options are to surpress Host Key verification, and warnings / errors)
ssh -n -o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@hostname
Posted in Uncategorized on January 15th, 2012 by Brad Turnbough – Be the first to comment
To get a client to send its hostname during a DHCP request, add the following to the /etc/sysconfig/network-scripts/ifcfg-eth0 file:
DHCP_CLIENT_ID={thehostname}
DHCP_HOSTNAME={thehostname}
Posted in Uncategorized on January 15th, 2012 by Brad Turnbough – Be the first to comment
Just for my notes:
8.04 Hardy Heron (LTS)
8.10 Intrepid Ibex
9.04 Jaunty Jackalope
9.10 Karmic Koala
–Implemented Ubuntu One….was buggy and a piece of garbage
10.04 Lucid Lynx (LTS)
10.10 Maverick Meerkat
11.04 Natty Narwahl
–Implemented Unity, slow and buggy, but GDM is still optional
11.10 Oneric Ocelot
–Requires Unity 2D/3D, but can install GDM if you have the knowhow
12.04 Precise Pandolin (LTS)
Posted in Uncategorized on January 14th, 2012 by Brad Turnbough – Be the first to comment
Ubuntu is able to communicate with APC UPS units. To begin with, install apcupsd.
apt-get install apcupsd
Modify the “UPSCABLE” line in /etc/apcupsd/apcupsd.conf:
UPSCABLE usb
Modify the “UPSTYPE” line in /etc/apcupsd/apcupsd.conf:
UPSTYPE usb
Modify the “DEVICE” line (so it is blank) in /etc/apcupsd/apcupsd.conf:
DEVICE
Modify the “ISCONFIGURED” line in /etc/default/apcupsd:
ISCONFIGURED=yes
Restart APCUPSD:
service apcupsd restart
Verify connectivity:
apcaccess
Posted in Uncategorized on October 12th, 2011 by Brad Turnbough – Be the first to comment
How to set up an in address statically in CentOS 6:
edit /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=”eth0″
BOOTPROTO=”static”
HWADDR=”d0:54:56:9A:00:22″
NM_CONTROLLED=”yes”
IPADDR=”172.24.21.145″
NETMASK=”255.255.255.0″
NETWORK=”172.24.21.0″
ONBOOT=”yes”
edit /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=PCNAME
GATEWAY=”172.24.21.1″
Posted in Uncategorized on October 12th, 2011 by Brad Turnbough – Be the first to comment
While implementing a monitoring solution, I needed a way to count how many zombie processes there are. This is a perfect way of doing so:
ps aux | awk ‘{ print $8 ” ” $2 }’ | grep -w Z | wc -l