Yellow Dog Linux Installs Neatly on an iPod
The concept's great: what would it be like to have a pocket-size device that I could plug in to just about any Macintosh and by simply rebooting the computer be running a full-blown Linux installation? There are oodles of Linux OSes for Intel architectures, of course, but the Mac, until very recently, has been built around the Motorola architecture, so the number of choices are rather fewer.
One of the few Linux OSes for the PowerPC is called Yellow Dog, from Terra Soft Corp., www.yellowdoglinux.com. It costs about $60 US for the install CDs and documentation or $30 US for the “geek edition” (that's just the install CDs), or you can download it for free from the Web site. And, let me answer the obvious question: because Mac OS X already is a UNIX (basically FreeBSD with lots of added stuff, much of which you can find in Darwin, www.apple.com/darwin), why bother with a Mac Linux? The answer is that although Mac OS X is a splendid mating of a UNIX operating system with all the graphical goodness of Apple's user interface design, it's still not Linux. If you're in a Linux environment and want to run KDE or GNOME, you don't have to graft it onto Mac OS X if you can run a Linux designed for the Mac platform instead. Besides, isn't it kinda cool anyway?
Anyway, I had a spare Apple iPod, a first-generation 5GB device that worked via the Firewire interface rather than the more modern USB connection, and I was assured by the folks at Yellow Dog that I could squeeze YDL into as small as 1GB. I have plenty of space on a 5GB device. Of course, I already had a gig of music and audio books I wanted to preserve, so the first test was to see if I could repartition the device to grab 3GB for Linux and keep 2GB for audio and iPod content. The perfect stealth Linux device, right?
So, one afternoon I decided to take the plunge and hooked up my iPod to my PowerBook computer and inserted the first of the YDL 4.1 install disks and restarted the Mac, holding down the C key to force the device to boot off the CD-ROM, not the internal hard disk. When prompted, I typed in install firewire and away we went.
New to the 4.x version of Yellow Dog is the inclusion of the popular Anaconda graphical installer, which makes everything quite a bit easier. It lets you resize existing drive partitions to make space for the new operating system. The new partitions also can be made bootable, which is a critical component for the success of this project.
Theoretically, partitioning should be pretty easy. I have a 5GB iPod firewire device and am using just a wee bit more than 1GB of it for music. I'll resize the iPod drive to 2GB and have 3GB spare to repartition as an ext3 filesystem and be good to go.
Well, that's the theory, but it doesn't quite work out that way.
Part way through the install process, managed by Anaconda, I have the option of accepting an automatic partitioning scheme or using Disk Druid to work with my disk partitions manually. I take the latter path and am glad to see that one of the drives is identified as “Drive /dev/sda (4769MB) Model: Apple iPod”, so there's no worry that I'll accidentally reformat or resize my laptop drive, which would be quite ungood. To resize the iPod drive, I simply choose that partition and click Edit in the Disk Druid, and then specify that I want it to be 2,000MB rather than 4,769MB (which should give me 2.7GB for Linux). It promptly recalculates that to be 1,999MB and within about 90 seconds rebuilds the iPod disk partition, leaving a big chunk of space unallocated.
Here's where I get into trouble, because I'm a UNIX geek who is sure that I can proceed without reading any darn manual or instructions. Yeah, even Terra Soft expects this and has a note in the installation guide (which I didn't read until afterward, of course) saying, “User error is common. Not because people lack intelligence, but because people are smart and too determined to jump into their new operating system without reading the Guide to Installation. Especially those of you who are Linux Experts—you know who you are!” Yeah, yeah, yeah.
Fortunately, the trouble ate up only time, and didn't corrupt anything. Basically, although I figured that I simply could create one partition that was all the available space, Disk Druid wouldn't let me proceed without also creating an Apple Boot partition, and then, after I figured that out (the Apple Boot partition is instead of ext3, and not the same as the /boot mountpoint for an ext3 partition), it also insisted I create a swap partition too.
More than once it complained, and I had to back up and resize the new partition down, then create an additional partition, but, finally, here's where I ended up (Table 1).
Table 1. Partition Breakdown
If you're paying attention, you'll see that the swap space is really too small. You should have at least the same swap space as your physical memory, and typically 1.5x is a better size for performance reasons. Because I have 756MB of RAM, that means I should have at least a 756MB swap space. Oh well. I indicated that I was okay with a nonrecommended size and proceeded anyway.
Elapsed time: 1 hour.
Dave Taylor has been hacking shell scripts for over thirty years. Really. He's the author of the popular "Wicked Cool Shell Scripts" and can be found on Twitter as @DaveTaylor and more generally at www.DaveTaylorOnline.com.
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems
Join editor Bill Childers and Bit9's Paul Riegle on April 27 at 12pm Central to learn how to keep your Linux systems secure.
Free to Linux Journal readers.Register Now!
- Cluetrain at Fifteen
- Getting Good Vibrations with Linux
- Embedding Python in Your C Programs
- New Products
- Memory Ordering in Modern Microprocessors, Part I
- Customizing Vim
- [<Megashare>] Watch Mrs Brown's Boys Movie Online Full Movie HD 2014
- Security Hardening with Ansible
- Tech Tip: Really Simple HTTP Server with Python
- RSS Feeds