Archive

Archive for the ‘Operating Systems’ Category

OSX & Ubuntu Linux on an iBook G4

August 5th, 2007 Stephen No comments

Ubuntu on iBook G4

My iBook G4 wasn’t being used much so I decided to install Ubuntu Feisty on it. Here’s how it was done, and I give you the warts and all procedure, as it happened, in the hands of an average tinkerer.

First things first, back up all critical files and extra applications on the iBook to another disk of some kind. Your existing OS X will be overwritten.

Then download the “Mac (PowerPC) and IBM-PPC (POWER5) desktop CD” from here:

http://cdimage.ubuntu.com/ports/releases/feisty/release/

You’ll find it at the top of the page. Burn the ISO to disk.

Then boot up the iBook using your Mac OS X setup CD 1. Once up and running, launch the Disk Utility program. This is going to be used to partition the disk so that you can put OS X on one partition and Ubuntu on the other. Remember, the present OS X is going to be overwritten—there is no turning back once the disk is partitioned, so double check that you’ve got everything you want.

Partition sizes will depend on you. I just split everything down the middle. Some people use around 10GB for OS X, but that doesn’t leave any space to play around with, and you would have to omit or delete things like the Garage Band program.

Just make each partition Mac OS X Extended HFS or HFS+. Don’t use HFS+ Journaled, as you won’t be able to write to the OS X partition from Linux. But even if you do, you can disable journaling later, as I had to do, anyway (see below).

When it came to naming each partition, I named the first one “Ubuntu” and the second one “OSX”. That was supposed to prevent confusion about where things were going. Then I went straight ahead and installed OS X on the OSX partition.

Some people advise to install Mac OS X on the partition at the end of the disk. Well, I thought I was doing that by installing to the partition I had named OSX, but I may have misread the Disk Utilities setup, or it may have made up its own mind where it was going, because it ended up at the front of the disk. Not to worry, as it just doesn’t seem to matter, in my experience.

Now the fun starts. Eject the Mac OS install disk and insert the Ubuntu Feisty install disk you burned earlier. Boot from this disk by holding Option + c during start-up. Type “expert” at the boot-loader prompt. This will give you more control during the installation process. Also, make sure you have a network connection so that networking is automatically configured and the system can get any necessary downloads.

Go through the installation process as usual. Everything is straight forward, until you come to the partitioning section. I mean, if you don’t accept the default, letting the installer auto partition for you, you have to put some thought into it to set up your own partitions. First, delete the Ubuntu partition you created earlier, then go back and choose to use maximum free space.

Now, if you don’t care to have customized partitioning , just accept the defaults and skip the next three paragraphs.

I have a confession to make at this point. I used what was the latest build of Ubuntu Gutsy PPC Server as part of my experiment—blame my tinkering gene. The Gusty install calculated the partitioning nicely for me, which desktop versions don’t do, as far as I know. I let it write the partitions.

But then I reflected, if should things not work out, I don’t want to be dealing with a command line. So, I stopped the install process and began again with a Feisty desktop CD, and when it came to the partitioning section, I simply reused what the Gusty disk had set up. I had to rename them, though.

It was lucky I did install Feisty because I learned later after an upgrade that Gutsy is buggy and as slow as hell on an iBook. Abandon all hope ye who enter that zone of hell! I reinstalled Feisty after that little adventure.

Once past partitioning, Ubuntu will continue installing everything smoothly and will eventually install the Yaboot boot manager for choosing your preferred system to boot-up time, OS X or Ubuntu.

That should be it. It’s time to restart, and then you can check that you have ended up with a disk structure something like this:

/dev/hda

  1. type name length base ( size ) system

/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap untitled 1954 @ 29302624 (977.0k) NewWorld bootblock
/dev/hda3 Apple_HFS Apple_HFS_Untitled_2 29040416 @ 262208 ( 13.8G) HFS
/dev/hda4 Apple_UNIX_SVR2 untitled 585938 @ 29304578 (286.1M) Linux native
/dev/hda5 Apple_UNIX_SVR2 untitled 10443360 @ 29890516 ( 5.0G) Linux native
/dev/hda6 Apple_UNIX_SVR2 untitled 5328126 @ 40333876 ( 2.5G) Linux native
/dev/hda7 Apple_UNIX_SVR2 swap 1494141 @ 45662002 (729.6M) Linux swap
/dev/hda8 Apple_UNIX_SVR2 untitled 781251 @ 47156143 (381.5M) Linux native
/dev/hda9 Apple_UNIX_SVR2 untitled 10667726 @ 47937394 ( 5.1G) Linux native
/dev/hda10 Apple_Free Extra 262144 @ 64 (128.0M) Free space

