Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] yaboot problem, corrupt file system, os 9 loading
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
rmdegennaro
n00b
n00b


Joined: 14 Sep 2005
Posts: 19

PostPosted: Thu Oct 13, 2005 7:38 pm    Post subject: [SOLVED] yaboot problem, corrupt file system, os 9 loading Reply with quote

Hi,

I am new to gentoo and ppc in general, please be kind. :? I have inherited an old Blue & White PowerMac. It has a Sonnet G4 upgrade in it. It formerly booted Mac OS 9.2.2 and Mac OS X 10.4.2 without problem. The basic IDE/ATA hardware is DVD drive, ZIP drive, 2GB HD (with Mac OS 9), 12GB HD (with Mac OS X).

Some background, that may help other folks too:

1. I could boot from the CD, but the two harddrives were not to be found. I found this bug on the forums: bug 87665. To use it, I:
a. put it on a local FTP server (any other linux/macosx/windoze has one built in)
b. mkdir /modules
c. cd /modules
d. ftp'ed it
e. insmod /modules/cmd64x.ko

This showed that I had hdc (the 2GB) and hdd (the 12GB). The two partition tables are as follows:
Code:

  /dev/hdc1           Apple_partition_map Apple                                  63 @ 1              (  31.5k )  Partition map
  ... driver partitions ...
  /dev/hdc9                 Apple_Bootstrap bootstrap                         1600 @ 1824         (800.0k)  NewWorld bootblock
  /dev/hdc10                      Apple_Free                                     266912 @ 3424         (130.3M)  Free space
  /dev/hdc11                       Apple_HFS Apple_HFS_Untitled_1   3857408 @ 270336     (   1.8G)  HFS
  /dev/hdc12                      Apple_Free                                            16 @ 4127744    (   8.0K)  Free space


Code:

  /dev/hdd1           Apple_partition_map Apple                                  63 @ 1              (  31.5k )  Partition map
  /dev/hdd2                 Apple_Bootstrap bootstrap                         1600 @ 64            (800.0k)  NewWorld bootblock
  /dev/hdd3                      Apple_Free                                     268672 @ 1664          (131.2M)  Free space
  /dev/hdd4                       Apple_HFS Apple_HFS_Untitled_1   12320768 @ 270336     (   5.9G)  HFS
  /dev/hdd5            Apple_UNIX_SVR2 swap                            1048576 @ 12591104  (512.0M)  Linux swap
  /dev/hdd6            Apple_UNIX_SVR2 root                            11745792 @ 13639680  (   5.6M)  Linux native


2. I followed the instruction (a couple of times, double checking) using hdd2, hdd5 and hdd6 where appropriate. One thing, be careful with the hdX#, because if you repartition afterwards it will change the # part of hdX#.

3. I compiled cmd64x support into my kernel.

4. When running yabootconfig, it could not automatically find my kernel, so I pointed it to it. Note: at this point you are outside the CHROOT, so mine was /mnt/gentoo/boot/kernel-2.6.13. When I rebooted, I received the error that the kernel (using device, partition, root) was corrupt or missing. The yaboot.conf that was generated is as follows (I added 4 lines at bottom):
Code:

boot=/dev/hdd2
device=/pci800000000/pci-bridge@d/pci-ata@1/@0/disk@1:
partition=6
root=/dev/hdd6
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.13
    label=Linux
    read-only

macos=/dev/hdc11
macosx=/dev/hdd4
enablecdboot
enableofboot


5. I then tried to run yabootconf in the CHROOT, but that didn't work until I ran emerge mac-fdisk. At this point I run yabootconfig in the CHROOT, but get the error "ofpath: /dev/ROOT: No such file or directory". So I run ofpath /dev/hdd and get the response of ultra1:. So I change the yaboot.conf manually (see below) and run ybin -v (with no problem). Oh, I also added some lines to the kernel image as per the manual instructions. At this point I get Unable to open file, Invalid device
Code:

boot=/dev/hdd2
device=/ultra1:
partition=6
root=/dev/hdd6
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.13
    label=Linux
    root=/dev/hdd6
    partition=6
    read-only

macos=/dev/hdc11
macosx=/dev/hdd4
enablecdboot
enableofboot


6. I also tried modifying the sample yaboot.conf to either of the above settings, and same behaviour respectively. I.e. corrupt for PCI and invalid device for ULTRA1.

7. Miscellaneous info: I can boot to CD, OF and macosx without problem. "macos" does nothing.

Any help would be appreciated. I wonder if yaboot does not recognize the PCI/IDE chain, similar to the CD. Sorry being a noobie and if this is answered elsewher in the forum. Thanks in advance.[/glep]


Last edited by rmdegennaro on Sat Oct 15, 2005 11:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Oct 13, 2005 9:25 pm    Post subject: Reply with quote

First, please use 2005.1 instead of 2005.0, the module is already included with 2005.1 and you'll have fewer problems.

Because it's saying /dev/ROOT, check to make sure your fstab is configured correctly.

Ultra1: is almost certainly wrong,

partition= should not be in the image section
root= should only be in the image section.

Most likely, your problem is that by not using a LiveCD with the module, the drives appear in a different order than expected (due to module loading order). Try with the 2005.1 cd and see if that helps.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
rmdegennaro
n00b
n00b


Joined: 14 Sep 2005
Posts: 19

PostPosted: Fri Oct 14, 2005 4:07 am    Post subject: Reply with quote

JoseJX, thank you very much for responding.

JoseJX wrote:
First, please use 2005.1 instead of 2005.0, the module is already included with 2005.1

After booting to the 2005.1 gentoo LiveCD, the hdX# are the same, DVD = hda, ZIP = hdb, 2.0GB = hdc, 12.0GB = hdd. If someone thinks this is wrong, should I submit a bug? I'd hate to waste people's time if this is normal Blue & White behavior. If it was a PC, I'd know, but I am so unfamiliar with Mac's.

BTW, I got a lot of errors about boot image when the LiveCD booted. Is this normal? Is that a bug?

Also, after looking at the yaboot.conf file again, I see how stupid I was. I should have added the root= line to the original and retried. I will do that tomorrow. I also found a 120GB drive, so will adjust the whole thing and start from the beginning. If it still doesn't work, I will assume that the order of modules loading and how the device names are assigned is wrong and play with that. Will ybin -v work in that case? Hopefully I won't have to find out... 8)

Thanks again, and more tomorrow.
Back to top
View user's profile Send private message
rmdegennaro
n00b
n00b


Joined: 14 Sep 2005
Posts: 19

PostPosted: Sat Oct 15, 2005 11:00 pm    Post subject: Reply with quote

Okay, this is an "unsanctioned" project for me, so working on it when I can...

Summary, LiveCD 2005.1 did not detect eth0, also still detects ide drives as hdc and hdd. The later busts yabootconfig and the former means you can't download any stage, portage or emerge anything. Should these be reported as bugs? Probably better assessed after all that I did is read. I could only complete it all if I installed Mandriva as "dummy install" to finish the yaboot configuration.

Oh, some new information before going through what I did. Basically I replaced the the 2GB with a 120GB drive (nice to have spares people forget about :-) ). I reloaded OS 9.2.2 and OS X 10.4.2 onto the 12GB, and used Disk Utility to partition the 120GB with all free space.

This means I started from scratch, and abbreviate pieces are as follows:
1. I found this out after it was all said and done, but I think its worth a mention in the tutorial. Now, everytime MacOSX loaded it wanted to initialize the disk. If you have at least one HFS+ drive on it somewhere, MacOSX won't yell at you about it.
1a. mac-fdisk will not delete any driver partition. I thought of using "i", but wasn't sure about the future of this machine.
1b. When getting to the partitioning portion, 2p had to be replaced by 6p.

2a. Even though the LiveCD 2005.1 now automatically saw both the 120GB and the 12GB, they were still hdc and hdd respectively.
2b. The 2005.1 LiveCD did not auto-detect/load the module for eth0 (2005.0 did). For this, I tried net-detect and manual config, but nothing worked. The return from ifconfig eth0 gave HWaddr that was 08-00-07-02-<exactly 12 sets of -00> after boot (I rebooted just to see if it made a difference). I was thinking the manual might not have worked because this seems like an improperly loaded driver, which I don't know how to unload.

3. So, I went back to 2005.0 LiveCD where networking was fine. And started installation.

4. Not sure if this is bad, even though I booted from 2005.0 LiveCD, I still downloaded 2005.1 stage3.

5. Proceeded with instructions and everything cool. When going to configure the kernel, I noticed:
Code:

Builtin PowerMac IDE Support
->Probe internal ATA/100 (Kauai) first

I figure this has something to do with the issue of order of devices. I wondered if it might be that the kernel on LiveCD is compiled one way and what I tried before (wish I still had the kernel config) was the other. I tried it first unchecked as that is the default. Essentially the setting worked, but that hda was the 120GB. This will bust ybin. More, details? Keep reading.

