eRacks Systems Tech Blog

Open Source Experts Since 1999

EDIT: Binary modules have now also been provided for 7.4, 8.1 and 8.0.  The instructions below should apply to all three, with the exception that you’ll want to download either mps-bin-7.4.tar.gz,  mps-bin-8.1.tar.gz or mps-bin-8.0.tar.gz.

Unfortunately, the mps driver, which supports LSI Logic’s 6Gbps series of RAID controllers, didn’t make it into the FreeBSD kernel until after 8.2-RELEASE.  As a result, FreeBSD users who require this driver are forced to either install 8-STABLE — which, despite the name, is a development branch — or pull the driver’s source code from 8-STABLE and build it on FreeBSD 8.2-RELEASE.  Since we recently needed to use the mps driver and had to stick with a production-ready release, we opted for the second option.  Along the way, we decided to bundle up the driver’s source to make the task easier for those who don’t want to install a development branch, and to pre-compile binary modules for those who wish to install 8.2-RELEASE directly to the hardware RAID array.

If you have a separate hard drive for the operating system that’s not on a 6Gbps LSI controller and simply use the hardware RAID for additional storage, you can do a normal install of FreeBSD 8.2-RELEASE to the hard drive, boot into the new system and perform the following steps:

1) Download mps.tar.gz
2) Extract it, cd to the ‘mps’ directory and type make && make install
3) Edit /boot/loader.conf and add the following line at the end: mps_load="YES"
4) Reboot (or type kldload mps.ko without rebooting)

If instead you want to install 8.2-RELEASE directly to an array on your 6Gbps LSI controller, a few extra steps are required.

First, download mps-bin.tar.gz, extract it by typing tar -zvxf mps-bin.tar.gz and place the contents on some form of removable media mountable by FreeBSD.  A USB thumb drive, a floppy disk or a CD will suffice (though, a CD would be an awful waste of space… :))

Second, make sure to download the FreeBSD DVD and not the CD.  We will require the live filesystem that’s contained only on the larger DVD.  Once the installer is running, choose your language as usual, then select “Fixit” instead of the usual installation method.  Choose the CDROM/DVD option.

Figure 1: Select 'Fixit' instead of an installation method

Figure 2: Select 'CDROM/DVD'

Figure 3: The 'Fixit' Prompt

Now, insert your removable media.  For our example, we’ll assume a USB thumb drive with a device node on /dev/da0.

Before continuing, let me first warn you that the ordinary mount command will most likely not work.  Usually, mount will determine the filesystem type and automatically call the appropriate binary.  However, the way the live filesystem is setup, this doesn’t work — or at least, it didn’t work on my machine.  So instead, you’ll want to call the command for your filesystem type directly.  If it’s a CD, that command will be mount_cd9660.  If you’re using a USB thumb drive with a FAT32 filesystem on it (as we will be in our example), the command will be mount_msdosfs.

Assuming our example with the USB thumb drive, you’ll issue the following commands:

#mount_msdosfs /dev/da0 /mnt
#cd /mnt/mps-bin/i386 for 32-bit (or #cd /mnt/mps-bin/amd64 for 64-bit)
#kldload ./mps.ko
#exit

At this point, you’ll be returned to the FreeBSD installer.  Make sure to re-insert the DVD, then continue with the installation as usual.  Once the installation is complete, don’t reboot!  If you do, you won’t be able to start up FreeBSD, as we still have to install our kernel module and tell the boot loader to load it on boot.

So, now that the installation is finished, re-insert the DVD and return to the Fixit prompt.  Once again, choose the ‘CDROM/DVD’ option.  Assuming our USB thumb drive on /dev/da0 from before — the commands you use will differ based on the media you choose — type the following commands:

#mount_msdosfs /dev/da0 /mnt
#cd /mnt/mps-bin/i386 for 32-bit (or #cd /mnt/mps-bin/amd64 for 64-bit)
#./install.sh

If all goes well, the shell script will terminate without any output.  Incidentally, it’s worth mentioning that the newly installed root filesystem is mounted on / when you enter the Fixit environment after installation.  Now that we have the kernel module installed, we just need to tell FreeBSD to load it on boot.  To do so, we just have one last command:

#echo 'mps_load="YES"' >> /boot/loader.conf

That’s it!  Just unmount your media and exit the Fixit prompt.

#umount /mnt
#exit

At this point, you can exit the installer as usual and reboot. Once the system starts, you should find yourself face to face with a shiny new instance of FreeBSD 🙂

August 10th, 2011

Posted In: FreeBSD, How-To, Open Source

Tags: , , , , , , , , , , , , , , , , , , , , ,

7 Comments

I’ve been evaluating various open source media center applications in an effort to put together a new unit and had the opportunity to weight the relative pros and cons of each. Below, you’ll get to read about my findings and hopefully learn a little bit about what’s out there. So, without further ado, here’s a list of the packages I looked at, in order of preference.

1. Boxee
(http://www.boxee.tv/)

Boxee was my first pick. It has a slick interface, can draw from a variety of different sources such as Hulu and Youtube out of the box, makes available a plethora of plugins (called “applications”), is easy to navigate and has an interface very suited for a remote control. The biggest con for me is that, while the project itself is open source, in order to use it, you need to register for an account on their website.

2. XBMC
(http://www.xbmc.org/)

XBMC, which stands for “X-Box Media Center,” was originally designed for the X-Box and has since been made available on the PC. It sports a very polished interface, and like Boxee, is easy to navigate and makes using a remote control easy. Support for online sources such as Youtube is missing out of the box, but there are plenty of plugins to help. Unfortunately, unlike Boxee or Moovida (which is next in our list of applications), you have to go to external sources in order to find them (check out http://www.xbmczone.com/). Supposedly, it’s easy to install a plugin once you’ve downloaded it, but the directions I found online differed from how things worked with the latest version, and I ended up having to install plugins manually by unzipping them and copying the files to the right directory.

3. Moovida
(http://www.moovida.com/)

Moovida, formerly known as Elisa, is another media center option. Like Boxee and XBMC, it sports an easy to navigate interface suited to a remote control, and unlike XBMC, integrates the process of finding, installing and updating plugins a part of the application itself. The reason why I rated this one below XBMC is that there aren’t a lot of plugins available, and because the interface to XBMC is, in my opinion, slightly more polished.

4. Miro
(http://www.getmiro.com/)

(My reason for rating Miro at the bottom isn’t that Miro is a bad application. In fact, I enjoyed using it. It comes with support for many video feeds by default and does a good job of organizing media. My problem, for our purposes, is that it’s not such a great application for set top boxes. The UI is easy to use, but I don’t think it would be as friendly when hooked up to a TV with a remote control. Also, it’s difficult to add sources such as Youtube, as you have to manually add RSS feeds for the channels that interest you. Nevertheless, it’s a useful application, and I recommend giving it a try.

August 6th, 2009

Posted In: media center, multimedia, Open Source

Tags: , , ,

2 Comments

eRacks Sony Laptop – Part 2 – Shrinking partitions & Installing Linux

Step 1 – back up Vista partitions

[joe@sony ~]$ sudo su
Password:

[root@sony joe]# fdisk /dev/sda

The number of cylinders for this disk is set to 14593.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x200c5cbf

Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         889     7138304   27  Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda2   *         889        4076    25600000    7  HPFS/NTFS
/dev/sda3            4077        4101      200812+  83  Linux
/dev/sda4            4102       14593    84276990    5  Extended
/dev/sda5            4102       14593    84276958+  8e  Linux LVM

Command (m for help): q

[root@sony joe]# dd if=/dev/sda2 | gzip -9 – >vista.img
51200000+0 records in
51200000+0 records out
26214400000 bytes (26 GB) copied, 2384.53 s, 11.0 MB/s

[root@sony joe]# ls -l
total 6168412
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Desktop
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Documents
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Download
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Music
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Pictures
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Public
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Templates
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Videos
-rw-r–r– 1 root root 6310241019 2009-02-20 21:58 vista.img

[root@sony joe]# dd if=/dev/sda1 | gzip -9 – >recovery.img
14276608+0 records in
14276608+0 records out
7309623296 bytes (7.3 GB) copied, 739.479 s, 9.9 MB/s
[root@sony joe]# ls -l
total 12022456
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Desktop
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Documents
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Download
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Music
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Pictures
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Public
-rw-r–r– 1 root root 5988678705 2009-02-20 22:15 recovery.img
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Templates
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Videos
-rw-r–r– 1 root root 6310241019 2009-02-20 21:58 vista.img

[root@sony joe]# mv vista.img vista.img.gz
[root@sony joe]# mv recovery.img recovery.img.gz
[root@sony joe]# ls -l
total 12022456
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Desktop
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Documents
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Download
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Music
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Pictures
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Public
-rw-r–r– 1 root root 5988678705 2009-02-20 22:15 recovery.img.gz
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Templates
drwxr-xr-x 2 joe  joe        4096 2009-02-20 03:05 Videos
-rw-r–r– 1 root root 6310241019 2009-02-20 21:58 vista.img.gz
[root@sony joe]#

 

Step 2: Boot from the Ubuntu CD and install Linux!

 

Previous: Part 1 – the OOB Experience

eRacks Sony Laptop – Part 1 – the OOB Experience

eRacks Sony Laptop – Part 3 – Virtual Windoze

June 9th, 2009

Posted In: Laptop cookbooks, Open Source, Products, Technology

Tags: , , , , , , ,

Leave a Comment

Have you ever thought to yourself, “gee, it would be a lot of fun to learn how to write software,” but you didn’t want to shell out money for books or a development environment? Perhaps you’re just curious, or maybe you aspire to be a developer one day. Whatever your reason, thanks to open source software and free documentation, you can pick up the skills required with no cost to you (other than your time, of course.)

Where to Learn

Before you start writing code and playing with a compiler (a program that translates human-readable programs into instructions the computer can understand), you’ll first need to learn a programming language. You could spend anywhere between $30 to $70 on a book. Or, you could instead go online. Not only can you use Google to find countless tutorials for just about any programming language, you can also find sites that offer free e-book versions of published works (for an extensive collection of books in any subject, including quite a few on programming, check out http://www.e-booksdirectory.com/). For most of your programming needs, you’ll find that buying books really isn’t necessary.

As you grow in skill, you’ll find that learning by example is a powerful tool. Fortunately, with open source software, you have a plethora of real world applications, their source code layed bare for all the world to see (source code is the human-readable version of a program.) If you want to look at the implementation of a text editor, for example, you can check out the source code for projects like vim , nano or emacs. If you are interested to use nano text editor, see more details on this page https://www.linode.com/docs/guides/use-nano-text-editor-commands/.

Do you also want to know how various standard library functions are implemented in C, such as QuickSort? Then check out the source code to Glibc (http://www.gnu.org/software/libc/). Are you instead more interested in systems programming? Check out the kernel source trees for Linux (http://www.kernel.org) or FreeBSD (http://www.freebsd.org). You’ll find open source software for just about any need, from web browsers to mail clients, from 3D modeling to audio and video editing solutions. Whatever you want to look at, you’ll more than likely find examples written by others that can help you learn for your own projects.

Where to Get the Software

So, you already have at least some conception of what’s involved in programming, and you want to get your hands dirty by actually writing some code yourself. At the very least, you’ll need a text editor to write your code and a compiler or interpreter to run your programs. If you’re looking for a premium custom software development service to help you out with your project, check out DevsData. You may also desire a more elaborate solution, such as an IDE (integrated development environment), which offers you a one-stop solution for writing code and compiling/running your programs, all from the click of your mouse.

Either way, open source once again comes to the rescue. For C, C++ and a few other languages, you have the GNU Compiler collection (http://gcc.gnu.org/). There are also various interpreted languages, such as Ruby , Python (http://www.python.org/) or Perl  If you’re looking for an IDE roughly like Microsoft Visual C++ or the like, you’ll find KDevelop , Eclipse  or NetBeans , among others.

For more advanced needs, such as revision control (a means of tracking changes in software), you have applications like Subversion , Mercurial and Git (http://www.git-scm.org/).

There are many more applications for a variety of needs, so whatever you’re looking for, give Google a spin.

Conclusion

It is possible to learn how to develop software without breaking the bank. With free documentation and open source software, you have all the tools you need to learn as little or as much as you want, field service management software provided byBelfast based Workpal. Here at eRacks, we understand the needs of the developer, and can provide you with a machine pre-loaded with all the software you need to write professional programs. Contact us, and ask for a quote today!

June 1st, 2009

Posted In: Development, Open Source

Tags: , , , , , , , , , , , , , , , , , , , , ,

36 Comments

« Previous Page