Ubuntu Linux, Yellowdog Linux and Mac OS X, all on one PowerBookThe Intuitive Life
Business
Blog
Dave Taylor has been involved with the Internet since 1980 and is widely recognized as an expert on both technical and business issues. He has been published over a thousand times, launched four Internet-related startup companies, has written eighteen business and technical books and holds both an MBA and MS Ed. Dave maintains three weblogs, this one focused on business and industry analysis, the eponymously named Ask Dave Taylor devoted to tech and business Q&A and APparenting.com, discussing topics of interest to parents. Dave is a highly-rated speaker, sought after workshop facilitator and frequent radio guest. Ubuntu Linux, Yellowdog Linux and Mac OS X, all on one PowerBook? In a bit of a break from business analysis, I thought it would be fun to post one of my more technical articles to re-establish my "geek cred", if you will. This article details the trials and tribulations of turning a perfectly good Apple PowerBook into a tri-boot system with Mac OS X, Yellow Dog Linux and Ubuntu Linux. Mac OS X is built of two components, Darwin, the BSD-based Unix underpinnings, and Aqua, the beautiful graphical user interface we Mac heads have all grown to love. However, there are other operating systems and other work environments that can be installed on an Apple system, based on popular open source Linux applications. If you’re looking for Intel-based versions of Linux, there are dozens and dozens, but the PowerPC chip cuts those options down quite a bit. I decided it’d be interesting to install the most popular Linux for PowerPC - Yellow Dog 4.0 - and an up and coming Debian-based Linux distro that’s getting quite a bit of buzz in the community: Ubuntu Linux. Unlike Microsoft’s VirtualPC application, these operating systems can’t be installed within Mac OS X, but rather have to be installed adjacent to, or instead of Mac OS X. I decided to install all three on my new 1Ghz Aluminum PowerBook G4 system. With 1GB of RAM and a 60GB drive, I figure there was plenty of space to steal 8GB for the two Linux installations and still have plenty to continue running Mac OS X with all my favorite applications. This meant that to get started I needed to partition the drive, to take the 58GB partition (the maximum available space on a 60GB drive: don’t ask where the other 2GB go, they’re just eaten by the same gremlins that cause your 17” monitor to actually only measure 15.5” diagonally) and shrink it down to make space for two more operating systems and all of their additional files. The traditional way of shrinking a disk partition is to simply reformat the drive, which has the unfortunate and tedious side-effect of completely removing everything on the disk. All apps, all data files, all photos, iTunes libraries, everything. DYNAMICALLY RESIZING DISK PARTITIONS Rather than go through that pain, I instead decided to try working with a program called VolumeWorks, from SubRosaSoft. VolumeWorks is a disk repartitioning tool that can dynamically resize partitions without destroying all the data within. Though it can only resize HFS+ volumes, not UFS, that was fine, because the existing Mac OS X partition was already in HFS+ format. As with most disk utilities, you can’t work on the boot partition, so I opted to use Firewire target mode to mount the laptop hard disk onto my G5 system before I tried to resize the disk partition. Before I could begin partition resizing, however, I had to defragment the disk first - no surprise - and before I could do that, I had to verify the disk. With a 60GB disk, there are exactly 57.8 GB of disk space available, so I resized that partition down to 50GB, then allocate 3GB for Ubuntu and 4GB for Yellow Dog, based on the Ubuntu and Yellow Dog recommended install sizes: 1.8GB for Ubuntu and 2.2GB for the workstation installation of Yellow Dog. What does "Ubuntu" mean? Ubuntu (ooh-BOON-too) is an African word that has been described as "too beautiful to translate into English". The essence of ubuntu is that "a person is a person through other people". It describes humanity as "being-with-others" and prescribes what "being-with-others" should be all about. Ubuntu emphasizes sharing, consensus, and togetherness. One thing I would have appreciated in VolumeWorks was some estimate of how long it would take to defragment my system. Without a clue, I had no idea whether it would take five minutes or 17 hours, so I asked Mark Hurlow of SubRosaSoft, who told me “it should take 6-8 hours to defragment a severely fragmented disk”. BURNING ISO IMAGES As a result, while I was waiting I switched to the Mac application Toast Titanium 6 and burned the single Ubuntu install CDROM, freely downloaded from the ubuntulinux.com Web site. Gaining some coolness points, Ubuntu is also available as a torrent file, and the 592MB file downloaded speedily through the BitTorrent network. As the Ubuntu team warns on their site, it’s always important to burn the ISO data directly, not open it, mount it, or otherwise do any manipulation. Fortunately Toast can open a .iso file and immediately know how to handle the data. I was also going to download Yellow Dog Linux’s new 4.0 release, but managed to time things when they’d just that day announced the availability of YDL4 for purchase only. A colleague who was also busy installing a Linux on his Mac unsurprisingly told me “I’m not about to pay $60 for a Linux distro, so YDL’s clearly not for me.” What he didn’t realize was that after a few weeks of selling the new distro, the four install ISO images were made available on the Yellow Dog site as free downloads. Nonetheless, it suggests that the Yellow Dog folk, TerraSoft, would do well to have a countdown timer to the free downloads being available or something that would let new customers know that it was a “when” not an “if” regarding getting a free copy of YDL4. AND THUS THE PARTITION WAS TRASHED Meanwhile, back to VolumeWorks. The night had passed and to my surprise the disk fragmentation status window hadn’t changed a bit, so with great trepidation I did a force quit and killed the program. To my surprise, my laptop still booted into Mac OS X, so I started up VolumeWorks again. This time it showed the same fragmentation picture, but decided within a few seconds that it wasn’t sufficiently fragmented to be a problem. Five minutes later I had three partitions, 3GB, 4GB and 50GB. Then I rebooted the laptop and waited… and waited… and gave up after about twenty minutes. Instead, I remounted the drive via Firewire target mode and ran Apple’s Disk Utility to verify each partition. The two new partitions verified without a problem, but the older partition had an unsurprising error: Invalid number of allocation blocks. The volume needed to be repaired, but… it couldn’t be repaired using Disk Utility. I tried the “reset” feature of VolumeWorks to see if that’d make the changes necessary (since it’s supposed to recalibrate the basic size parameters of the partition to match the size of the drive space) but to no avail. When queried, Mark Hurlow of SubRosaSoft answered “I suspect we may have problems with FireWire Target mode” and I was stuck having to reformat the partition and do a clean install (read “waste lots of hours”) of Mac OS X Panther. Blech! INSTALLING UBUNTU LINUX Having rebuilt Mac OS X, I proceeded to install Ubuntu Linux on the smaller of the two new partitions. Having burned an install CDROM, I simply rebooted and promptly got a typical quasi-graphical Linux installer interface. The installer went through many cycles of detecting hardware, and finally asked for a hostname (I choose “sawubona” which means “hello” in Zulu). Confusingly, though the documentation indicated that I only needed one partition, you in fact need to have two partitions to proceed with Ubuntu installation, a standard Linux partition (I used ext3 as my partition format) and a “NewWorld boot” partition for booting purposes. The first phase of the installation completed and I was presented with something I hadn’t seen on a Mac since working with A/UX oh so long ago: an option to boot into different operating systems at startup! Ubuntu then prompted me to create a user account, set the password and time zone, then went through uncompressing and unpacking the hundreds of packages that comprise the distro without giving me any option to choose which I preferred. That phase took about ten minutes, and when it was done I had a lovely login screen with GNOME ready to go. The only hiccup encountered was that Ubuntu didn’t automatically see the wireless Airport card built-in to my PowerBook. To solve this problem, I posted a message to the Ubuntu user forums (www.ubuntuforums.com) and within about 12 hours had a response: the Airport wireless cards aren’t supported by Linux because Qualcomm hasn’t released those specs to the open source community. What a drag! Instead, it was time to plug in an Ethernet cord, under great duress, so I could be online. FINE TUNING THE BOOT SEQUENCE WITH YABOOT The boot control application that lets you pick which operating system you want to have run when you start up the computer is called yaboot and by default it gives you about 15 seconds to pick between Linux and Mac OS X then defaults to launching Ubuntu. The first thing I wanted to do was change the default operating system to Mac OS X, not Linux. Fortunately, there’s a great yaboot reference document online at the yaboot site. It turns out that the change is trivially simple: in the file /etc/yaboot.conf I simply needed to add defaultos=macosx. ![]() Figure 1: Ubuntu desktop, The GIMP graphics editor, Firefox Web browser and a terminal session are all running on Mac hardware. Note the Mac OS X partition is mounted too. The second - and critical - step is to actually install the updated bootstrap loader configuration file, and that’s done with /sbin/ybin -v which figures out where the new configuration file should be moved and does it. Perhaps the most amusing line in the entire process is the output statement “Blessing /dev/hda6 with Holy Penguin Pee”. Only in the world of Linux! INSTALLING YELLOW DOG LINUX Conveniently living less than an hour’s drive from Terra Soft, I was one of the first people to receive a copy of their 4.0 boxed release. Impressively well-packaged it reminded me of nothing so much as early Red Hat Linux. Deliberately, I’m sure. Included in their $60 retail box are eight CDROMs: four install disks and four source disks. Imagine, the entire source code for your operating system and all major applications! To get started with the installation I first made sure that I wrote down all the boot parameters from the existing yaboot configuration file to ensure that I would be able to again find the Ubuntu Linux boot area if it wasn’t automatically found by the Yellow Dog boot controller. Remember, I’d previously split up the Mac hard disk into quite a few different partitions… Yellow Dog shares quite a bit of lineage with Red Hat: it’s the Fedora core and even the installer is the Red Hat program Anaconda, which is quite a bit more attractive and easier to use than Ubuntu Linux. Disk Druid is the utility that helps work with partitions, and it was quite confusing to have it show the NewWorld boot partition, the Mac OS X partition and the Ubuntu partition. Nothing else, just those three. Where was the 4GB partition I had saved? A bit of exploration revealed that Disk Druid actually showed a small unallocated portion of the physical drive too, so clicking on “new” allowed me to create a new ext3 partition within which I would be able to install Yellow Dog after all. And yet, that wasn’t sufficient because YDL also needed a swap partition, so I ended up splitting that partition into two: 3.5GB and 500MB, the former for Yellow Dog and the latter for swap. Then it was the fun of digging through the hundreds of possible packages to install (an option that was completely lacking with Ubuntu), allowing me to skip installing Emacs and instead add the X11 version of vim, a much more useful editor, in my opinion. I also added lynx and ncftp for command-line Internet capabilities. Once everything was installed - which took surprisingly little time - the system rebooted into the familiar yaboot window and showed one Linux option: Yellow Dog. I expected Ubuntu to vanish, so I didn’t panic. The boot into Yellow Dog proceeded and, as much as I like the informal and slim Ubuntu, Yellow Dog’s Fedora on Mac installation process blows it away. It is as if I had watched a generation or two of Linux evolution happen before my very eyes. Better graphics, better use of screen real estate, clearer configuration and setup, and many more improvements. PROBLEMS WITH YELLOW DOG But things weren’t quite right. During the installation, I was able to test the audio driver and it worked fine, but when starting up YDL, I hit “SNDCTL_DSP_SETFMT failed” and found that the audio device was disabled. I asked Kai Staats, CEO of Terra Soft, about this problem and he responded: “This usually has to do with the order in which the drivers are loaded. Try logging out of the GUI and back in again.”. I did that, but nothing changed. ![]() Figure 2: Yellow Dog Linux runs KDE, Open Office (showing a photograph), Mozilla’s Web browser and has the Mac OS X disk partition mounted and showing on the desktop. Everything looked fine until I launched Mozilla, at which point all the colors on the display weirded out. That’s the technical term! Mozilla modified the system color map on launch and suddenly the crisp text was barely readable and all the nice colors were considerably more psychedelic. With a wee bit of guessing, I managed to launch the Display configuration tool and modified the screen resolution. But there was still a bit of confusion with the display configuration: KDE had the monitor set to “generic lcd” even though the Apple display had been correctly identified during one of the earlier stages of the installation process. It was easy to open up System Settings -> Display and choose Hardware -> Monitor Type and select “Apple Aluminum PowerBook G4” and restart X11. Much better! There are also some oddities in the default YDL configuration of the Desktop, not the least of which is a Floppy device being shown when -- psst! -- there hasn’t been a floppy included with Apple hardware for years and years. Unsurprisingly, YDL couldn’t see or configure the Airport Extreme card to allow access to the Internet via wireless, so I had to dig out an Ethernet cable to get online, as I had also done so with Ubuntu. TWEAKING YABOOT FOR THREE INSTALLED OPERATING SYSTEMS Having installed Yellow Dog, I suddenly couldn’t see Ubuntu any more. If I hadn’t previously written down the partition number, I would have suspected that it had just vanished. A quick query to Ethan Benson, developer of yaboot, and I had my answer: I needed to move the individual Linux partition specifier (it says partition=2) into the YDL section and add another section for Ubuntu that specified the partition of the Ubuntu installation (partition=9). I ended up with two image blocks: image=/boot/vmlinux-2.6.8-1.ydl.7 partition=2 label=yellowdog read-only initrd=/boot/initrd-2.6.8-1.ydl.7.img root=/dev/hda2 append=”rhgb quiet” image=/boot/vmlinux partition=9 root=/dev/hda9 label=ubuntu read-only initrd=/boot/initrd.img When the Mac boots, I still see the standard yaboot options of linux, macosx or cdrom, but selecting linux now gives me the option of typing in either “yellowdog” or “ubuntu” to specify which I wanted to actually start. Works like a charm! MOUNTING THE MAC OS X HFS+ PARTITION To be truly useful as alternative operating systems, both Ubuntu and Yellow Dog needed to let me mount the Mac OS X disk so that I could access all my files and data. Fortunately Terra Soft, makers of Yellow Dog Linux, have excellent online documentation and it didn’t take me long at all to find out that if I know what partition holds Mac OS X - mine is /dev/hda8 - then it’s two quick shell commands: mkdir /mnt/macosx mount /dev/hda8 /mnt/macosx -t hfsplus Even better, I just added an entry for macosx in the /etc/fstab file so that the Mac OS X partition is automatically mounted and appears on the desktop each time I started up either Linux. To mount in the other direction, that is, to mount the Linux partitions within Mac OS X, I found an external product that offers support for the Linux ext2/ext3 file system; ext2fsx, a free implementation of the ext2 file system (ext3 is backwards compatible with ext2) for Mac OS X. This utility made it a breeze to mount both the Yellow Dog Linux and Ubuntu Linux partition. Frankly, I’m baffled why Mac OS X doesn’t include native support for ext2 and ext3 file systems. CLOSING THOUGHTS ON THE TRI-BOOT MAC Given the choice between Mac OS X and Linux, I have to say that I prefer Mac OS X at the end of the day. All of my familiar applications are available and it’s an interface I’ve used on a daily basis for years, so there’s a significant comfort level. Further, because of its Darwin/BSD base, Mac OS X also includes X11 and a full Unix underpinning, offering many of the same benefits as running Linux directly. But it’s Linux that lives at the center of most of the open source community, and it’s Linux that includes a complete office suite, top-notch Web browser, powerful image and graphics editor, dozens of professional applications, and a solid and time-tested development environment for free, easily downloaded or purchased for just a few dollars. With the Ubuntu Linux installation, the entire OS fits on a single CDROM for installation. Yellow Dog requires four, which of course means that it offers considerably more applications and options. One reason I like Ubuntu over Yellow Dog, though, is that Ubuntu defaults to the slick GNOME graphical environment, while Yellow Dog uses KDE, an alternative that’s attractive, but less compelling. Ubuntu also worked just fine with my laptop, never glitched on the graphics, and the audio worked every time. If you want to learn more about the world of Linux you can’t go wrong with either of these two Linux operating systems for Macintosh. Even better: if you’ve an older Mac that doesn’t have the oomph to run Panther and, soon, Tiger, then turning it into a Linux-based server could be a terrific alternative. This article was commissioned by and originally appeared in LinuxWorld Magazine and is © 2005 by Dave Taylor. I'd be happy to grant reprint rights if you or your organization is interested: just ask first, please! Posted by Dave Taylor at May 14, 2005 08:31 PM Keywords: linux,linux on mac,darwin,ubuntu linux,yellow dog linux,yellowdog linux,apple powerbook,tiger,panther Previous Entry: Your Daily Art: A great example of leveraging blogging Weblog Home: The Intuitive Life Business Blog Website Home: Intuitive Systems Comments Major article typo: (losing geek cred :-) the Airport wireless cards aren’t supported by Linux because Qualcomm hasn’t released those specs to the open source community. I suspect you mean Airport Extreme and Broadcom. Posted by: Lubo Diakov on May 18, 2005 02:33 PM Hi - You could have saved yourself all that trouble reinstalling OS X if you had backed it up to another drive first. SOP, if you're going to geek around with your system. In addition, this strategy would have eliminated the necessity of using VolumeWorks to defragment your drive or adjust your partitions. Having a viable backup, you could have gone ahead and used Disk Utility to repartition your PowerBook hard drive (while the PowerBook was in Target Disk Mode or by booting from an OS X install CD); you would then have been able to boot from the backup partition and mirror it back to a spanking clean 50 GB partition on the PowerBook. This would have saved you risk, time and aggravation. Posted by: B. Jefferson Le Blanc on May 18, 2005 04:53 PM Posted: Wed - May 18, 2005 at 08:40 PM |
Quick Links
Calendar
Categories
Archives
Statistics
Total entries in this blog:
Total entries in this category: Published On: Jul 15, 2005 09:14 PM |
||||||||||||||