Rubénerd :)

Monday 29th March 2010

Unix file compression basics

Dynapac photo by Jan Mehlich from Wikimedia Commons

A couple of years ago I wrote a post about rzip, and I’m still getting emails and comments from people about it. I’ve decided to dedicate this post to answering some of these questions so I can point people to it. Grilled cheese sandwiches contain tastyness.

Read this post >

Wednesday 05th August 2009

MacBook Pro trackpad on OpenSolaris

OpenSolaris desktop background by Maccu on Flickr

My experimentation with OpenSolaris on my MacBook Pro (Dual-booting OpenSolaris on a MacBook Pro, OpenSolaris, MacBook Pro, partition order) has come to an abrupt end, tragically because of only one basic but fundamental problem.

After trying it so I could run Java and Oracle stuff on it for my studies using the same OS they use at my university, it worked beautifully with all the internal hardware, except the trackpad. The workaround proposed on various forums and newsgroups is to just use an external mouse which is simply not an option when I’m in classes and only have a small desk to work on. I also think it’s a bit ridiculous to expect to use a notebook computer and not expect to be able to use the internal mouse.

OpenSolaris booted from the CD was far more polished than any Linux distribution I’ve tried, but I’ve decided to wipe it off the drive and reinstall FreeBSD in that partition which supports all my hardware out of the box so to speak. Not having the internal mouse working on a laptop is absolutely unworkable and a complete show-stopper.

Here’s hoping the next release addresses this problem. I’d love to use it; I even picked out a snappy desktop background to use with it!

Saturday 01st August 2009

OpenSolaris, MacBook Pro, partition order

I often find I can understand things better myself when I explain what I’m attempting to do. Spock would probably say this illogical, I’d retort that not all of us have the benefit of being half Vulcan. Thank you.

Since attempting to boot my MacBook Pro with OpenSolaris and since writing about it here an hour ago I’ve learned more about the problem I was having with the partitioning stage.

I found this page and on their instruction I installed the Sun Device Detection Tool which checks the hardware of machines and determines whether or not OpenSolaris and Solaris have appropriate driver support. Aside from the gigabit Ethernet card, I was told my original generation MacBook Pro had full hardware support. Cool.

Returning to the aforementioned page I saw the screenshot shown above and recognised the errors instantly from when I tried to install OpenSolaris myself. Turns out OpenSolaris needs to be installed on the first partition to work; I was attempting to install it on the third partition after the EFI and Mac OS X Leopard ones respectively.

I could mess around for another few hours to try and figure out how to overcome this limitation (when I was an early teenager I was quite the dual-booting wizard) but I’m thinking I’ll save myself the headache, backup my data and repartition this machine from scratch.

As I said in my previous post about this, this semester I’m working almost exclusively with Java and Oracle software and I’m SSH’ing into Solaris machines at the campus here already, and I’d like to be able to use a similar setup on my own machine too. Also I love trying new things :).

Dual-booting OpenSolaris on a MacBook Pro

OpenSolaris being introduced to the world by Rich Green

Given I’m working almost exclusively with Java and Oracle software this semester at university in three of my four courses I thought it’d be fun and worthwhile dual-booting OpenSolaris with Mac OS X Leopard on my MacBook Pro and use them both in a more “native” environment. You can download the ISOs for free from their servers, via bittorrent or you can even order a CD to be sent to you gratis. Pretty cool.

Problem is, I’m stuck. I’m attempting to install OpenSolaris 2009.06 which is the latest version at the time this post is going live. These were the steps I took:

  1. Ran Leopard Bootcamp
  2. Rebooted with the OpenSolaris disc in the drive
  3. Chose the default LiveCD option from the Grub menu
  4. Arrived at the desktop, connected to Wireless network
  5. Plugged in USB mouse because internal trackpad wasn’t detected
  6. Launched installer
  7. Chose the FAT32 partition Bootcamp generated, selected "Solaris"

