|
Project: Linux Howtos
Linux on your powermac
By Shoney Sivan <shoneysivan@rediffmail.com>
Posted: ( 2001-08-01 08:41:01 EST by )
For all you who wish to install Linux on your Macs, here is a howto that shows you the way to go about configuring your machine and installing it.
Debian is a free or Open Source, operating system (OS) for your computer. It's like a tower. At the base is the kernel. On top of that are all the basic tools. Next is all the software that you run on the computer. At the top of the tower is Debian-carefully organizing and fitting everything so it all works together.
An operating system is the set of basic programs and utilities that make your computer run. At the core of an operating system is the kernel. The kernel is the most fundamental program on the computer and does all the basic housekeeping and lets you start other programs. Debian is kernel independent. It currently uses the Linux kernel but work is in progress to provide Debian for other kernels, using the Hurd.
Linux is a completely free piece of software started by Linus Torvalds and supported by (probably over 1000) programmers worldwide. A large part of the basic tools that fill out the operating system comes from the GNU project; hence the names: GNU/Linux and GNU/Hurd. These tools are also free.
Of course, the thing that people want is application software: programs to help them get what they want to do done, from editing documents to running a business to playing games to writing more software. Debian comes with over 3,950 packages (precompiled software that is bundled up in a nice format for easy installation on your machine)--all of it free.
Making Power Macintosh 8500/120 ready for Debian GNU/Linux
Mac will be running MacOS, the native operating system of Macintosh. Don't destroy the contents in the first shot. If required work with MacOS for some time to know how Mac works. It is essential to know details about Mac before installing Linux on Mac. The knowledge of OpenFirmware is necessary in installing Linux on Macintosh. If there is any valuable data, get a backup.
Getting Debian GNU/Linux
Debian GNU/Linux is a free software downloadable from www.debian.org under Software in the Public Interest (SPI). Most of the basic OS tools come from the GNU project; hence the name GNU/Linux. Debian GNU/Linux supports numerous architectures other than Intel, viz. PowerPC, Alpha, ARM, Motorola and SPARC. Download the CD image from the nearest ftp site (I downloaded from an Australian site ftp://ftp.au.debian.org). Download the NON-US image, remember to download the MD5SUMS along with it and also download in binary format. (I downloaded with NcFtp, which does some retries if any error occurs in between and runs in background). Download the second CD image also, because it contains a lot of useful applications. After downloading check the integrity of the ISO image with the MD5SUMS using the program md5.
Start installation of Debian GNU/Linux on a Mac
Creating installation boot/root floppies
Use two new floppies to create the boot and root floppy. Initialize one floppy from MacOS with Macintosh format. Mount Debian CD 1 on a Linux machine and insert the hfs-initialized floppy in the first floppy drive. Then issue the command
dd if=/mnt/cdrom/install/powermac/boot-floppy-hfs.img of=/dev/fd0 bs=1024 count=1 conv=sync ; sync
as root to create the boot floppy. This phase is very important as I failed a lot in using dos/ext2-formatted floppies for creating boot image. Similarly create root floppy from the image root.bin in the CD (there is no need of hfs formatted floppies for this image).
Installing the system
Installing the system Put the boot floppy in the floppy drive, Debian CD1 (You could install Debian GNU/Linux from a set of 12 floppies also) in the CD drive and switch ON the Mac. (Remember you are going the delete all the contents of the hard disk.) This will show a small penguin icon at the center of your screen and will load the RAM disk image. It will then ask for the root floppy after ejecting the boot floppy (If you find any problem in getting the floppy out, use a pointed metal object and press through the hole just below the floppy drive, this will eject the floppy out.)
Dbootstrap is the name of the program that runs after you have booted into the installation system. It is responsible for initial system configuration and the installation of the "base system". The main job and the purpose of dbootstrap is to configure essential elements of your system. For instance, you may need to use certain "kernel modules", which are drivers linked into the kernel. These modules include storage hardware drivers, network drivers, special language support, and support for other peripherals that are not automatically built in to the kernel you are using.
Now the Debian GNU/Linux will show the Release Notes. Here hit ENTER key for continuing. Next is Debian GNU/Linux Installation Main Menu from where you install system components in any order. The highlighted option is the default activity and it is preferred to go the default order.
The following instructions will guide you through a standard installation.
1 Keyboard Configuration
The first option is for configuring the Keyboard. Enter to select:
mac-us-ext : U.S. English (Mac, extended kbd).
2 Partitioning the Hard Disk
Here you have to select the drive before actually partitioning the hard disk. You could select if you have more than one physical hard disk. The hard disk naming convention is same as in Linux.
For example, the first SCSI hard disk in the first hard disk controller will be called as /dev/sda and second disk in the same controller will be /dev/sdb. Similarly an IDE device connected to second controller will be called as /dev/hda (I am not sure about the IDE support in MAC). Select /dev/sda if you intend to install on the first SCSI hard disk. This will show a similar prompt /dev/sda.
Command (? For help)
This is a program called mac-fdisk provided along with the installation diskette for formatting the hard disk. Giving a '?' at the prompt will give all options in partitioning. 'p' will print the partition table, 'i' will initialize the hard disk, 'c' will create partition, 'w' will write the table, 'q' will quit the program etc. Ensure that you write the partition table before quitting. For full installation of Debian you may need a space as much as 2 GB and for a minimal version
3 Initialize the swap partition
Here you have to initialize (format) a swap partition. This partition will be used by the operating system to swap memory pages when there is a shortage in memory for the running programs. The option to initialize the swap partition may not come if you haven't created a swap partition properly. There are some difficulties in creating a swap partition with the current version, which may get fixed in the next release. But don't worry, as it is very easy to create a swap space after installation. So go with yes for installing Debian without a swap partition.
4 Initialize a Linux partition
Select the partition you have created for Linux (for e.g.: /dev/sda4) and hit enter. This will ask a question whether Pre-2.2 Linux Kernel Compatibility has to be retained. You can say NO if you are not using this file system with an old kernel in 2.0 family. Next is the bad sector scan of the hard disk. This is at your discretion whether to scan your hard disk or not. It is always advised to do a bad sector scan since you are going to install a new operating system.
5 Mount the initialized partition as root
Now you have to mount the newly formatted partition to "/". Here you have to select the Linux partition that has to be mounted as root. On this partition, the OS will be installed. Select the partition and hit enter on `YES'.
6 Install operating system kernel modules
Select the installation medium from where you will install (viz. CD-ROM drive, first or second floppy drive, hard disk etc.) If you have the CD-ROM in the CD drive, select CD-ROM drive as source. Next option will enable you to configure the Device Driver modules. Here, you can load the modules provided by different vendors. If you have such modules, load, otherwise just skip this step.
You can select the modules, which are otherwise called loadable device drivers that are to be loaded with the kernel. Here you can select the modules from a lot of categories shown down in the menu. Select each category and enable the required things. One thing you have to keep in mind is that you should not try to install modules that are not present in the system because this could crash/hang the installation. When you go to a category, there will be a lot of modules that could be enabled. The modules that are currently installed on the system either have "+" character to the right of their name or "-". To install a module select the module and hit enter.
7 Configure the network
You should enable the corresponding modules of network card before doing this if the card is not recognized by the system. To check whether the card has been detected, use ALT + F2 to open another shell from where you issue the command
#dmesg |more
which will tell the status of the detection while booting. By default Power Macintosh 8500/120 comes with a 3Com 3c59x.c integrated Ethernet card, which will get detected. Now you have the card detected and you can give the host name for your Debian system. You have to choose the DHCP or BOOTP now. Choose NO if there is no DHCP or BOOTP. Give IP address, subnet mask and gateway IP address from your pool of IP addresses for the system. You can give the domain name in which you would like to add this machine into and the name server for that domain. This configuration is optional.
8 Install the base system
Select the medium from which you are going to install the Base System. You will have to wait for a while so that the requisite files are extracted and installed. Next option is to configure the Base System where you will select you Time Zone. I selected ASIA, Calcutta and did not set to GMT.
9 Make Linux boot from hard disk
For the next option I deviated, as the system will not boot from hard disk unless you do some tweaking. For that select "Execute a Shell" from main menu by using the `? ' key and enter. This will open a shell where you could issue some basic UNIX commands. Give the following commands
#nvsetenv
#nvsetenv boot-device scsi-int/sd@0:0
#nvsetenv boot-file "/boot/vmlinux-2.2./19 root=/dev/sda4"
#nvsetenv boot-command "begin ['] boot catch 1000 ms cr again"
#nvsetenv output-device /chaos/control
These commands are very critical and any mistake in this will not boot the system. To check variables issue the command #nvsetenv which will give an output containing the following lines.
boot-device scsi-int/sd@0:0
boot-file /boot/vmlinux-2.2./19 root=/dev/sda4
output-device /chaos/control
boot-command begin ['] boot catch 1000 ms cr again
Exit from the shell by typing exit. Now select Make Linux Bootable Directly From Hard Disk and press enter. The Make Floppy option will not work for the current release.
10 Reboot the system
You can select reboot the system.
The system will reboot and halt showing
can't OPEN: scsi-int/sd@0:0 /boot/vmlinux-2.2.19.
RESETTing change configuration
Here switch OFF the computer and switch ON again with the Power ON button.
Now the screen will show:
Can't OPEN: scsi-int/sd@0:0
Second stage QUIK loader
boot: /boot/vmlinux-2.2.19 root=/dev/sda4
Now your Linux is booting.
Post installation configuration
(i) Enable MD5 password: The system will ask for enabling md5 passwords. Say yes because it is more secure.
(ii) Enable shadow password: Say yes for Shadow Passwords because it is more secure.
(iii) Root Password: Enter the password for root user. Remember this password and keep safe.
(iv) Create another user: There is an option to create a new user.
(v) Remove PCMCIA modules: By default 8500 has no pcmcia device. The modules for pcmcia are installed by default. So remove the pcmcia devices.
(vi) PPP configuration: Next is the PPP configuration. Say yes if you are going to install the rest of the package through a dial up connection.
(vii) Indexing of CDs: Apt is the program used for installing and removing packages in Debian. This program builds the source-list from the CDs and other sources. Put both CDs for indexing. Add another apt source if you have.
(viii) Package installation: Dselect is another program for package management in Debian. Choose simple here. Select the wanted applications from the menu. The dependencies will be taken care by `dselect'. The rest of the applications can be installed after post installation.
Hope now you have a good Linux box where the computing power is a RISC processor.
Other articles by Shoney Sivan
Current Rating: [ 8.5 / 10 ]
Number of Times Rated: [ 20 ]
|