Friday, April 15, 2011

Renaming Ethernet Interfaces in Ubuntu 10.04.1

If you replace your NIC and need it to become the "new eth0" edit the following file:

sudo vi /etc/udev/rules.d/70-persistent-net.rules

Change the name of the MAC address you want to become the new eth0.

Thursday, June 3, 2010

Running PHP 5.2 on Ubuntu 10.04 LTS

Reposted from: http://randyfay.com/node/63, too many times I've linked to something only to have it disappear.

I had this problem with our internal KB system, it doesn't support php 5.3 and the developer isn't supporting our version any longer so he won't upgrade it, whatever.

Copy this text and put it in "/etc/apt/sources.list.d" as "karmic_0.list:

# deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release amd64 (20100429)]/ karmic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://us.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ karmic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu karmic partner
# deb-src http://archive.canonical.com/ubuntu karmic partner

deb http://security.ubuntu.com/ubuntu karmic-security main restricted
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted
deb http://security.ubuntu.com/ubuntu karmic-security universe
deb-src http://security.ubuntu.com/ubuntu karmic-security universe
deb http://security.ubuntu.com/ubuntu karmic-security multiverse
deb-src http://security.ubuntu.com/ubuntu karmic-security multiverse

Copy this and put it in "/etc/apt/preferences.d" as "php" (no extension):
Package: php5-gd
Pin: release a=karmic
Pin-Priority: 991

Package: php5-common
Pin: release a=karmic
Pin-Priority: 991

Package: php5-curl
Pin: release a=karmic
Pin-Priority: 991

Package: php5-mysql
Pin: release a=karmic
Pin-Priority: 991

Package: php5-pear
Pin: release a=karmic
Pin-Priority: 991

Package: php5-xsl
Pin: release a=karmic
Pin-Priority: 991

Package: php5-adodb
Pin: release a=karmic
Pin-Priority: 991

Package: php5-snmp
Pin: release a=karmic
Pin-Priority: 991

Package: php5-ldap
Pin: release a=karmic
Pin-Priority: 991

Package: php-pear
Pin: release a=karmic
Pin-Priority: 991

Package: php5-cli
Pin: release a=karmic
Pin-Priority: 991

Package: php5-mcrypt
Pin: release a=karmic
Pin-Priority: 991

Package: php5-memcache
Pin: release a=karmic
Pin-Priority: 991

Package: php5-pgsql
Pin: release a=karmic
Pin-Priority: 991

Package: libapache2-mod-php5
Pin: release a=karmic
Pin-Priority: 991


Then run the following commands to remove and reinstall PHP5 as the earlier version:

apt-get update

apt-get remove php5 libapache2-mod-php5 php5-gd php-pear php5-mysql php5-curl php5-memcache php5-mcrypt phpmyadmin

apt-get install php5 libapache2-mod-php5 php5-gd php-pear php5-mysql php5-curl php5-memcache php5-mcrypt phpmyadmin

After that you should be all set, I installed phpmyadmin for my own purposes you can choose to leave it out if you want.

Monday, July 27, 2009

Sandisk Sansa E200 series Factory Format

This will delete all media and mods from the device and return it to factory defaults.

  1. Turn off Device
  2. Slide the HOLD switch to the hold position (Red visible)
  3. Hold down the Record button on the side of the device then press the power button
  4. It will say "Recovery Mode, Attache USB cable"
  5. Attach the USB cable
  6. When Windows creates a drive letter, open it
  7. Right click in the window, select NEW >> Text File
  8. Rename the Text file "sansa.fmt", do not put any data in the file
  9. Unplug the Sansa Player from the USB cable
  10. It will format
  11. Resync your music.

Tuesday, April 14, 2009

Windows 7 & TrueCrypt Full disk Encryption

Currently installing FDE using TrueCrypt is not possible on Windows 7 without doing some trickery before you install the OS on your drive.

  1. Start the installation like normal
  2. Make sure you customize your install, don't just let it do everything for you.
  3. When it gets to the part where you choose your disk, click the "advanced" disk setup.
  4. Delete all your partitions.
  5. Click "New...", choose the maximum size possible for your drive. Click OK
  6. It will tell you that "Windows may create a partition..." blah blah. Click OK. You'll see a 200 MB partition in addition to another partition with the rest of your space.
  7. Now delete the larger partition leaving the 200MB partition intact.
  8. Now select the 200MB partition and expand it to fill the space. Click OK to the warning.
  9. Now you should have a single partition, go ahead and install windows the rest of the way.
  10. Encrypt your drive as normal.