Block size=512, Number of Blocks=58605120
DeviceType=0×0, DeviceId=0×0

Lovely. Boot into OS X, fire up a terminal window and type in “fdisk -l” to get the list.

That was easy for me to do because it just booted into OS X all of the time. Yaboot’s little menu screen should have appeared, where you can hit “l” to boot into Linux or “m” to boot into Mac OS X, or you can leave it for Ubuntu to start loading by default, but that isn’t what was happening for me. For some reason, Yaboot just wouldn’t kick in.

That was no problem. If Yaboot is a no-show, open up the Mac’s open firmware console. You do this by booting up while holding the Mod + Option + o + f keys. (The Mod of Cmd key is the one with the Apple logo.) This will put you in “Open Firmware” mode. Once you have the console type this:

boot hd:2,yaboot

At least, that’s what I needed to enter. (The hd:2 here just means hda2, where Yaboot is loaded. You can see that hda2 is called Apple_Bootstrap untitled in the fdisk list above).

After I did that it booted up into the Yaboot menu and after a few seconds, by default, Ubuntu started loading. Everything worked fine. Good, now’s the time to fix it so that Yaboot gives you a dual boot option, and you can tweak it a bit while you’re at it. So open up a terminal and run these commands.

sudo yabootconfig
sudo gedit /etc/yaboot.conf

That yaboot.conf is of course Yaboot’s configuration file. Add the following lines to it:

macosx=/dev/hdXX
defaultos=macosx # add this only if you like mac os x to be the default

Save the file. Most instructions say that you now type the following

ybin

This loads the config settings for you. However, this wasn’t enough for me. It worked until I booted into OS X again. After that Yaboot abandoned me, and I had to go into firmware mode again to get it back in the same way I specified earlier. This is the command that makes the Yaboot config settings stick for me.

ybin -b /dev/hda2

Yaboot hasn’t failed me once since I did that.

Here is an example of what else can go in yaboot.conf:

boot=/dev/hdc2
device=hd: # should be an alias check /proc/device-tree/aliases/hd (thanks <sourdough>)
partition=5
root=/dev/hdc5
timeout=50
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
enablecdboot # Adds an entry to boot from a cdrom

fgcolor=yellow
bgcolor=blue

image=/vmlinux
label=Linux
macosx=/dev/hdc3

The follow is what is presently in my yaboot.conf

boot=/dev/hda2
device=/pci@f4000000/ata-6@d/disk@0:
partition=4
root=/dev/hda4
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
delay=5
bgcolor=white
fgcolor=red

macos=/dev/hda3

image=/boot/vmlinux
label=Linux
read-only
initrd=/boot/initrd.img
initrd-size=8192
append=”quiet splash”

enablecdboot
enableofboot

Those last two instructions add two more options to your Yaboot menu at startup, allowing you to also choose whether to boot from a CD or to bring up the firmware console.

The next step is to enable file sharing between OS X and Ubuntu. You should be able to copy from OS X to Ubuntu already. But enabling file sharing in the other direction could be a problem. I was stuck on this for a while.

However, I worked it out. To view the files in the shared partition, do this:

sudo mkdir /media/OSX

And then

sudo mount -t hfsplus /dev/hda3 /media/OSX

My iBook’s /etc/fstab has the following entry so that it is automatically mounted:

/dev/hda3 /media/OSX hfsplus rw,exec,auto,users,gid=31 0 0

Or just go through Administration > Shared Folders and make it a shared folder.

Now, probably, you still will not be able to copy files over to OS X from Ubuntu. So reboot into Mac OS X, then go to Utilities and fire up the Disk Utility program. Select and highlight the OS X disk icon. Now go to menu and under File you will see the Disable Journaling option. Click that to disable journaling. Reboot back into Ubuntu. You should now be able to copy files over to OS X. You can also disable journaling in OS X from the command line in Ubuntu with this:

sudo diskutil disableJournal /Volumes/<OS X Volume Name>

I’ve seen discussions on changing your Linux user uid and gid to match that of OS X to try and access the Mac partition. This also means changing all permissions system wide in to match your new uid and gid. Seems like a big hassle to me.

Ubuntu on iBook G4

I’ve heard that Airport doesn’t work, or tweaks need to be done to make it work. It wasn’t so hard for me after I knew how. Finding out how was the hardest part.

What I did, after discovering with the command iwconfig that I had a Broadcom “4306″ card, was to follow the instructions on this site here.

I began at point 1.3, “Using the native drivers,” and did everything down to 1.3.3. I had already set up the details in Network Manager beforehand, when fiddling around, trying to get things to work. All I did after following those instructions was to reboot, and I had wireless up and running.

For now, everything I need is working on my iBook, plus things I don’t need like fancy desktop effects.

I like my iBook even more now.

Categories: Operating Systems Tags:

Ubantu Home Officially Online

April 10th, 2007 Stephen No comments

There comes a time in every webmaestro’s life when a line has to be drawn between “under construction” and “still have stuff to tidy and add.” I’ve decided to draw the line and officially launch my Ubantu Home websites amid lukewarm private fanfare and public disinterest.

Ubantu Home is a name derived from Ubuntu, a version of the Linux operating system, combined with a mix of letters from my name. It is the home or “front gate” to a collection of websites, the majority operating with their own open source content management systems and all located on my “Ubantu” server. Most of the public ones are accessible via the “Main Menu.” I’ll chop and change them at will.

I also have some private sites. The great thing about the CMSs I’m using is that they are all highly customizable. I’m modifying them whenever I find I need to so none of them are stock standard.

In my experience with setting up websites so far, I’ve concluded that you don’t need much else other than SQL, Php and Apache. And the beauty about everything I’ve mentioned here is that it is all free.

Categories: Computing, Operating Systems Tags:

When Do You Reformat Your USB?

March 28th, 2007 Stephen No comments

There may come a time when you absolutely cannot delete files from the .Trash folder Linux places on your USB. You try in Windows and they disappear, but when you refresh the folder, they are back again. You try in Linux but you simply get read only errors. No matter what you do you cannot delete those damn files. And if you have a look at what the hell is holding up the works, you may very well see something like this:


(Click for a larger image)

No, this is not a new file naming convention I have adopted. They just end up that way. The solution? It’s time to reformat your USB, as FAT, of course.

Categories: Hardware, Operating Systems Tags:

Old Mac Emulation on a PC

March 4th, 2007 Stephen No comments

Yes, it’s a Dell.

Not many people are going to be interested in emulating a Mac operating system on a PC, let alone on a Mac. But for those tinkerers out there, like me, here are some tips on how to do it.

It all started when I wanted to run the excellent WriteNow word-editor program again, which I used to use in the 80s and early 90s. For Mactintosh only, it was so simple and effortless to use; writing footnoted documents was a breeze; it was fast and everything just worked. But it became abandon-ware, all development and support ceased. Even today, however, there are still loyal users around. You’ll find some more info on WriteNow here.

So, why the hell should I bother, when I have a host of word programs to choose from? Call it nostalgia, and you can call it obstinancy in the face of everyone telling me that I can’t have something–WriteNow is still copyrighted and hence offically unavailable. After some searching, I did find it here. Don’t be alarmed by the title. It’s OK. Of course, it was made in the days before you needed serial numbers and passwords for every aspect of life. Ah, those were the days.

As suspected, I could not install it onto my iBook’s classic Mac OS 9 environment. The installer kept giving an error. The next step, then, was emulating an old Mac system and installing it on that. After more searching, trying different emulators, and getting nowhere fast, I stumbled on this instruction site, which not only has comprehensive instructions on emulating an old Mac system on Windows but also all the files you will need available for download. The person who put this together really deserves a lot of credit.

The emulator used is called Basilisk II. Now, the process was not without a series of problems. The main one was that with a full install of Mac OS 7.5.5, the system would crash at bootup. This was solved after visiting this site and reading the tip that suggested changing the CPU type to 68020. After I got things up and running I came across the HFV system file available at another instruction site here, which can make the process easier.

With a system up and running on Windows XP, I could now install WriteNow. Using HFVexplorer (available on the instruction site), I simply transfered the WriteNow file over my home network to the Mac system, and then run it to extract and install it. By the way, do not leave HFVexplorer running the background when you fire up Basilisk II, it locks system folders.

In the meantime, I was also playing around with the version of Basilisk II ported for Mac. You can use the files from the instruction sites I mentioned to help things along. But I had a few problems with the Mac Basilisk II. It would often crash or otherwise not boot, giving me the dreaded, flashing floppy disk and question mark icon. Possibly I was doing something or several different things wrong at different times, although I can’t recollect what now.

Eventually, after reinstalling systems several times, I had it up and running and had installed Writenow on that, too. The good thing about the Basilisk II emulator on the iBook is that a Unix icon automatically appears that gives you access to your iBook system so you can copy files back and forth. I was able to copy the installed WriteNow folder across. Some files would not copy for some reason, but these just seemed to be templates or examples of some kind.

Then I exited Basilisk, doubled clicked to run WriteNow and, hey presto, it was up and running in Mac OS 9. I guess that was my thrill for the week.

Categories: Operating Systems Tags:

My Linux Home Server

February 22nd, 2007 Stephen No comments

This one of my old PIII servers, which I still have for backup and for my webcams, but that is definitely not my monitor, so no abuse please.

I had two Pentium IIIs. But I had to get rid of the clutter with the arrival of my new Dell Optiplex 745 and UltraSharp wide screen. I sold them to one of these guys in open back trucks who cruise around apartment complexes in Seoul, advertising that they’d buy old computers. We contacted one of them and he came over. The monitor you see in the picture went for around $3! The PIII not picture went for $2. I made the grand sum of $5 on the deal. It was a bit of a shock to discover how little they were worth on the market. And what does the guy do with them? He sends them to the Philippines.

I ordered my Dell Optiplex through Dell Korea and was very satisfied with the service. I did it over the phone to an English speaking Korean, rather then online, because there were a few things I wanted to have clarified. The machine was built quicker than expected, and I was kept up to date every step of the way. Moments after the machine was delivered to the guard at our apartment building, my wife received a phone call about it, and around the same time, I received an email from Dell.

Within a few days, I’d converted my Dell to a dual boot system by partitioning the disk and allotting half of it to Ubuntu Linux—the 64bit version with the 2.6.20-8-generic kernel. I then set about configuring it to work as a server.



OPTIPLEX 745

Processor – Intel® Core™ 2 Duo Processor E6600 (2.40GHz, 4M, 1066MHz FSB)

Chipset – Intel® Q965 Express with ICH8

Operating System - Ubuntu Linux 64bit 2.6.20-6-generic; Microsoft® Windows® XP Professional SP2,

Video - 256MB ATI Radeon X1300PRO, Dual Monitor DVI or VGA (TV-out), FHA)

Memory - 2GB DDR2 Non-ECC SDRAM,800MHz, (2 DIMM)

Networking - Integrated Broadcom 5754 Gigabit Ethernet LAN solution 10/100/1000 Ethernet Remote

Standard I/O Ports - 9 USB 2.0 (2 front, 6 rear, 1 internal), Line-in, 1 Microphone-in, 1 Speaker/Line-out, 1 Headphone (front)

Hard Drive SATA 3.0 Gb/s HDD: 160GB

Chassis - Minitower:
16.2 x 7.3 x 17

Flat Panel Display - UltraSharp 20” 2007FPW TFT Flat Panel

Keyboard - Dell USB Entry QuietKey Keyboard, Dell USB Enhanced Multimedia, Keyboard, Dell

Speakers - Dell AS501PA Flat Panel Speakers (Sound Bar)

Removable Media Storage Devices - – USB Floppy Drive, CD-RW/DVD Combo

Click for a larger view

The hard disk is bottom left, sitting in a very easy slide-in-and-out slot. The large black object in the middle is the fan, which hums along very quietly. I’ve been really please at how quiet the Dell is regardless of the strain it is put under. Quite a contrast to my old Pentium IIIs.

Categories: Hardware, Home Server, Operating Systems Tags: