Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't boot kernel on PPC32 iMac [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 665

PostPosted: Sun Nov 02, 2008 8:09 pm    Post subject: Can't boot kernel on PPC32 iMac [SOLVED] Reply with quote

I have an iMac I have installed Gentoo on, but after following the manual, it will not boot, I get the following:
Quote:
Welcome to yaboot version 1.3.14
Enter "help" to get some basic usage information
boot: Linux
Please wait, loading kernel...
Read failed
boot:
If I press TAB it displays
Quote:
Linux

But if I try entering Linux, it gives the same error and goes back to the prompt.

Booting it with the LiveCD works but if I try to copy my kernel over to the boot partition it doesn't work either.
Quote:
# mount /dev/hda4 /mnt/gentoo
# mount -o bind /dev /mnt/gentoo/dev
# mount -o bind /sys /mnt/gentoo/sys
# chroot /mnt/gentoo /bin/bash
# /usr/sbin/env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
# mount /dev/hda2 /boot
# ls /boot
ofboot.b yaboot yaboot.conf
# cd /usr/src/linux
# cp vmlinux /boot/kernel-2.6.24-gentoo-r3
cp: writing `/boot/kernel-2.6.24-gentoo-r3': No space left on device
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda4 74G 1.9G 72G 3% /
/dev/hda2 797K 797K 0 100% /boot

I followed the instructions of the manual, why is the boot partition full?
Here is the partition map:
mac-fdisk -l
Quote:
/dev/hda
# type name length base ( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
/dev/hda3 Apple_UNIX_SVR2 swap 2097152 @ 1664 ( 1.0G) Linux swap
/dev/hda4 Apple_UNIX_SVR2 root 154202672 @ 2098816 ( 73.5G) Linux native

Block size=512, Number of Blocks=156301488
DeviceType=0x0, DeviceId=0x0

/dev/hdb
# type name length base ( size ) system
/dev/hdb1 Apple_partition_map Apple 2 @ 1 ( 1.0k) Partition map
/dev/hdb2 Apple_HFS catalyst 2008.0 1206204 @ 16 (589.0M) HFS

Block size=512, Number of Blocks=1206220
DeviceType=0x1, DeviceId=0x1
What did I miss?

Last edited by Progman3K on Mon Nov 03, 2008 8:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
leviathan4444
n00b
n00b


Joined: 08 Oct 2006
Posts: 13
Location: Champaign, IL

PostPosted: Mon Nov 03, 2008 4:22 am    Post subject: as I recall ... Reply with quote

As I recall, and I could be wrong, is that the Apple Bootstrap partition is a special booting partition for the machine that is occupied by either Apple's boot code or yaboot's code. Your kernel should be placed either on your main partition, or if you wish, you could create a separate partition and place the kernel there. I have mine on my main partition in /boot, on a PowerMac G3, and its been working great. Here's what my partition map, and yaboot config files look like:

Partition Map:
mac-fdisk -l
/dev/hda
# type name length base ( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
/dev/hda3 Apple_UNIX_SVR2 router_OS 12670786 @ 1664 ( 6.0G) Linux native

Block size=512, Number of Blocks=12672450
DeviceType=0x0, DeviceId=0x0

my kernel is in /boot on hda3

Yaboot config: (all the default comments have been redacted for quicker reading. Besides you have them in your yaboot.conf. I call my kernel file the_kernel)

boot=/dev/hda2

device=/pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@0:

partition=3

delay=10

timeout=40
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot


image=/boot/the_kernel
label=Linux
root=/dev/hda3
read-only

image=/boot/the_kernel_OLD
label=Linux_OLD
root=/dev/hda3
read-only


Hope this helps! :)
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 665

PostPosted: Mon Nov 03, 2008 2:16 pm    Post subject: I still have no joy... Reply with quote

Thank you very much for trying to help me out, leviathan4444.
I still cannot get it to boot -
Code:
yabootconfig --chroot /mnt/gentoo
Quote:
yaboot is the Linux Loader for PowerPC. yabootconfig sets up your system to boot directly
from your hard disk, without the need for a boot CD, floppy or a network boot.
Install yaboot bootstrap on /dev/hda2 to boot Linux from /dev/hda4? [Yes] Yes
Creating a simple /mnt/gentoo/etc/yaboot.conf...
yabootconfig: Cannot find a kernel, please provide one
Enter path to a kernel image (not including chroot): /boot/kernel-2.6.24-gentoo-r3
Enter path to an initrd image (hit Enter for none, don't include the chroot):
Running mkofboot to make the disk bootable...
Done
Code:
ybin -v
Quote:
ybin: Finding OpenFirmware device path to `/dev/hda2'...
ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/hda2...
ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda2...
ybin: Installing /etc/yaboot.conf onto /dev/hda2...
ybin: Setting attributes on ofboot...
ybin: Setting attributes on yaboot...
ybin: Setting attributes on yaboot.conf...
ybin: Blessing /dev/hda2 with Holy Penguin Pee...
ybin: Updating OpenFirmware boot-device variable in nvram...

