Click to See Complete Forum and Search --> : INSTALLING YELLOWDOGLINUX ON AN IMAC DV SE


GiGoPleX
10-10-2000, 03:37 PM
10.x.00

INSTALLING YELLOWDOGLINUX ON AN IMAC DV SE

[This explains how to install Yellowdoglinux Champion Server 1.2.1 on an iMac DV SE (400 mhz, 13 Gigs), the one available in December 1999, with a non-extended keyboard and hockey puck mouse. This installation procedure creates a dual-boot system and assumes you have backed up your data and have a bootable OS 9 CD-ROM.]


expect problems. This is still leading- to bleeding-edge technology. In the course of the installation the keyboard played dead and the computer played dead: I mean for several minutes no OS would boot, at all--neither from the hard drive, nor from the CD. I must admit I got close to being rattled by that. But I unplugged the machine for 3 minutes while I read Alternative Press magazine and that did the trick. Of course, Alternative Press may not do it for you. You might prefer Linux Monthly.

step 1. burn the beast

My friend Bryce downloaded the ISO image from

ftp://ftp.yellowdoglinux.com/pub/yellowdog/iso/

and then burned it (*without* first mounting it!) to a CD using Toast. He had DSL. On a 56k modem it would take, oh, about 32 hours. You can also order the CD.

step 2. prepare the kennel for the beast

iMac DVs are New World machines and need Yaboot (Yet Another Bootloader) and not BootX. (BootX is for Old World Machines, and I think the rule of thumb is that if it can run an OS previous to 8.6, it's Old World.) Because Yaboot is a Mac-, or rather Mac Open-Firmware-, application that bootstraps the linux kernel into RAM, you need to have a Mac partition on the iMac, even if you wish to run only linux on it. Other HOW-TOs explain partitioning much better than I can. I'll only say that to run a dual-boot system I used the OS 9 Software Install CD that came with the iMac to create 5 partitions (only three are essential for running Linux, dual-boot system or not). Partitions which you must have I've marked with an *.

1. HFStandard.* 2 Gigs, in my case. This was destined to contain the Mac OS 9.04 System Folder and (in that System Folder) Yaboot and all the other stuff you need to push Linux into the machine's RAM. You can squish this partition down to as little as 50 MB or even less, but it must be formatted HFStandard, and ideally contains a Mac System Folder that is (or at least appears to be) valid.

2. HFSExtended. 5 Gigs, in my case. Linux won't be able to read this extended partition; it's just storage for big stuff.

3. HDStandard. 2 Gigs, in my case. Another partition. To keep small items, like my umbrellas and hats.

4. A/UX.* 4 Gigs, in my case. 4 Gigs seems to be a common beginner's size. This is the root or native Linux partition. You must have a partition dedicated to Linux before you install Linux. Duh. I hear YDL Linux will fit (tightly) in 1 Gig of space.

5. Linux Swap.* I set this to 256 MB, as the iMac DV SE came with 128 MB of RAM and I read somewhere the swap should be twice as large as the RAM. It turned out that the maximum swap is 128 MB anyway. By that time I was well into the installation and didn't bother changing it. Still, 128 is the suggested retail price, wups, I mean swap partition size. You must have the swap to install.

(Yes, Virginia, I did back up everything before I partitioned because as we know, without a groooooovy utility like FWB Toolkit, partitioning destroys data. Thoroughly.)

step 3. Leash the Mac OS

Deep in Area 51, alien technology can boot an iMac DV into Linux without using Yaboot. Unfortunately, that technology hasn't been made available to us yet, although I think Ben Hesserschmidt is working on it.

The YDL CD contains several files which you need to copy (Mac Copy is fine) to the active system folder. These 5 files are essential, at least if you're following my method:

yaboot
yaboot.conf
vmlinux
bootscript
ramdiskimage.gz

These files will help choke a Mac boot-up and divert it into Linux, as we shall see.

step 4. Install the beast

Reboot the Mac with the YDL CD inside, holding down C. You'll get to Yaboot--a blue prompt on a black screen, with rather terse instructions. Type

install

and hit return.

Yellowdog will begin installing from the CD. For the record, I chose to tell the installer that I was using a us standard keyboard (rather than an extended one) and a USB two button mouse (I use a Logitech wheel mouse). Important: take note, in fdisk or whatever partitioning tool you use, what partition numbers your Mac startup partition and Linux root partition got. (A partition number for the iMac's internal hard drive should be a small integer preceded by hda, like hda5 or hda11).

At the end of the installation you'll be bumped into MacOS.

step 5. Teach the beast new commands

Configuring the yaboot.conf file, which you can do with Simpletext, proved rather tricky. The script I finally used was a sober four lines long:

image=hd:9,\\\\vmlinux
novideo
label=linux
root=/dev/hda11

The first line gives yaboot the kernel image's name and its location. hd:9 (your partition number may be different) was my particular computer's MacOS startup partition. \\\\ is a location indicator; four backslashes indicate the active system folder. (Two backslashes would indicate the root.) vmlinux is the name of the kernel, residing in the MacOS System Folder.

novideo is the only optional line I included; I was told it would cut video eccentricities.

label=linux sets the command. Thus configured, the command linux, when typed in yaboot, will load the kernel vmlinux.

root=/dev/hda11 indicates where the root linux partition is; the integer (11 in my case) was indicated during the YDL installation.

Save yaboot.conf and reboot the Mac, holding down, with four spare fingers, these four keys: Command, Alt, O, and F. Prepare to enter Open Firmware, about as cozy a place as the inside of the Tain artifact in Myth 2.

step 6. Open Firmware country

Open Firmware is black on white. Once you are in this forbidding, cold place, and have the > prompt, type in

setenv boot-device hd:,\\bootscript

and hit enter. hd: refers to the first IDE device on the machine, the startup disk; you don't need to append an integer. (It's analogous to c: in you-know-what.) \\ is an address: in this case, the active System Folder. bootscript refers to bootscript, which went into the System Folder earlier. Once you've entered this command, Open Firmware will respond with "ok."

The result of this command is to make Open Firmware care whether or not a spacebar is pressed during the reboot. If it's not pressed during a reboot, the machine will launch Mac OS; if it is pressed, it will run bootscript, which will launch Yaboot, which will execute a typed command to load linux. (I understand that zapping the PRAM will reset Open Firmware's memory, and erase this configuration.)

(In a further parenthetical note, I should add that holding down the spacebar while MacOS boots normally calls up the MacOS extensions manager and suspends the boot.)

Still in the Open Firmware prompt, you now type

boot

And, if all's gone well, the machine will begin booting from your hard drive. I think it boots MacOS, but I can't remember. Sorry. (If things haven't gone well it will tell you that it can't find bootscript, which means bootscript's not in the system folder or your command syntax is screwy.)

step 7. Beauty or the Beast

Reboot again, pressing down the space bar. You should get to Yaboot (blue on black). Type in

linux

and Yellowdog should start booting from your hard drive.

Log in as root and enter the same password you entered during the install. (The caps-lock light didn't work on my keyboard, and Linux is cap-sensitive.) The command

shutdown -r now

will end the session with a reboot. . . .

. . . Reboot, not holding down the space bar. MacOS should start booting.

I hope this helps someone and amuses the rest.


peace


philippe

ptapon@yahoo.com

troubleshooting. Linux did seem somewhat sensitive to which USB port the keyboard was in and it hung twice. (It finally worked with keyboard in slot 2 (the lower one) and logitech wheel mouse in slot 1 (the upper one).) If in doubt, start re-installing and include a complete reformat when dealing with the ext2 filesystem.

[This message has been edited by GiGoPleX (edited 10 October 2000).]

Moldy
10-16-2000, 08:27 PM
I have used BootX to get into linux using a G4. One is a more permenant option (yaboot), where you can choose to erase all of the Mac OS. BootX is less permenant, where you can choose your OS at startup, with a window that you can default Mac OS or Linux, and will time out after 10 seconds and go to your default. I use BootX for all my machines, as i use the Mac OS alot. my new server i'll use yaboot though.

------------------
MoldyCR.net (http://moldycr.net)