Wednesday, June 18, 2008

Ubuntu Upgrade & Software RAID

You never know what you are going to get when you do a distribution upgrade.

Somewhere along the way I "upgraded" my little fileserver from Ubuntu 6.06 LTS (Long Term Support) to 6.10 (NOT Long Term Support). Why? I do not know. Support for 6.06 LTS will end June 2011 but support for 6.10 ended April 2008!! Unfortunately, I only realized this yesterday. No wonder I hadn't seen any package updates for some time. :-(

Time to upgrade, NOW!

Ubuntu's latest is another LTS release, 8.04. So my big plan is go to somehow get from 6.10 to this latest LTS release. Supposedly you can do it if you upgrade a release at a time. Away we went using Method 2 here...

Changed my sources in /etc/apt/sources.list replacing all instances of edgy to feisty.

sudo apt-get update


sudo apt-get dist-upgrade

sudo apt-get -f install


sudo dpkg --configure -a


sudo telinit 6


It rebooted, so I thought I was probably safe.
sudo lsb_release -a showed me that I was indeed upgraded to 7.04. All was right with the world...

Not so.

My RAID5 & RAID1 devices were missing a drive! What happened?!

It turns out that upgrading turned two of my IDE drives into SCSI devices and left one as a regular IDE device. Bizarre. The missing RAID drives were the partitions from the one IDE device that was left. I used Webmin to simply add the appropriate partions from the IDE drive to the SCSI RAID devices and that was it. It worked without sending my data to /dev/null.

The RAID5 devices rebuilt and the RAID1 was back to mirroring with a spare. All was right with the world.

My question is, what's going to happen during my upgrade from 7.04 - 7.10 - 8.04? Will I be so lucky. I was pretty freaked out when my IDE drives "turned" into SCSI devices. Just weird, and why the heck did it leave one of the IDE drives as such instead of making it a SCSI device? I do not know...

Thursday, June 12, 2008

Wednesday, April 30, 2008

Identify Your Hardware With Linux

I wanted to find out if the old mainboard I am using for my little file server supported USB 2.0 and not a measly 1.1--let's keep that USB drive (used to back up the server) flying along as fast as possible, eh?

Came across this thread which lead me to the answer. I could now get the needed information without shutting down the box, opening it up and hopefully finding the model number so I could google up the answers, etc. etc.

No GUI app need apply, I wanted a command line solution. Here are some options I found:

lspci -vv or sudo lspci -vv

But the really cool one is:

sudo lshw

That shows you just about everything you could want regarding your hardware. I found out what model mainboard I am running and the USB info I was looking for...

Thursday, February 28, 2008

Compile Perl Into Win32 Executable Applications

Want to run Perl scripts on Windows systems that don't have Perl installed? Compile them into standalone executable applications!

There's always a way...

After much Googling and much frustration trying to get it to work, it did!

I am using ActiveState ActivePerl 5.8.8 Build 822 on my Windows XP systems. I read much about PAR & perlcc, etc. but nothing seemed to magically turn my paltry Perl scripts into mighty Windows Executable files. Finally I found the answer hidden away in a little URL tucked away on some message board.

Here's the short sweet version: You can add Perl module repositories with ActiveState's included Perl Package Manager. You add the repository and install PAR-Packer (not just any PAR-Packer, see below for the particulars).

  1. Open the Package Manager
  2. Click Edit Preferences (or the little gear icon on the left)
  3. Select the Repositories tab
  4. Enter a name in the Name field (I chose theoryx5 for obvious reasons following)
  5. Enter the following URL in the Location field:

    • http://theoryx5.uwinnipeg.ca/ppms/

  6. Click Add
  7. Click OK
  8. Click File --> Refresh All Data if the app doesn't do it automagically
  9. Click View --> All Packages
  10. In the Search field (you know, the field with the little magnifying glass in it) Enter Packer
  11. You will see a few listings (or maybe more then a few, depending). Two in particular you will find: PAR-Packer 0.976 & PAR-Packer-588 0.973. Select the first (the one without the -588 this is important!).
  12. Either right-click on it and choose Install... or click the little package icon that has the green + on it.
  13. Click the little play arrow icon or choose Action Install... at the top
  14. Once it's installed with all it's dependencies, close the Package Manager
  15. Add the following to your path (if Perl is found at C:\Perl): C:\Perl\site\bin;

    1. In Windows XP you can do this by right-clicking My Computer
    2. Click Properties
    3. Select the Advanced tab
    4. Click Environment Variables
    5. Scroll down in System variables & select Path
    6. Click Edit
    7. Add C:\Perl\site\bin; to your path
    8. Click OK & exit Evironmental variables, etc.
    9. You may need to log off and back on for the change to take effect

Now open up a Windows shell (you know, Start --> Run --> cmd --> OK), navigate to the directory with your perl script to compile and enter: pp -o myfile.exe myfile.pl and ta-da your newly minted .exe will magically appear.

Well, it should anyway. Remember, use this at your own risk, your millage may vary, etc. etc.

It worked for me and I was very happy.

Note: You can review all of the available packages for the aforementioned repository at the same URL: http://theoryx5.uwinnipeg.ca/ppms/