The contents of my /etc/yaboot.conf
Quote:
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

image=/boot/kernel-2.6.24-gentoo-r3
label=Linux
read-only
The result is still the same as my first post. :-(
Could it be because my root partition is formatted in XFS?
I mean how does the bootloader know how to read the kernel file from a partition that is formatted in XFS?
Back to top
View user's profile Send private message
otisranson
Apprentice
Apprentice


Joined: 17 May 2007
Posts: 188

PostPosted: Mon Nov 03, 2008 2:50 pm    Post subject: Re: Can't boot kernel on PPC32 iMac Reply with quote

Progman3K wrote:

cp: writing `/boot/kernel-2.6.24-gentoo-r3': No space left on device
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda4 74G 1.9G 72G 3% /
/dev/hda2 797K 797K 0 100% /boot

I followed the instructions of the manual, why is the boot partition full?
Here is the partition map:
mac-fdisk -l
Quote:
/dev/hda
# type name length base ( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
/dev/hda3 Apple_UNIX_SVR2 swap 2097152 @ 1664 ( 1.0G) Linux swap
/dev/hda4 Apple_UNIX_SVR2 root 154202672 @ 2098816 ( 73.5G) Linux native

Block size=512, Number of Blocks=156301488
DeviceType=0x0, DeviceId=0x0

/dev/hdb
# type name length base ( size ) system
/dev/hdb1 Apple_partition_map Apple 2 @ 1 ( 1.0k) Partition map
/dev/hdb2 Apple_HFS catalyst 2008.0 1206204 @ 16 (589.0M) HFS

Block size=512, Number of Blocks=1206220
DeviceType=0x1, DeviceId=0x1


Your boot partition is less than 1mb. That could be the reason that it is full. I didn't create a seperate partition for my boot files. I honestly don't see the need to have a seperate boot partition. I just have the partition map, bootstrap, swap, then root. Good luck!
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon Nov 03, 2008 5:20 pm    Post subject: Reply with quote

The Apple_Bootstrap bootstrap partition is not supposed to be mounted and used as /boot. That partition is for the files yaboot installs to boot your system. Also, a seperate /boot partition is not recommended for ppc32 systems.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon Nov 03, 2008 5:25 pm    Post subject: Re: I still have no joy... Reply with quote

Progman3K wrote:
Could it be because my root partition is formatted in XFS?
I mean how does the bootloader know how to read the kernel file from a partition that is formatted in XFS?

Yes, that's possible. On an XFS filesystem the kernel image may be fragmented and if that happens yaboot can't load the kernel image into memory completely. What you do is use 'cat' to create a contiguous image: cat /boot/kernel-2.6.xx-fragmented > /boot/kernel-2.6.xx-contiguous (replace the kernel-2.6* example names with real names).
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 665

PostPosted: Mon Nov 03, 2008 8:08 pm    Post subject: Reply with quote

Oops!
All my fault.
When I wrote that I had followed the Gentoo guide, I had omitted ONE step.
I did not perform the
Code:
make pmac32_defconfig
step when configuring the kernel.
I like to configure my kernels by hand and thought that I could select the necessary things on my own.
Hubris... I know.

Thank you, leviathan4444, otisranson and nixnut for taking the time to try and help this foolish user.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum