Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]iBook yaboot problem
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
dtmetz
n00b
n00b


Joined: 20 Jun 2004
Posts: 30

PostPosted: Sun Jun 20, 2004 11:10 pm    Post subject: [SOLVED]iBook yaboot problem Reply with quote

Ok, I have been trying to get linux on my new iBook 1.2 GHz with a Radeon 9200 video card. I am using the install guide.

The first problem I get is when I try to unpack the tarbell for the stages I always get the error:

tar: Error exit delayed for previous errors.

I've tried downloading stage 2 twice, stage 3 once and the tarball from the live boot cd.

It uncompresses a lot of files, so I thought I would try going on any ways, but I can't get yaboot to configure. I first try running yabootconfig, but get the error:

yabootconfig: could not find a kernel, please locate one.
Enter path to a kernel image:

I assume it wanted the vmlinux from when I compiled the kernel earlier. But when I put any valid file in it always tells me:

yabootconfig: Could not determine necessary infomation, aborting....
yabootconfig: Are you using chroot yaboot instead of yabootconfig --chroot?

I tried to manually configure it, but when I run mkofboot -v but it complains that the device=hd isn't set up correctly the yaboot.conf says I should run ofpath /dev/hda but that just returns that no path could be found. (I don't remember the exect errors here, but they are basically saying what I expained).

I'm kinda clueless here. It makes me wonder if I didn't compile my kernel correctly. I used emerge ppc-sources then follow the directions in the setup manual. It seems to compiile fine.

I'm confused enough here that I don't know all the important information to tell you, but I really want to learn all of this, so any help I can get would be great. Let me know if any other information would help you troubleshoot this.

Thanks,

Dan
Back to top
View user's profile Send private message
gordin
Guru
Guru


Joined: 11 Oct 2002
Posts: 300
Location: Germany/WI

PostPosted: Mon Jun 21, 2004 10:38 am    Post subject: Reply with quote

hi dtmetz,
Quote:
tar: Error exit delayed for previous errors.

This should not be the problem, normally it is a error from the /proc filesystem which cannot be extracted.

Please post your /etc/yaboot.conf and /etc/fstab and your partitiontable.
Back to top
View user's profile Send private message
toojays
Apprentice
Apprentice


Joined: 21 Jul 2002
Posts: 150
Location: Adelaide, Australia

PostPosted: Mon Jun 21, 2004 11:54 am    Post subject: Reply with quote

I have a vague memory that when I did this on my 12" iBook G4 1GHz, I needed to get a version of yaboot which was slightly newer than what was on the 2004.1 CD. I can't quite remember though :(

There seem to be a few of us running Gentoo on these G4s though . . . maybe someone else will know more clearly how they got it to work.
Back to top
View user's profile Send private message
dtmetz
n00b
n00b


Joined: 20 Jun 2004
Posts: 30

PostPosted: Mon Jun 21, 2004 6:58 pm    Post subject: Reply with quote

Well I did run emerge --usepkg --update yaboot, and that should give me the newest version of yaboot correct?

I will post my /etc/yaboot.conf and /etc/fstab and partitiontable when I get home from work.

Thanks
Back to top
View user's profile Send private message
dtmetz
n00b
n00b


Joined: 20 Jun 2004
Posts: 30

PostPosted: Tue Jun 22, 2004 2:10 am    Post subject: Reply with quote

Here is my /etc/yaboot.conf

Code:

## Example yaboot.conf for ybin and yaboot >= 0.6
## see man yaboot.conf for more details.

## Change `unconfigured' to your bootstrap partition eg: /dev/hda2
boot=/dev/hda2

## device is the OpenFirmware device path to the disk containing
## kernel images.  if your disk is /dev/hda you can find the
## OpenFirmware path by running the command: ofpath /dev/hda DO NOT
## specify a partition number for this!  On IBM hardware you can
## generally comment this out.

device=hd:

## partition is the partition number where the kernel images are
## located.  The kernel images should be on your root filesystem, so
## this is usually the same partition number as your root filesystem.
## so if root = /dev/hda3 (the 3rd partition) then you should have
## partition=3  This *MUST* be set correct or yaboot won't boot!  This
## option can be either set globally as shown here, or per image in
## the image= sections

