Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
yaboot - kernel panic [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
Bjosch
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 148

PostPosted: Sun Nov 07, 2004 12:15 pm    Post subject: yaboot - kernel panic [SOLVED] Reply with quote

Hi everybody,
I tried it another time with the installation. For everyone who has not yet read the old threads, I'm trying since this summer to get Gentoo working on my new Dual 1.25G G4 PowerMac. After a successful installation of Debian Sarge I took a look at the yaboot.conf and saw tht there was another indication of the device. I used this time a 2004.3-CD and the installation went fine. For the first time even the yaboo.conf file was perfectly correct! I found the exact device-name as quoted here.
The first boot not happened nothing, as if there wasn't a Linux, the mac booted directly into MacOS!
So I activated the PMU button and retried, now it booted directly into the yaboot, but there were only two choices: "Linux" and "Linux.old", no MacOS. And neither of them worked, I got the message that on hda3 there was no root partition - of course not! But where did it get this hda3 from???
I redid the whole yaboot config manually, nothing changed. When I typed at the boot prompt: hda2,/boot/kernel-2.6.9-r1 it began to boot, until it finished with these lines:

Code:
VFS Cannot open root device "sda2" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS:
Unable to mount root fs or unknown-block(0,0)
Reboot after 180 seconds...

Does anybody know what it means? Here my config files:

/etc/fstab:
Quote:
/dev/hda4 / ext3 noatime 0 0
/dev/hda3 none swap sw 0 0
/dev/hda5 /home ext3 noatime 0 0
/dev/hda6 /var ext3 noatime 0 0
/dev/hda7 /usr ext3 noatime 0 0
/dev/hda8 /emporion ext3 noatime 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,user,ro 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0


mac-fdisk (without mac-driver partitions)
Quote:
/dev/hda1 Apple_partition_map Apple (31.5k) Partition map
/dev/hda2 Apple_Bootstrap bootstrap (800.0k)NewWorld bootblock
/dev/hda3 Apple_UNIX_SVR2 swap (1.0G) Linux swap
/dev/hda4 Apple_UNIX_SVR2 root (1.0G) Linux native
/dev/hda5 Apple_UNIX_SVR2 home (2.0G) Linux native
/dev/hda6 Apple_UNIX_SVR2 var (1.0G) Linux native
/dev/hda7 Apple_UNIX_SVR2 usr (5.0G) Linux native
/dev/hda8 Apple_UNIX_SVR2 emporion (55.0G) Linux native
...
/dev/hda18 Apple_HFS Apple_HFS_Untitled_4 (8.9G) HFS


/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

enablecdboot
image=/boot/kernel-2.6.9-r1 video=radeonfb:1280x1024@75
label=Linux
read-only

macosx=/dev/hda18

Thanks in advance.
Regards.
-Björn


Last edited by Bjosch on Wed Sep 28, 2005 6:52 am; edited 1 time in total
Back to top
View user's profile Send private message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Sun Nov 07, 2004 1:14 pm    Post subject: Reply with quote

Sorry to hear that your installation still isn't complete. The fact that yaboot is trying to boot from wrong partition numbers makes me suspect that the values in your yaboot.conf haven't been written to Open Firmware. Did you run "ybin -v -b /dev/hda2 -o hd:2"? If you're just installing to your internal hard drive, the of-path should simpy be "hd:", try and put that in yaboot.conf instead of /pci@f4000000/ata-6@d/disk@0: And post the output of ybin -v if you run into problems. Moreover, you may want to have a look at this thread.
Back to top
View user's profile Send private message
Bjosch
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 148

PostPosted: Sun Nov 07, 2004 4:34 pm    Post subject: Reply with quote

First of all: thanks for following my problems!
I run indeed ybin with exactly these flags and as I said, for the first time I did not get any error message...
It was yaboot.config that found the hd-identification. I always tried it with simply hd: and it never worked. With Debian it worked this way, but I will retry anyway...
As my bootstrap-partition is yet /dev/hda2 the solution of this thread won't be mine, I think I tried yet everything the other one did before. Maybe my mac is pagan and does not like the blessings ...?
Anyway I will try with "hd:" and let you know. Thanks for that quick reply.

ADDENDUM
I tried and it did not change anything... ybin without error messages. Any more ideas?
Back to top
View user's profile Send private message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Sun Nov 07, 2004 6:18 pm    Post subject: Reply with quote

Troubleshooting would be easier if you supplied more information: what is the output of the ybin-command?
Back to top
View user's profile Send private message
Bjosch
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 148

PostPosted: Sun Nov 07, 2004 6:56 pm    Post subject: Reply with quote

Sorry, I thought my verbose report would not be different from others' (without error messages), here it is:
Code:
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...

Hope it helps you. If you need anything else let me know.
Back to top
View user's profile Send private message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Sun Nov 07, 2004 7:32 pm    Post subject: Reply with quote

Yes, that sounds reasonable. You have chrooted into your new environment when you run ybin, right? And, so to get things straight: when you boot up, you should get the yaboot screen, right? It's only when yaboot hands over to the linux kernel that things go awry? Could you tell us what exactly you have on your /root partition? Like post the output of
Code:
ls -al /root
.
Back to top
View user's profile Send private message
Bjosch
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 148

PostPosted: Sun Nov 07, 2004 7:50 pm    Post subject: Reply with quote

My root partition looks like this:
Code:
drwxr-xr-x   19 root     root         4096 Jan  1 08:16 .
drwxr-xr-x   19 root     root         4096 Jan  1 08:16 ..
-rw-------    1 root     root         1568 Jan  1 08:14 .bash_history
-rw-r--r--    1 root     root            3 Nov  6  2004 .hcwd
drwx------    2 root     root         4096 Nov  6  2004 .links
drwxr-xr-x    2 root     root         4096 Nov  6  2004 bin
drwxr-xr-x    2 root     root         4096 Nov  6  2004 boot
drwxr-xr-x    1 root     root            0 Jan  1 00:00 dev
drwxr-xr-x   29 root     root         4096 Nov  6  2004 etc
drwxr-xr-x    8 root     root         4096 Nov  6  2004 lib
drwx------    2 root     root        16384 Nov  6  2004 lost+found
drwxr-xr-x    4 root     root         4096 Apr 18  2004 mnt
drwxr-xr-x    2 root     root         4096 Apr 18  2004 opt
dr-xr-xr-x   58 root     root            0 Jan  1 07:26 proc
drwx------    2 root     root         4096 Apr 18  2004 root
drwxr-xr-x    2 root     root         4096 Nov  6  2004 sbin
-rw-r--r--    1 root     root     95225682 Nov  6  2004 stage3-g4-2004.1.tar.bz2
drwxr-xr-x    2 root     root         4096 Nov  6  2004 sys
drwxrwxrwt    2 root     root         4096 Nov  6  2004 tmp

I had to manipulate as ls -la /root shows root's personal directory, I deleted manually everything that has its own partition, I don't know another way.
To precise two details:
1. I run ybin after having exited the new environment (into it does not work!)
2. I get yaboot (screen actually I would not call it...) but there are only Linux and Linux.old (don't know what Linux.old is, it's not in yaboot.conf as you see; there is no entry for MacOS. In Debian before arriving at this point there was a screen with three options: Linux (press "l"), MacOS press "x") and cd (don't remember what) and only after pressing "l" I came to the screen I get now immediately.
Back to top
View user's profile Send private message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Sun Nov 07, 2004 8:14 pm    Post subject: Reply with quote

Hmm, that looks reasonable too, so I don't have any obvious suggestion. One thing (just a shot in the dark): I remember that my G5 didn't start up until I put a symlink to my kernel right on the root partition.
Code:
cd /
ln -s /boot/kernel-2.6.9-r1 ./kernel-2.6.9-r1

But I'm running out of ideas here (I'm sure you have compiled support for ext3 and hfsplus into your kernel, right?)
Back to top
View user's profile Send private message
Bjosch
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 148

PostPosted: Sun Nov 07, 2004 10:30 pm    Post subject: Reply with quote

Maybe it's this!! I did compile hfsplus only as module, if I remember well it was indicated as experimental and as it was neither mentioned in the docu I believed it was not essential. Now I loaded the module but it did not help. But to recompile the kernel I need "make" and/or "emerge" and I got only an error message that they are not installed. Do you think I should recompile it and if so how? Otherwise I will try with the symlink. (But should this not be a solution for a problem later, after a correctly working yaboot?)
Back to top
View user's profile Send private message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Sun Nov 07, 2004 10:41 pm    Post subject: Reply with quote

Bjosch wrote:
Now I loaded the module but it did not help. But to recompile the kernel I need "make" and/or "emerge" and I got only an error message that they are not installed.

I'm a bit confused here: when did you load the module? That would presuppose a working system. You can recompile a kernel by booting off the LiveCD and then chrooting into your gentoo installation (http://www.gentoo.org/doc/en/faq.xml#bootrescue). But how can you get a message that make is not installed? What is the system that your currently booting into? Output of
Code:
which make
Back to top
View user's profile Send private message
Bjosch
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 148

PostPosted: Sun Nov 07, 2004 10:51 pm    Post subject: Reply with quote

Sorry for confusing you. I chrooted into my system and loaded the module. But tomorrow I will recompile the kernel with the hfsplus-support compiled regularly into. I might need the "env-update && source /etc/profile" I did not do. Maybe it works then???
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Mon Nov 08, 2004 12:48 am    Post subject: Reply with quote

I am pretty sure that yaboot does not use any HFS (of HFS+) kernel module. For one thing the bootstrap partition is not HFS+ but plain ol' HFS. Plus that the HFS kernel module is not used (yaboot precedes the stable version of this one); instead the bootstrap partition is manipulated through hfsutils or through some internal implementation (I am not sure which). Why, the dependencies of yaboot show exactly this:
Code:
< titi:~ > dep yaboot
sys-boot/yaboot-1.3.13:
                    sys-apps/powerpc-utils   sys-apps/powerpc-utils-1.1.3-r10
    !bootstrap?     sys-devel/patch          sys-devel/patch-2.5.9
                    sys-fs/hfsplusutils      sys-fs/hfsplusutils-1.0.4-r1
                    sys-fs/hfsutils          sys-fs/hfsutils-3.2.6-r3

You must have these packages in fact since ybin does not complain. Here are some other notes about your problem:

First, you booted directly into Mac OS and had to zap the PRAM to boot into the bootstrap partition which means that the nvram has not been updated (even if ybin says so). The one responsible for such an update is nvsetenv from powerpc-utils, you may want to make sure that you have the latest version of this one (1.1.3-r10 works fine for me).

Secondly, you see a Linux and a Linux.old entry in the second stage menu (the latter being not found in /etc/yaboot.conf) which I cannot make sense of except by assuming that your bootstrap partition has not been in fact overwritten. This, plus the fact that the kernel thinks that the root file system is sda2! This is shooting in the dark but try mkofboot instead of ybin, this is supposed to also initialize the file system on the bootstrap partition. Otherwise why is it that the bootstrap partition does not get initialized beats me plain and simple. Maybe using yaboot-static solves the problem (probably not), or maybe the chrooted environment is the culprit... The device=hd: should by the way work, I would view the long device as the first possible culprit. Try to do
Code:
ofpath /dev/hda
and see if this coincides with what you have as device (it should). What is really puzzling is that the ybin output does mention (correctly) /dev/hda2 but the subsequent boot process does not reflect it. Could it be that you have another bootstrap partition on the disk and you inadvertently boot from that one? I am puzzled, but I hope that the information herein does help a bit (at least to eliminate some of the possible culprits).
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Bjosch
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 148

PostPosted: Sat Nov 13, 2004 4:49 pm    Post subject: Reply with quote

Sorry for answering so late but during the week - unfortunately - I absolutely have no time for these things.

to pindar: "make" did not work because I had not mounted /usr and had forgotten that I need of course /usr/bin/make ...

to bruda: thanks for your suggestions.
As for powerpc-utils, indeed I'm using 1.1.3-r10 yet. Doing mkofboot I don't get any output but it simply does not work. According to the package information yaboot-static is awailable only for ppc64, my G4 is still 32bit. I tried also with "hd:" but it did not help either. "ofpath" as you supposed gives the correct device.

Any other ideas???
If not - I surrender.
I am convinced that it's some small detail, but I cannot figure out where it is. But I can't stand it any longer, after 4 monthes I need this box working with Linux and so if all attempts do not help I think I will have to install Debian that works and let Gentoo run my laptop hoping that one day I will be able also to install it on my Mac because as far as I know it, Debian is too complicated in package management and p.e. kernel compiling at least compared with Gentoo. But better than nothing...
Back to top
View user's profile Send private message
oasisbob
n00b
n00b


Joined: 19 Aug 2003
Posts: 41

PostPosted: Tue Nov 16, 2004 11:58 am    Post subject: Reply with quote

I'm having the exact same problem. I'm new to yaboot, PPC, et al -- but I feel that I have a pretty good understanding of what's up.

I'm going to try and poke around my config files and see if I can figure it out. If I can, I'll report back.

This seems like it might be a kernel options issue?
Back to top
View user's profile Send private message
magnum@paranoia
n00b
n00b


Joined: 16 Jan 2005
Posts: 33
Location: Munich

PostPosted: Tue Sep 27, 2005 2:19 pm    Post subject: Solution Reply with quote

Had the same problem on my new iBook G4 12" 1.33 GHz and by trial and error I found a solution:

I use the genkernel for now, my own kernel config doesn't work yet.

--- yaboot.conf ---
boot=/dev/hda2
ofboot=hd:2
device=hd:
root=/dev/hda5
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
read-only
macosx=hd:3
image=/boot/kernel-genkernel-ppc-2.6.12-gentoo-r10
partition=5
label=genkernel
root=/dev/ram0
append="root=/dev/hda5"
---------------------

Magnum
Back to top
View user's profile Send private message
Bjosch
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 148

PostPosted: Wed Sep 28, 2005 6:43 am    Post subject: Reply with quote

Hi,
sorry, I did not notice that this thread was open, yet. Since quite some time I got Gentoo installed. I think it was a problem with the release, with the following installation cd I got no more problems.
Thanks for the replies anyway.
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