BTW, do you think the guy who gave me the PowerMac switched the cables? Looking inside it doesn't look like it. But the guy didn't seem to bright (hope he doesn't read this).

6. After yaboot & rebooting I get "DEFAULT CATCH!, code=300 at %SRR0: ff80### SRR1: 0000b030" where ####is a changing hexadecimal number. I try macosx and it works. I try macos and same "DEFAULT CATCH" message as linux.

7. So maybe its the yabootconfig or kernel. To test, I tried Mandriva (just because I used that one x86 before switching to gentoo). Mandriva detected hda, hdb, hdc, hdd as I normally would have expected (120GB, 12GB, ZIP and DVD respectively). I installed it and it seemed to work for linux, but not macos (more on that later). The yaboot file is as follows:
Code:

default="linux"
boot=/dev/hda6
ofboot=/pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@0:6
delay=30
timeout=50
defaultos=linux
install=/usrlib/yaboot/yaboot
install=/usrlib/yaboot/ofboot
enablecdboot
enableofboot
image=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/vmlinuz-2.6.11-6mdk
   label="linux"
   root=dev/hda10
   initrd=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/initrd-2.6.11-6mdk.img
   append" resume=/dev/hda7"
   read-only
image=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/vmlinuz-2.6.11-6mdk
   label="failsafe"
   root=dev/hda10
   initrd=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/initrd-2.6.11-6mdk.img
   append" railsafe resume=/dev/hda7 devfs=nomount"
   read-only
macos=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk1:10,/boot/vmlinuz-2.6.11-6mdk


8. My conclusion from the above is that the yaboot.conf file from Gentoo was mostly messed up, and Mandriva's only slightly. I changed the Mandrake yaboot.conf to include gentoo to fix the gentoo boot problem. What I did is below and it worked to load the kernel. But I noticed that the 120GB was hda (unlike what I expected from kernel config). And it makes sense that the root file system could not be found. So onto 9...
Code:

default="mandrake"
boot=/dev/hda6
ofboot=/pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@0:6
delay=30
timeout=50
defaultos=linux
install=/usrlib/yaboot/yaboot
install=/usrlib/yaboot/ofboot
enablecdboot
enableofboot
image=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:8,/boot/kernel-2.6.11-gentoo-r3
   label="gentoo"
   root=dev/hda8
   read-only
image=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/vmlinuz-2.6.11-6mdk
   label="mandrake"
   root=dev/hda10
   initrd=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/initrd-2.6.11-6mdk.img
   append" resume=/dev/hda7"
   read-only
image=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/vmlinuz-2.6.11-6mdk
   label="mdk failsafe"
   root=dev/hda10
   initrd=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/initrd-2.6.11-6mdk.img
   append" railsafe resume=/dev/hda7 devfs=nomount"
   read-only
macos=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk1:10
macosx=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk1:12


9. Back into Mandrake to edit the fstab. Which I changed to below.
Code:

/dev/hda8               /            ext3        noatime              0 1
/dev/hda7               none         swap        sw                   0 0
/dev/cdroms/cdrom0      /mnt/cdrom   auto        noauto,ro            0 0
proc                    /proc        proc        defaults             0 0
shm                     /dev/shm     tmpfs       nodev,nosuid,noexec  0 0

The big question, did it work this time? Well, it rechecked /dev/hda8 and rebooted. After that, guess what, I could boot into GENTOO!!

10. I tried to boot in macos (9.2) and macosx (10.4). Well...neither worked. I changed yaboot.conf to the following:
Code:

default="mandrake"
boot=/dev/hda6
ofboot=/pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@0:6
delay=30
timeout=50
defaultos=linux
install=/usrlib/yaboot/yaboot
install=/usrlib/yaboot/ofboot
enablecdboot
enableofboot
image=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:8,/boot/kernel-2.6.11-gentoo-r3
   label="gentoo"
   root=dev/hda8
   read-only
image=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/vmlinuz-2.6.11-6mdk
   label="mandrake"
   root=dev/hda10
   initrd=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/initrd-2.6.11-6mdk.img
   append" resume=/dev/hda7"
   read-only
image=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/vmlinuz-2.6.11-6mdk
   label="mdk failsafe"
   root=dev/hda10
   initrd=/pci80000000/pci-bridge@d/pci-ata@1/@0/disk0:10,/boot/initrd-2.6.11-6mdk.img
   append" railsafe resume=/dev/hda7 devfs=nomount"
   read-only
macos=/dev/hdb10
macosx=/dev/hdb12

This booted macosx, but not macos. Not too worried about 9, though someone said that you can fix the Sonnet processor with OS9 only (how would one "fix" the processor?).

So now I know it worked, and should clean up the yaboot.conf. I will probably leave mandrake in there until I finish fixing/loading other stuff, but copied it to gentoo partition for later. Now onto a few other problems like clock config didn't work nor did the eth0. Hopefully they will be a bit more straight forward then the LiveCD/yaboot stuff.
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sun Oct 16, 2005 3:15 am    Post subject: Reply with quote

On B&W G3's the network card is usually a BMAC, so try modprobing bmac with the 2005.1 cd.

To prevent OSX from trying to initialize the partitions, change the partition type name in mac-fdisk to something like Linux. This prevents OSX from trying to open the partition. Alternatively, if you have OSX10.3, you can install a kext that allows reading/writing to ext3 partitions which should also make this problem go away.

Mac-fdisk will not delete driver partitions (they are needed for OS9 and can't easily be installed from linux). You can get around this by initializing the mac partition table with the i option if you're sure you don't need them (unless you're booting OS9).

The hard drive order is probably due to the order in which the driver is loaded. We probably should turn on the "Probe internal ATA/100 (Kauai) first" if it's not already on in our LiveCD kernel though.

Using a newer stage is fine, I would certainly suggest it. Gentoo is not tightly bound to release versions.

As for the default catch error, can you boot an OS9 cd? This would help to find if it's a problem with your installed OS9 or another issue. I'm not sure what else to suggest.

As for submitting bugs, feel free. None of the developers has a B&W G3 which can sometimes lead to suboptimal support. If you think there is a better way to do something, bug us, we're not going to know otherwise.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
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