partition=3

## delay is the amount of time in seconds the dual boot menu (if one
## is configured, by the presense of macos, macosx, etc options here)
## will wait before choosing the default OS (GNU/Linux or the value of
## defaultos=).  If you omit this then the value of timeout=
## (converted to seconds) will be used.

delay=10

## timeout is the amount of time in tenths of a second that yaboot
## will wait before booting the default kernel image (the first image=
## section in this config file or the value of default=). 

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

## Change the default colors, fgcolor is the text color, bgcolor is
## the screen background color. (default: fgcolor=white, bgcolor=black)
#fgcolor=black
#bgcolor=green

## Password supplied in plaintext, required for yaboot to boot, unless
## restricted is also present (see below). Be sure to
## chmod 600 /etc/yaboot.conf if you set this!

#password=secret

## Password supplied as an md5 hash, see above

#password=$1$saltstrg$HnJ/gcM3oKhNbnzUPgXTD/

## A password is only required to boot an image specified here if
## parameters are specified on the command line or if the user enters
## an image is not specified in the configuration file at all (ie.
## arbitrary file load).  restricted can also be placed in an image
## section in that case any image not including the restricted keyword
## will be fully password protected.

#restricted

## image is the kernel itself, commonly kept in / but also commonly
## found in /boot.  Note that /boot should generally not be its own
## partition on powerpcs, its not necessary and complicates things.
## Make sure /boot is on the partition specified by partition= see
## above.  /boot should never be an HFS filesystem.  You may point
## image= to a symbolic link so long as the symlink does not cross
## partition boundries.

image=/vmlinux
   label=Linux
   root=/dev/hda4
   read-only

image=/vmlinux.old
   label=Linux.old
   root=/dev/hda4
   read-only
macosx=/dev/hda6
enablecdboot
enableofboot


Here is my /etc/fstab

Code:
# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.

# <fs>             <mountpoint>    <type>     <opts>            <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts
/dev/hda2      /boot      ext2      noauto,noatime      1 2
/dev/hda4      /      xfs      noatime         0 0
/dev/hda3      none      swap      sw         0 1
/dev/cdroms/cdrom0   /mnt/cdrom   iso9660      noauto,ro      0 0
#/dev/fd0      /mnt/floppy   auto      noauto         0 0

# NOTE: The next line is critical for boot!
none         /proc      proc      defaults      0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none         /dev/shm   tmpfs      defaults      0 0


and my partition table (from mac-fdisk) is

Code:
/dev/hda
Command (? for help): /dev/hda
        #                    type name                  length   base      ( size )  system
dump: name /dev/hda len 8
/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                 1048576 @ 1664      (512.0M)  Linux swap
/dev/hda4         Apple_UNIX_SVR2 root                11532720 @ 1050240   (  5.5G)  Linux native
/dev/hda5              Apple_Free                       262144 @ 12582960  (128.0M)  Free space
/dev/hda6               Apple_HFS Apple_HFS_Untitled_6  96004880 @ 12845104  ( 45.8G)  HFS
/dev/hda7              Apple_Free                       262144 @ 108849984 (128.0M)  Free space
/dev/hda8               Apple_HFS Apple_HFS_Untitled_7   8098096 @ 109112128 (  3.9G)  HFS
/dev/hda9              Apple_Free                           16 @ 117210224 (  8.0k)  Free space

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


and /dev/hda6 is where OS X is installed. /dev/hda8 is an extra mac partition.

Any help would be great. Let me konw if any other info would help.

Thanks,

Dan
Back to top
View user's profile Send private message
Red Sparrow
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2004
Posts: 128
Location: Greeley, CO

PostPosted: Tue Jun 22, 2004 4:46 am    Post subject: Reply with quote

Your bootstrap partition doesn't need to be in your fstab file. Other than that, check where you placed the vmlinux file. Your yaboot.conf file says it's in your root directory; make sure it's there or change your yaboot.conf file to reflect the actual location of the vmlinux file.