Monday, April 13, 2009

Windows File Shares over SSH

Create a Microsoft Loopback adapter:
  1. Add New Hardware
  2. Yes, I have already connected the hardware
  3. Add New Hardware
  4. Install the hardware that I manually Select from a list (Advanced)
  5. Network Adapters
  6. Microsoft | Microsoft Loopback Adapter
Configure your new Loopback adapter:
  1. Right Click => Properties
  2. Make sure "Client for Microsoft Windows" is checked
  3. Uncheck "File and printer sharing"
  4. Click TCP/IP => Properties
  5. Manually Set an IP, doesn't matter what I used 10.1.1.1
  6. Subnet Mask: 255.255.255.0
  7. Gateway is your "REAL" gateway
  8. DNS Servers are your "REAL" dns servers
  9. Click "Advanced"
  10. Click "WINS" Tab
  11. "Netbios Setting" should have "Disable NetBIOS over TCP/IP"
  12. OK your way back out.
Set up Putty:
  1. Open Putty
  2. Enter your hostname or IP Address
  3. Enter the correct SSH Port (default: 22)
  4. Open Connection >> SSH >> Tunnels
  5. In Source port type: "10.1.1.1:139"
  6. In destination type "127.0.0.1:139"
  7. Leave "Local" and "Auto" radio buttons alone, click "ADD"
  8. In Source port type: "10.1.1.1:445"
  9. In Destination type: "127.0.0.1:139"
  10. Leave "Local" and "Auto" radio buttons alone, click "ADD"
  11. Click On "Session"
  12. In "Saved Sessions", type in a name and hit "Save"
Testing it:
  1. Double-click your session
  2. Accept the SSH Fingerprint, if requested
  3. Type in yoru username and password
  4. Open My computer, type "\\10.1.1.1" in the address box
  5. You should have your shares.

Monday, January 12, 2009

Windows 7 & Adobe Premier Elements 4

Yes I installed Windows 7 and for the most part I really like it. The only problems I've been having are the occasional issue with installing some applications that do a OS version check before allowing the install to go through.

One such application is "Adobe Premiere Elements 4.0" which I bought for my Windows XP system that I just blew away in favor of Windows 7. Installing it proved to be a bit of a challenge, only because I'm used to things just working with XP.

The solution is not to use Adobe's autorun installer, rather to explore the disk and run the .msi installer version instead. That seems to bypass the stupid version checker that Adobe built in.

So there you go, hopefully someone out there will find this useful.

Wednesday, August 13, 2008

Space Siege and GameStop and Rear Enders, OH MY!

I've never ranted on a blog before but today I've just had enough. First off let's start with GameStop.

I went to the Gamestop here in Newington, CT and asked for Space Siege. The sales guy behind the counter told me that they were sold out. I said, Wow, must be a great game. He said they only got one copy, *ONE COPY*. Now Newington is not a small city and it's right outside Hartford, CT and with all the hype, the advertising and big studios behind the game Gamestop decided to get, one freakin' copy of the game.

He did call ahead two two other stores and only one of the stores had their *ONE* copy in stock. The employee told him to hold it while I drove there. Fine, I want to get ti bad enough that I will drive to another store.

So, I'm in my car driving to the Westfarms mall and I come to a stop light on the main road to get onto highway 9 and...*WHAM!* I get rear ended. I'm thinking, you've got to be fucking kidding me... We called out insurance companies to get that straightened out and 45 minutes later, I'm back on the road to the store; now it's becoming a god damn mission at this point.

I'm not seriously hurt, by the way, thanks for asking.

Anyway, I get to the store and buy the game, no story there...thank god.

Now I get home, install my latest graphics drivers and then go to install the game. You know what I get? A FUCKING CRC ERROR ON THE DISC! Yep, the disc is damaged and will not install.

Now since Gamestop, in it's infinate wisdom, decided to only stock ONE FUCKING COPY OF A NEWLY RELEASED GAME there is no way I can exchange it for another copy.

So now, I'm now downloading it off bittorrent, at least I have something to do while my bruises heal from my car accident.

...

Damn it.