Barely a few seconds into file copying stage, the installer #fails (uh oh I’ve started inadvertently using Twitter hashtags in regular blog entries, this does not bode well for my mental state!). When I clicked the log file button these were the last few errors:

>> Could not crate VTOC target
>> TI process failed.

I thought it could have had something to do with ZFS specifically, but doing some research online I came across this discussion thread where Basant suggests the problem is with the EFI partitioning scheme employed by Bootcamp.

Prime cause why it was failing was because of EFI partition. After I reset the partition id of EFI partition (#1) using "setpid 1to AF" and rebooted, my problem went away and opensolaris installed and booted just fine. I had also marked the partition as Active from Linux fdisk command so I didn’t need to do the fdisk.real hack.

The fdisk.real hack being referred to turns out to be this official workaround in response to a recognised bug in OpenSolaris.

Going to take another plunge, here’s hoping one of these tricks does the… trick.

Sunday 15th March 2009

Changing folders in the Terminal on Mac OS X

Demonstrating the different ways to change folders

I think one of the great things about Mac OS X is it lets people learn Unix commands in a familiar setting, and I’ve been encouraging people to do so. When you mess around in Terminal.app, almost all the commands work the same in the other BSDs, and in a similar fashion to Linux, Solaris etc.

One of the most common questions I’m asked by people learning Unix commands from scratch on the Mac is how to change folders/directories that have spaces or punctuation characters.

There are three ways, the simplest of which is just to enclose the name of the directory in double quotes:

% cd "/Users/rubenerd/Folder With Spaces"

An alternative which you may be more familar with if you’ve done scripting in Perl for example is to "escape" the characters with backslashes:

% cd /Users/rubenerd/Folder\ With\ Spaces

The third way is to escape the characters in the directory name, but let the computer do it for you: the default shells in Mac OS X allow tab filename completion. In this case, start typing the name of the directory you want to change to, then hit [TAB].

% cd /Users/rubenerd/Fold[TAB]
becomes…
% cd /Users/rubenerd/Folder\ With\ Spaces

Icon from the Tango Desktop projectIf you have several directories with the same first few characters the shell will either beep at you or show you a list of the folders (and sometimes files, symbolic links etc) that match your criteria. In this case, just keep filling the name of the directory until you have enough of it that’s unique.

These three methods are also used if you need to reference files with spaces and other characters in the Terminal too. Personally since I’ve started living in Terminals I choose not to name my files with spaces any more to save myself some time, but if you’re mostly a graphical desktop user that’s dabbling in this stuff, these work just fine.

Friday 13th February 2009

Happy 1234567890 everybody!

Asahina Mikuru scaring Daffy Duck!

Stuff the 14th of February being Valentine’s day, tomorrow is day for Unix geeks in Asia Pacific to celebrate because this happens to be the day that is represented in Unix time systems as 1234567890. In the US (and I believe Europe), 1234567890 will be happening on the 13th of February… there’s something sinisterly poetic about that :).

If you like Bill Kurtis and don’t know (I’m not Bill Kurtis), Unix and Unix-like systems such as GNU/Linux, FreeBSD and Mac OS X store dates as a sequential series of numerals representing the number of seconds since the 1st of January 1970. There are caveats to this explanation, but that’s the gist of it.

There’s a problem though: because these numbers were traditionally expressed as 32 bit integers, in 2032 we’ll run out of dates we can keep track of. This problem would manifest itself In the same way for the same reasons as the Y2K bug.

ASIDE: As far as I know the BSDs now uses 64 bit time as does most GNU/Linux distributions, but don’t quote me on that.

In the meantime, Happy 1234567890 everybody! I’m going to be celebrating by staying at home and painfully coughing loudly while I have difficulty breathing, holding food down and my sinuses continue to flare up and down. Will be having lots of soup though and will be watching some silly anime shows and Warner Brothers cartoons from sixty years ago, exciting and enjoyable stuff I can tell you!

I wonder what would happen if Elmer Fudd and Daffy Duck met Suzumiya Haruhi in some time matrix thing? If they can make a Flintstones and Jetsons crossover movie, why not that? ^_^. Can you believe some people actually liked the cheesy Disney characters better than the sarcastic, hilarious Warner Brother’s Merry Melodies chaps?

If you didn’t see, I just posted another entry where I link to Duck Amock, a Daffy Duck cartoon that also happens to be the single greatest cartoon of all time.

Did I say Happy 1234567890 already? Happy 1234567890 everybody!

Tuesday 09th October 2007

The mysterious little DFE-670TXD

DFE-670TXD

The DFE-670TXD is a mysterious little ethernet card, because it’s turned my old ThinkPad 600E into a very picky eater. With this card plugged into either of the PC Card slots:

  • My beloved FreeBSD installs, but throws errors upon booting despite the fact the very card is named and supported in /etc/defaults/pccard.conf
  • NetBSD not only refuses to install, but just reboots the machine before it’s even finished booting of the CD-ROM
  • My Linux distro of choice Slackware detects and installs the card, but upon using it after installing the base system, the entire system hangs forcing a hard reset

Curiously, the only operating system which installed and detected the card perfectly was… OpenBSD! I have no idea what OpenBSD is doing differently, but booting of the CD and going through the installer the card is detected automatically. When I reboot the machine with OpenBSD installed, I can use the internet, share files on the local network and synchronise with time servers without any problems!

FreeBSD is my operating system of choice generally, but OpenBSD for some reason which completely baffles me right now is the only one that works. I’m completely baffled. Did I mentioned I’m baffled? Bamboozled? Anyone with knowledge on how OpenBSD drivers work know why or have any theories?

In any case I guess I’d better brush up on the OpenBSD FAQs, because I have an OpenBSD machine now!

Thursday 23rd August 2007

Modular Xorg on NetBSD from scratch

NetBSD Xorg Orange
That’s a lot of orange! That reminds me, I need more F&N… Orange

NetBSD is one of the last Unix-like operating systems still shipping by default with the XFree86 X Window Server as opposed to the new de facto Xorg distribution. From what I’ve been able to find out doing a quick Google around is that given the system’s strict requirement for portability it’s going to take a lot of work to get Xorg working on every port. I respect that.

So enter pkgsrc and modular Xorg! Modular Xorg is an exciting new way of distributing Xorg because it allows you to cherry pick only the drivers, applications and other whatnot that you want instead of installing one huge package.

For me, I’m using a fresh install of NetBSD 3.1 in a VMware Fusion virtual machine, so you’ll obviously have to take these steps as a guide for your own system.

During the initial install I chose the Custom Installation option and de-selected the X11 Distribution Set. This means I avoided any mess right from the beginning, just as I did when I changed from Monolithic Xorg to Modular Xorg on FreeBSD.

Once you’ve installed NetBSD, do your usual configuration of /etc/rc.conf to enable your network, and add X11_TYPE=modular to your /etc/mk.conf file. DON’T add a X11BASE line!

Then go grab yourself the latest pkgsrc tree and update it.

Now it’s just a matter of make install clean clean-depends -ing each package we want. If you really wanted to, you could just install all the meta-packages:

… but that really defeats the purpose of going modular! For me, I installed the base server, the entire fonts meta-package, only the drivers I needed, and the minimum required apps:

Obviously when I said minimal I wasn’t kidding! These packages are enough to get an X session started, but that’s about it. If you’re installing a desktop environment such as KDE, Xfce or GNOME you can go right ahead and install their respective packages, but if you’re using a vanilla window manager such as OpenBox you’ll really need to install at the very least a terminal emulator. I like urxvt.

It is defintely more work to install modular Xorg, and in many cases the default XFree86 distribution Is Good Enough™, but I like the added control this gives me, plus then I have the added convenience of using similar software on my other BSD and Linux machines. Right Mai?

Is she pissed off or distracted somehow? I don’t know. Maybe she runs OpenBSD instead. It’s 01:52, maybe I actually need to go to sleep now.

Monday 20th August 2007

Another look at NetBSD

A fresh NetBSD install

After a year or so of using FreeBSD I decided today to take another look at the operating system I learned UNIX on from the beginning: NetBSD (well actually it was Red Hat Linux 5, but I never left X!). I admit the way I learn things is to be focused on one specific programme, language or OS and hack away for a week rather than trying to be vague and learning many things at once not that well and not in much detail, and therefore not making much more than token advances in understanding. See how I slipped my critique about my university studies there? ;).

Reading back some of my previous posts I’m not entirely sure why I switched completely to FreeBSD back at the beginning of last year. I think part of the decision stemmed from VMware’s official support of FreeBSD and the fact that more people were using it, so I figured it was a better boat to be floating in. I’ve been using a lot of boat analogies lately, I’m becoming a bit washed up. Get it? Aha. RATHOLE!

Having used NetBSD though for a few hours I’ve remembered what I love about it:

  • the layout of the file system is so clean
  • the initial installer is fast and slick
  • pkgsrc simply rocks!
  • the PowerPC port is an equal citizen not a afterthought next the x86 version, so my old Power Macintosh G3 and iMacs can use the same OS as my generic AMD boxes and just as well
  • compared to Linux it really boots up in a flash, like FreeBSD
  • KDE and Qt apps seems more stable on NetBSD (perhaps it’s just me) and Konqueror has the search box by default right from pkgsrc
  • if it’s good enough for Wintellect at BSDNexus, it’s damn well good enough for me!

That said though, I’m not giving up on FreeBSD, I think there’s definitely room for both. The default addition of portsnap and jail abilities (and coloured file listings!) are still very compelling, and the support for it in third party applications and drivers is certainly stronger. I think it will come down to a machine by machine choice for now.

I think it’s safe to say I’m a *BSD enthusiast, I am a happy user of Mac OS X, I have a passing interest in GNU/Linux and Solaris, and I have a healthy distaste for Windows and System 7 ;).

NetBSD

Tuesday 14th August 2007

Just bought VMware Fusion

A couple of days ago I finally gave in and purchased a copy of VMware Fusion. Having used the demo versions of Parallels Desktop and Fusion on my MacBook Pro I decided VMware’s product was much more suited to my needs. Parallels seems to be great for running Windows, but my main use is for FreeBSD and other Unix-like development which Fusion has better native support for (official additions for FreeBSD and Solaris anyone?). And with a special offer of $39.00 for first time beta purchases before the final version came out I figured it was the best choice. I should have taken a PR course at university instead.

So now I have the final, official retail release of VMware Fusion running on my MacBook Pro, and I’m loving it. Having a dual core processor with VT support really kicks some serious virtual arse.

Below is a screenshot of fresh virtual machines running OpenBSD 4.1 sitting at the shell, NetBSD 3.1 with a basic OpenBox window manager session, ReactOS and an installation of Windows 2000 Professional humming along:

VMware Fusion

I do admit I do run a purchased, fully licenced copy of Windows 2000 as a virtual machine to run a few apps that don’t work so well on Wine, and for testing of my websites using Internet Explorer 6. Windows XP and Vista just add useless features and require more system resources, so 2000 works just nice. Well, as nice as Windows can.

Below is a screenshot of AutoPatcher running under Windows 2000 using the Unity feature of Fusion which makes it look as though Windows applications are running on the Mac OS X desktop. I much prefer to use AutoPatcher than Windows Update because it means I don’t have to run Internet Explorer to use it, and I don’t call home to Microsoft.

VMware Fusion

And here it is running in it’s own window. I actually think I prefer having it this way:

VMware Fusion

I just love having virtual machines. I can tinker away with really fascinating operating systems and learn so much, without stuffing up anything when I do something wrong. It’s great for sand boxing, and it also allows me to run a scaled down FreeBSD machine with just the bare basics so I can study without distractions. Not to mention compiling applications for different platforms… the possibilities are so exciting!

Or maybe I’m just easily excited ;).

< Older posts
Dedicated to my groovy late mum Debra Schade.