(- Steve -)
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Tue Jun 22, 2004 6:35 am    Post subject: Reply with quote

dtmetz wrote:
Here is my /etc/yaboot.conf

Code:


## partition is the partition number where the kernel images are
## located.  The kernel images should be on your root filesystem, so
## this is usually the same partition number as your root filesystem.
## so if root = /dev/hda3 (the 3rd partition) then you should have
## partition=3  This *MUST* be set correct or yaboot won't boot!  This
## option can be either set globally as shown here, or per image in
## the image= sections

partition=3

.....

image=/vmlinux
   label=Linux
   root=/dev/hda4
   read-only

image=/vmlinux.old
   label=Linux.old
   root=/dev/hda4
   read-only
macosx=/dev/hda6
enablecdboot
enableofboot


Any help would be great. Let me konw if any other info would help.

Thanks,

Dan


If you read the text over "partition" and compare with the location indicated by
"root=" you will realise what you did wrong. You should set:
Code:
partition=4

and not 3.

Cheers,
Francois
Back to top
View user's profile Send private message
dtmetz
n00b
n00b


Joined: 20 Jun 2004
Posts: 30

PostPosted: Tue Jun 22, 2004 7:29 pm    Post subject: Reply with quote

Thanks for the help. I went to redo my config file but unfotunatly I had to reboot into OS X to look for ways to fix this. Now when I boot back into gentoo from the live cd, I'm not sure what needs to be redone and what doesn't. I mount the drive and setup my network options. I do a chroot. I did an emerge websync and emerge system. But I am unable to run mkofboot or ofpath. I can run yabootconfig but now it is telling me

Unable to determine OpenFirmware device name to /dev/hda, aborting.

I know this is mostlikey the same problem that I can't run mkofboot or ofpath. I also know when I could run ofpath it would fail and say the path could not be detirmened, but at least it ran.

I can anways redo the whole installation, but it takes a long time escpecially when I only want to change a few lines. Also it wouldn't make sense that I have to do that (for instance I shouldn't have to repartition my drive or recompile the kernel right?)

Well I'm glad I'm doing this because I am already getting a better understanding of how linux is installed (I didn't learn much by just running an installer on other platforms). Any ideas on how to get mkofboot to run would be great so I try the suggestions made.

Thanks again,

Dan
Back to top
View user's profile Send private message
Red Sparrow
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2004
Posts: 128
Location: Greeley, CO

PostPosted: Tue Jun 22, 2004 7:44 pm    Post subject: Reply with quote

Did you remember to mount /proc? I've forgotten that a few times myself.

(- Steve -)
Back to top
View user's profile Send private message
dtmetz
n00b
n00b


Joined: 20 Jun 2004
Posts: 30

PostPosted: Tue Jun 22, 2004 7:54 pm    Post subject: Reply with quote

Yeah, I forgot to mention I

mount -o bind /dev /mnt/gentoo/dev
and
mount -t proc none /mnt/gentoo/proc

before I chroot, like the install instructions say to.
Back to top
View user's profile Send private message
gordin
Guru
Guru


Joined: 11 Oct 2002
Posts: 300
Location: Germany/WI

PostPosted: Tue Jun 22, 2004 9:13 pm    Post subject: Reply with quote

Hi,
no panic!
You don't need to redo the installation...
Everything you did is on your harddisk... so nothing will be lost after a reboot.

You just cannot boot into your system directly.

fb wrote:

Code:
partition=4

and not 3.


That's right. But you also need to give the path to your kernelimage. I don't think you put them in the root but in the /boot/ directory
Code:

image=/boot/vmlinux

That's if you didn't rename the kernelimage to something else

That should do the trick.

Like Jigglypuff said, don't put your bootstrap partition in /etc/fstab. Bootstrap partition is not boot partition!
Back to top
View user's profile Send private message
dtmetz
n00b
n00b


Joined: 20 Jun 2004
Posts: 30

PostPosted: Tue Jun 22, 2004 11:33 pm    Post subject: Reply with quote

Yeah, thats what I figured.

My image isn't in /boot/vmlinx - its under /usr/src/linux/vmlinux (I think - I'm not infront of my comptuer right now). So I change it to

