Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't open hd:2, yaboot.....close to giving up.
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
krunk
Guru
Guru


Joined: 27 Jul 2003
Posts: 316

PostPosted: Tue Apr 06, 2004 6:13 am    Post subject: Can't open hd:2, yaboot.....close to giving up. Reply with quote

I"ve been working on this for days. Here are the configs:
Yaboot Config
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=4
                                                                               
## 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
ofboot=hd:2
                                                                               
## 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=/boot/vmlinux
        label=Linux
        root=/dev/hda4
        sysmap=/boot/System.map
        read-only
       
image=/vmlinux.old
        label=Linux.old
        root=/dev/hda3
        read-only
       
enableofboot
 


mac-fdisk
Code:
/dev/hda
Command (? for help): p
/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                2457600 @ 1664     (  1.2G)  Linux swap
/dev/hda4         Apple_UNIX_SVR2 root               10485760 @ 2459264  (  5.0G)  Linux native
/dev/hda5              Apple_Free Extra              26157312 @ 12945024 ( 12.5G)  Free space
 
Block size=512, Number of Blocks=39102336
DeviceType=0x0, DeviceId=0x0
 
Command (? for help):

Code:

livecd / # mkofboot -v
 
mkofboot: Create hfs filesystem on /dev/hda2? [y/N] y
mkofboot: Creating HFS filesystem on /dev/hda2...
mkofboot: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/hda2...
mkofboot: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda2...
mkofboot: Installing /etc/yaboot.conf onto /dev/hda2...
mkofboot: Setting attributes on ofboot...
mkofboot: Setting attributes on yaboot...
mkofboot: Setting attributes on yaboot.conf...
mkofboot: Blessing /dev/hda2 with Holy Penguin Pee...
mkofboot: Updating OpenFirmware boot-device variable in nvram...
mkofboot: Installation complete.


ls /mnt/temp (temp is the hd:2 bootable partition)
Code:
livecd / # ls /mnt/temp/
ofboot.b  yaboot  yaboot.conf



I have:
1. reset-nvram
2. set-defaults
3. reset-all
4. Physically pulled the battery and let it reset
5. Mucked around in O F
6. Booted to cd and: ---> boot: hd:4,/boot/vmlinux root=/dev/hda4
7. In O F: boot hd:2,\\yaboot
8. In O F: boot hd:2,\\ofboot.b
9. Checked the output of O F's: devalias (it lists my drive)
10. Danced by the light of the full moon whilest chanting Celtic spirituals.


The best I can get is: can't open hd:2, \\yaboot


variations of above commands tried: boot hd:4,/boot/vmlinux
boot hd:,\\yaboot, boot hd:2,yaboot, boot hd:,yaboot

Besides the manual attempts, if I boot normally it just displays a blinking directory with a '?' or a smiley apple guy. If I have a bootable cd in it will boot that, but other wise it just hangs.

Any help would be appreciated.....and for the record, this box did boot ok for a while than just stopped.
_________________
G4 1ghz iBook
PowerMac G3 (B&W) [Powered by Gentoo and Gentoo alone :)]

Dual G5
iPod 3rd generation
Back to top
View user's profile Send private message
krunk
Guru
Guru


Joined: 27 Jul 2003
Posts: 316

PostPosted: Tue Apr 06, 2004 1:33 pm    Post subject: Reply with quote

Just an add on. I'm fairly sure it's a corrupted/bad Open Firmware. I rounded up an OSX cd and it hangs when booting with an error window telling me to reboot. (the plug must be pulled out to do so).


Is there a way to make a boot cd that will load the on disk kernel....maybe even putting the Boot Partition files directly on a cd? Or any other way to bypass the O F?

I may play around with catalyst later.
_________________
G4 1ghz iBook
PowerMac G3 (B&W) [Powered by Gentoo and Gentoo alone :)]

Dual G5
iPod 3rd generation
Back to top
View user's profile Send private message
fw146
n00b
n00b


Joined: 29 Dec 2003
Posts: 42

PostPosted: Tue Apr 06, 2004 2:03 pm    Post subject: Reply with quote

krunk wrote:
Just an add on. I'm fairly sure it's a corrupted/bad Open Firmware. I rounded up an OSX cd and it hangs when booting with an error window telling me to reboot. (the plug must be pulled out to do so).


Is there a way to make a boot cd that will load the on disk kernel....maybe even putting the Boot Partition files directly on a cd? Or any other way to bypass the O F?

I may play around with catalyst later.


A few things:
1. As far as I know, you should not mount the bootstrap partition. Atleast you don't need to, and I hope mounting it does not "unbless" the partition.

2. I don't think there is anyway to bypass the OF. As far as I know the ppc kernel needs the OF initialization.

3. As long as any bootable (linux/gentoo?) cd left in the drive gets booted, I would think that OF is not corrupt. BTW if the OF does get corrupted, you should try asking for help on the yaboot mailing lists. The guys over there have deeper understanding of OF related issues.

My suggestion:
a) at the OF prompt
Code:
boot hd:2,\\:tbxi
This will try to boot the yaboot on your harddisk.

b) If that does not work, boot with the livecd and reinstall yaboot.

Let me know how it goes. Best of luck, and I really hope that a corrupt OF is not the source of your problem :|
Back to top
View user's profile Send private message
krunk
Guru
Guru


Joined: 27 Jul 2003
Posts: 316

PostPosted: Tue Apr 06, 2004 2:29 pm    Post subject: Reply with quote

I've tried both of those. boot hd:2,\\:tbxi (this is the default set by ybin -v from the printenv output) it says: "can't OPEN hd:2,\\:tbxi".

I've booted to livecd and reinstalled yaboot umpteen times. It's been so blessed with the penguin holly pee that I'm surprised it hasn't shorted out yet.

8O
_________________
G4 1ghz iBook
PowerMac G3 (B&W) [Powered by Gentoo and Gentoo alone :)]

Dual G5
iPod 3rd generation
Back to top
View user's profile Send private message
fw146
n00b
n00b


Joined: 29 Dec 2003
Posts: 42

PostPosted: Tue Apr 06, 2004 5:50 pm    Post subject: Reply with quote

krunk wrote:
I've tried both of those. boot hd:2,\\:tbxi (this is the default set by ybin -v from the printenv output) it says: "can't OPEN hd:2,\\:tbxi".

I've booted to livecd and reinstalled yaboot umpteen times. It's been so blessed with the penguin holly pee that I'm surprised it hasn't shorted out yet.

8O


OK.

Even tough you mention that hd exists in devalias, can you run
Code:
ofpath /dev/hda
from the livecd and check its results?

The livecds also use yaboot. If you can boot the livecd, I don't see why OF would reject yaboot on your hd. BTW you could also try the complete path instead of the alias, i.e. at the OF prompt
Code:
 boot /pci@nnn.../..../disk@0:2,\\:tbxi

As a last resort I would zero out /dev/hda2 (with dd if=/dev/zero of=/dev/hda2 bs=1k), and then run mkofboot (after chroot ofcourse).

Oh one more thing to note: yaboot.conf manpage discourages setting the ofboot=of-path configuration parameter.
Back to top
View user's profile Send private message
krunk
Guru
Guru


Joined: 27 Jul 2003
Posts: 316

PostPosted: Tue Apr 06, 2004 10:17 pm    Post subject: Reply with quote

ofpath /dev/hda => hd:

ofboot=of-path --> a recent attempt, for the majority of the attempts this was not set.

The /pci/xxxxx parameter seems to access the disk (I can hear spinning I believe) and it pauses for a while...but gives the CAN't open error.

Writing to zeros, using mac-fdisk to reset up, and mkofboot -v did not work.

As I mentioned before, even the OSX Panther install cd hangs and will not initialize fully. This leads me to believe it is a general disk access/O F boot problem. This would explain why yaboot initializes off of the cd fine. Furthermore once the livecd kernel is loaded and the kernel side drivers are installed, I can access the disk fine. This (to me) seems to further verify that it is an O F disk access problem. And one more: the yaboot on cd cannot access the disk. This would be before kernel drivers are installed and while the O F drivers are still in place again indicating (to me) it is an O F problem.

I thank you for all your help....I'm curious though if the above logic is sound.

*EDIT*
Ummm, it fixed itself. I threatened to donate it to charity, than I started to make a custom boot disk (using livecd). I sternly told the B&W that if this didn't work, I was scrapping it for parts and never dealing with a mac or ppc hardware again. I also begin setting upa x86 server to replace it. It sent out a x86 curse causing the potential replacement to smoke out of the ram ports (no joke, it's fried). Then I hit the power button and it just booted right up. No rhyme or reason to it...didn't do anything different....*shrug*-----------> magic
_________________
G4 1ghz iBook
PowerMac G3 (B&W) [Powered by Gentoo and Gentoo alone :)]

Dual G5
iPod 3rd generation
Back to top
View user's profile Send private message
mrimac
n00b
n00b


Joined: 12 Apr 2004
Posts: 2

PostPosted: Mon Apr 12, 2004 11:42 pm    Post subject: Reply with quote

maybe this will work http://maclinux.com.sapo.pt/mboot-3.0-0.1.ppc.rpm

tell me if not
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