WD20EARS 4096 HDD vs fdisk

Western Digital GreenHaving purchased a new WD20EARS 4096 (2 terabyte hard drive) I was anxious to put the new beast in my home server, format the drive, and get to moving files around.
so I sudo fdisk -l /dev/sdc as I normally do..

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

Continue reading

Bash script to show WAN and LAN network IPs.

Following is a bash script I wrote to show my lan and wan IPs.
The script will loop every 10 seconds. Seeing as my ISP has a less than desirable up time, I use this to see when I’m finally reconnected.

#  -/oss+:`  `-/o/.
#     `-omMmy+.  +Md/
#        -MMMMMNdhMMMyos+:
#  odo::NMMMMMM/`s-MMMMMMmMMds/
# -.  `NMMMMMMMd+- -ooo/-..-oNM-   `++ /+`++  //
#     +MMMMMMMMMMMMmhyssss-  `-     .ddh. mdd/yy
#     sMm`oMMMMMMMMMMMMMMNmdy+`      -M.  m+`sMy
#     .M/  `+hNMMMMMMMMMMMMMMMMs`    `.`  .`  ..
#      /`     `.:+oo..-/yMMMMMMMN-
#        -+yo:`          +MMMMMMMN`
#     :yNMN+so  -so`     :hyMMMMMM/
#   /mMMMMMMMNhdMN`   ://+hMMMMMNN:
# hMmm-   /osMMMNosNMMMMMMMMdNM+
#`Ms`/  ..-smMNs.oNNho+/++:` sM/
# h/    `:++/- -my-           +s`
#  .          .s`
echo "Press ctrl-c to exit at any time."
while [ 1 ]; do
	WAN_ip_addr=`wget --timeout=10 --tries=2 -qO - http://cfaj.freeshell.org/ipaddr.cgi`
	LAN_ip_addr=`ifconfig | grep 'inet addr:'| grep -v '' | cut -d: -f2 | awk '{ print $1}'`
	echo $(date)
	echo -ne "External IP: "
	if [ -z $WAN_ip_addr ]; then
		echo -e "Disconnected"
		echo -e $WAN_ip_addr
	echo -ne "Internal IP: "
	if [ -z $LAN_ip_addr ]; then
		echo -e "Disconnected"
		echo -e $LAN_ip_addr
	if [ -n "$WAN_ip_addr" ]; then
		echo "Found external IP"
		exit 0
exit 0

HP total fail.

Last year my wife and I purchased two HP Pavilions (DV 9830-US). Fine laptops, aside from my ram being bad, her hard drive’s death, and, one month out of warranty, the video chip on mine decided it had enough of the poor cooling and took a permanent break. This model of laptop was a portable furnace. This was a known issue, but this specific model wasn’t in the class action lawsuit… lucky me. They refused to replace it. Rather than argue any more through a language barrier made of water and sand, I purchased a new model that boasted it ran cool. It did.
Continue reading

A fix needs to be published, in English.

Windows 7 users:
ACPI\ENE0100\3&33FD14CA&0 == IR receiver.
Open device manager, show hidden devices, select above, and select update driver, “browse my computer”. Point to the folder created when extracting the archive. Do not run the EXEs contained within the archive.
Seeing as the first link to the file had vanished, I looked around and found that asimobile has moved their files to a FTP server.

Mirror 1

Cleanup Ubuntu.

A simple cleanup script by David Francos.

Y="\033[1;33m"; R="\033[0;31m"; E="\033[0m"
function cleanapt(){ apt-get clean; }
function emptytrash(){ rm -rf /home/*/.local/share/Trash/*/** &> /dev/null && rm -rf /root/.local/share/Trash/*/** &> /dev/null && rm -rf /home/*/.Trash* && rm -rf /root/.Trash*; }
function removeconffiles(){ dpkg -P `dpkg -l|grep "^rc"|awk '{print $2}'`; }
function removeoldkernels(){ apt-get remove --purge $(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v `uname -r|cut -d. -f1,2`-`uname -r |cut -d\- -f3,4`|grep -v `uname -r|cut -d\- -f1,2`); }
if [ $UID != '0' ]; then
	echo -e $R"Error: must be root, cleaning user's trash"$E 
	rm -rf $HOME/.Trash* $HOME/.local/share/Trash/*/**
	exit 1
	echo -ne $Y"Cleaning apt cache         ..."$E && cleanapt 2>/dev/null ; echo -ne $R" Done\n"$E
	echo -ne $Y"Removing old config files  ..."$E && removeconffiles 2>/dev/null ; echo -ne $R" Done\n"$E
	echo -ne $Y"Emptying trashes           ..."$E && emptytrash 2>/dev/null ; echo -ne $R" Done\n"$E
	echo -ne $Y"Removing old kernels       ..."$E && cleanapt 2>/dev/null ; echo -ne $R" Done\n"$E