Code:
image=/usr/src/linux/vmlinux


and

Code:
partion=4


But when I try and run mkofboot -v, it tells me it doen't know that command. I was able to do it before, which is why I think I need to redo something I did before, but I don't know what. I also can't get ofpath to run. I have a feeling this is some problem with getting the open firmware path, because

ofpath /dev/hda

didnt work before and yabootconfig gives me an error:

Code:
Unable to determine OpenFirmware device name to /dev/hda, aborting


Anyways, what do I need to do to get mkofboot to work? I did a search on my comptuer and it didn't find it and I tried emerge mkofboot and it didn't work either.
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Wed Jun 23, 2004 12:30 am    Post subject: Reply with quote

mkofboot comes with yaboot. When you do emerge yaboot, mkofboot and ybin
should be installed along with all the library they need. For information mkofboot
and ybin are under /usr/sbin/ and only root should be able to run them. I think
that ofpath also comes with yaboot and it also reside under /usr/sbin .
After a quick look at my own computer mkofboot is just an alias for ybin but don't
worry about that.

However, I think you should download the gentoo handbook and study it a little.
I would recommend you to move your kernel under /boot/ and to move the
file called System.map there as well. Don't forget to modify yaboot.conf if you do
that.

I think I know why you were able to use mkofboot before but not now. I recommend
you to do "emerge yaboot" after you have chrooted your environment and updated
your variable.
Back to top
View user's profile Send private message
dtmetz
n00b
n00b


Joined: 20 Jun 2004
Posts: 30

PostPosted: Wed Jun 23, 2004 6:55 pm    Post subject: Reply with quote

Thanks to your help I was able to get yaboot install. I needed to do emerge yaboot to get mkofboot to work (emerge --usepkg --update yaboot did not do it). Then I it was giving me an error about ofpath could not be detirmed for /dev/hda2 or macosx=/dev/hda6.

After looking around I found out I needed to add
Code:
ofpath=hd:2


I then moved my vmlinux and System.map into /boot/ and changed the image in my yaboot.conf to
Code:
image=/boot/vmlinux


It still complained about not using a ofpath for macos=/dev/hda6 and I couldn't figure out how to do that, so I just commented that part out for now and will try and figure that out later. I was able to run mkofboot -v after that.

It seemed to work.

I rebotoed and yaboot came up!

But when I tried to get into linux it said:
Code:
/boot/vmlinux: Not a valid ELF image


I'm guessing there is some problem with my kernel.
It seemed to compile alright, and I tried to follow the directions in the handbook but who knows. I was runing into problems, because emerge ppc-development-sources didn't work. I had to use emerge ppc-development and it grabbed the 2.4.26 version of the kernel (I think there is a 2.6.x vesion out correct? How do I get that?) Well after that I didn't have time to play around with it anymore. I'll try taking a look at it tonight. But if anyone has any suggestions I'd would be open to them.

Thanks again for all the help, at least I'm making progress here.
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Thu Jun 24, 2004 1:42 am    Post subject: Reply with quote

Well the kernel problem is probably linked to the compiler you used. If you
compiled your kernel 2.4 with gcc3.3.x (gcc --version) it is likely you will have trouble.
Some people have reported in the past that their kernel wouldn't boot and in my
experience the kernel was booting but unable to load any modules.

To get a kernel 2.6 (which does work with gcc3.3.x) you don't need to get
ppc-dev-whatever as the ppc source have been merged in the main kernel tree.
To have a 2.6 kernel emerge gentoo-dev-sources if I am not mistaken.
Back to top
View user's profile Send private message
dtmetz
n00b
n00b


Joined: 20 Jun 2004
Posts: 30

PostPosted: Thu Jun 24, 2004 3:19 am    Post subject: Reply with quote

Well I was able to grab the kernel using emerge development-source then after compiling moved it into my /boot/ directory and editing my yabootconf I was able to boot up on my linux partition!

Of course this will only lead to more problems - (like my networking doesn't work after I boot up) but this was my first goal.

I'll definity post if I get stuck again.

Thanks for all the help!
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