[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't Install on new PowerBooks - NO IDE



Hi Andrea,

> Same installation issue (IDE) here with the newest powerbook5,8 15".  
> So it looks like we should try to patch the 2.6.14 kernel. Ok. When I  
> am done compiling, where should I copy it? USB stick? So I suppose I  
> will have to mount it at boot time when installing, just before  
> choosing the kernel image, right?
> I would appreciate some hints on this matter. I mean, compiling and  
> mounting the usb device. Or there's some chance of creating an  
> installation disk with additional (the self-compiled one) kernel  
> images. BTW i am a Debian user, just so you know.

I had the same problem two weeks ago. Took some fiddling around to get
it working, at least the basic stuff.
So before I start, let me list the stuff that works and that doesn't
work for me:

Works:
- IDE/ATA-controller
- graphics (at least 2d acceleration)
- network-card
- bluetooth
- "speedstep" (or whatever this is called on apple hardware)

Doesn't work:
- touchpad (seems to be completely new, see thread
http://lists.debian.org/debian-powerpc/2005/11/msg00504.html and
http://www.popies.net/atp/ )
- wireless (there is a project working on it, there seems to be some
progress, see http://linux-bcom4301.sourceforge.net/ )
- sound (dmasound_pmac does not load, the alsa-module snd_powermac loads
fine, but recognises the chipset as an AWACS, which according to
http://wiki.debian.org/?PowerpcSoundcards should not be in any newer
powerbook )
- keyboard illumination and fn-key are also not working, but I have not
tried real hard to change that
- same applies to suspend

Nevertheless, I'm writing this on the powerbook running debian.
So this is what I did - quite lengthy and detailed, but as I was really
new to apple hardware I documented nearly every step. 

What you need:

- The MacOSX-Install-DVDs
- The first Install-CD/DVD of Debian sarge
- A computer with an internet-connection, can also be your powerbook 
- some time

Install MacOSX
==============
I mostly followed the steps described on by Branden Robinson on
http://people.debian.org/~branden/ibook.html , but it might be better to
follow http://www.sowerbutts.com/linux-mac-mini/ to partition the
harddrive and install MacOSX. 

The steps necessary to install debian are partly derived from Branden
Robinsons http://people.debian.org/~branden/ibook.html . 
http://seehuhn.de/comp/powerbook/ was also quite instructive.

Install Debian
==============
Preparing the installation
--------------------------
The linux-2.6-kernel will not properly boot on your system, because it
is not able to recognize the ata-controller and thus detect the
dvd-drive. So we have to use the 2.4-kernel. But the yaboot.conf-file
contains a small bug: a 8192 kB -initrd-size is too small, we need more.
To achieve this without rebuilding the whole CD, follow these steps 
(this is the place where Branden Robinsons page comes in handy)

1. Boot MacOSX
2. Put in your debian-disc
3. Copy the contents of the /install-directory (yaboot, yaboot.conf...)
into the root of your MacOSX-volume. They should sit right beside the
Desktop-folder.
4. Open a terminal and type "df<Enter>". You will see a list of
partitions, write down the partition-number of the MacOSX-root-partition
(It just contains a "/" in the rightmost column). The number is included
in the device-name: /dev/disk0s0p<part.-number>, so /dev/disk0s0p11
corresponds to partition-number 11.
5. Open yaboot.conf in a text-editor. 
	- In _every_ path-definition "/install/..." remove the "/install"-part,
so that for example "/install/boot.msg" is changed to "/boot.msg"
	- change to line reading something like "boot=cd:" to
"boot=hd:<part.-number>" (for example "boot=hd:11") where <part.-number>
is the MacOSX-partition-number you obtained with "df" in step 4.
	- change every occurrence of "8192" to "10240", these should only be in
"initrd-size="-lines and specify the size of the initial ramdisk.

Booting into the installer
--------------------------
We now should have a working yaboot.conf, so we should be able to boot
into the debian-installation. Once again we have to follow some steps:
1. Reboot and even before the screen turns black, press the combination
Option (with "Alt" printed on it) + Command (the one with the apple logo
on) + O (that is the letter o) + F and hold it. This should bring you
into the Openfirmware, the BIOS-equivalent on a Powerbook.
2. Type in "boot hd:<part.-number>,yaboot<Enter>", where <part.-number>
is the one you obtained earlier. This should boot the yaboot-bootloader
on your MacOSX-volume.
3. Now we are close to booting the linux-kernel! Type in "install-2.4
video=ofonly<Enter>". The video=ofonly is necessary to get a useful
display. The linux-2.4-kernel should boot and drop you into the
installer.

The installation
----------------
Choose your language and keyboard preferences. Afterwards the
debian-installer should search for a cd-rom-drive and hopefully thanks
to our preperation find one. It will then check the install-disc and
search for a network-interface. If it finds one you are lucky, for me it
never happened, it does not recognise the nic. So choose "No
network" (or similar, I installed using the german localisation).
The next step is to choose a computername, just type in your favorite...
What follows is harddrive-partitioning, something not as easy as
advertised...(at least for me, you probably have more luck)

Partitioning
------------
When the debian-installer gets to the partitioning part, you have more
good luck than I had: It should show the partition-table you created
within the MacOSX-installation. I just saw an unpartitioned harddrive.
The MacOSX-partition-manager managed to create an invalid partition-map,
at least to "parted", the partition-editor the debian-installer is
using. To create the partitions needed for debian, I had to repair this
map:

1. Before changing anything inside the installer switch to an extra
console with Alt+ctrl+F2 and type <Enter> to activate it.
2. Start parted by just typing "parted<Enter>"
3. If you want list the existing partitions by typing "print<Enter>"
4. You should get an error "Error: The partition's data region doesn't
occupy the entire partition", simply ignore it right now with "i". Then
you get a list of the partitions. The above error means that there is a
difference between the end of the last partition and the end of the
disc. So we just create an empty one at the end: "mkpart<Enter>". Now
you are asked for the partition-type (should be primary), the fs-type
(does not matter), the start of the partition (copy the number from the
end of the last partition) and end (copy the last number in the line
reading "disk geometry for ...").
5. Listing the partition-map with "print<Enter>" again, should not
generate the above error anymore.
6. Delete all the spare partitions you created while installing MacOSX
with "rm <Minor-number><Enter>". What you should leave alone are all
partitions after the last "eXternal booter" occurence and the first one,
as this one contains the partition-map.
7. Quit parted by typing "quit<Enter>"

Now you are able to create your desired partitions inside the
debian-installer (switch back to it with Alt+ctrl+F1)
The first one after the partition-map (named Apple) should be a 1 MB big
NewWorld Boot-Partition, which is needed by the yaboot-Boot-manager.
Fill up the remaining free space as you wish, there are just too many
ways to do that...
After you are satisfied with your partition-map, write down the
partition-number of the "eXternal booter"-partition, as you will need it
to be able to boot MacOSX again and apply the changes. The
debian-installer will write the partition-map to your harddisc, install
the base-system and reboot your system for the first time.

Don't forget to create an extra partition for data you want to use from
both MacOSX and Linux! Just create it with any filesystem-type, we will
change that later and don't forget to write down the partition-number of
this one. A description how to do this follows after we installed the
base-system and rebooted into Linux.

Finishing up the Installation
-----------------------------
After the reboot you hopefully will get the yaboot-prompt, in which you
are able to choose between a cd-boot and the linux-boot, choose "l" for
linux or just press <Enter>. Linux will boot and the debian-installer
will finish the installation.

Including MacOSX in the yaboot-menu
To include MacOSX in the yaboot-menu, just add the line
"macosx=/dev/hda<part.-number>", where <part.-number> is the
partition-number of the "eXternal booter"-partition you wrote down
earlier.

Creating a transfer-partition (optional)
----------------------------------------
As neither Linux nor MacOSX really "understand" each others
filesystem-types, I wanted to have a partition with which I am able to
transfer data between these two. To do this I created an extra partition
inside the debian installer and converted it afterwards into this
transfer-partition. So assuming you also created such an extra
partition, you can follow these steps to convert it into a
vfat-partition:
- Assuming you are logged in as root in your linux-installation, type
"mac-fdisk<Enter>"
- You are presented with a rather limited interface. Type "?" to get a
command-listing.
- delete the extra-data-partition with "d<part.-number>", where
<part.-number> is the one you wrote down while creating this partition.
If unsure you can always view your current partition-table with "p".
- You should now have some free space, instead of your old partition.
Fill this with a new one you create with "C" (that's a uppercase C!).
The partition start will be at the beginning of the free space,
expressed by "<part.-number>p" (this is the same <part.-number> as the
one you used with "d" in the last step), the end is the end of the free
space. To fill this in automatically you repeat the input for the start.
As a partiton-length of zero makes no sense it will automatically use
the free space. The filesystem-type has to be "DOS_FAT_32". Name should
be your final name for this partition, I used "data".
- Write the partition-table with "w" and leave mac-fdisk afterwards with
"q"
- Create a filesystem on this new partition with "mkfs -t
vfat /dev/hda<part.-number>" (you probably have to install dosfsutils
before)
You should now be able to mount this partition from linux. It should
also appear automatically in MacOSX.

Installing the 2.6.14-Kernel
----------------------------
The 2.6-kernel-series including 2.6.14 is not able to boot your
powerbook, because it doesn't recognise the pci-id of the ata-controller
build into your powerbook. Olof Johansson posted a small patch to add
the necessary pci-ids including those for the network-card and the
agp-controller to the kernel-source, see
http://ozlabs.org/pipermail/linuxppc-dev/2005-October/020222.html .
To use this we have to compile our own kernel:
- If you created a transfer-partition, start MacOSX and download the
linux-source-2.6.14-package, the config-file and the patch from Ben
Herrenschmidt to your transfer-partition. Otherwise download them to
some other place or computer and burn them on CD. Reboot into Linux. 
- Insert the debian-sarge-dvd and install the package "kernel-package"
and all recommendations.
- If you downloaded the linux-source-package to a CD, insert that one
now
- Install linux-source-2.6.14.deb with "dpkg -i
linux-source-2.6.14.deb", switch into /usr/src and unpack it afterwards
(tar xjf linux-source-2.6.14.tar.bz2).
- Switch into the newly created directory "linux-source-2.6.14" and
apply the patch with "patch -p 1 < /path/to/patchfile"
- copy the config-file into this directory and rename it to ".config"
- configure the kernel-source with "make-kpkg --config=oldconfig
configure" and
- build a kernel-package with "make-kpkg --initrd --us --uc image"

After the build is finished, you will find a .deb-package of your new
kernel in /usr/src. Install it with "dpkg -i <package-name>". It will
ask you, if it should abort, because you are to install an initrd-image.
Answer with "N" to proceed with the installation.
We now have to add some lines to the /etc/yaboot.conf in the
image=/boot/vmlinux-section:
	initrd=/boot/initrd.img
	ramdisk=10240

Install the new yaboot-configuration with "ybin".
Reboot and pray... 



Reply to: