Results 1 to 10 of 10

Thread: PPC - Is ofboot still necessary?

  1. #1
    Join Date
    Jan 2006
    Beans
    Hidden!

    PPC - Is ofboot still necessary?

    I noticed that only a device line is included in /etc/yaboot.conf on Gutsy and now Hardy.

    Normally I duplicate that line with ofboot for safety's sake, and follow up with

    Code:
    sudo ybin -v -C /etc/yaboot.conf
    but is it really redundant?

    My yaboot.conf:
    Code:
    boot=/dev/sda2
    device=/ht@0,f2000000/pci@3/k2-sata-root@c/k2-sata@0/disk@0:
    ofboot=/ht@0,f2000000/pci@3/k2-sata-root@c/k2-sata@0/disk@0:
    partition=3
    root=/dev/sda3
    timeout=50
    install=/usr/lib/yaboot/yaboot
    magicboot=/usr/lib/yaboot/ofboot
    enablecdboot
    
    image=/boot/vmlinux
            label=Linux
            read-only
            initrd=/boot/initrd.img
            append="nosplash"
    
    image=/boot/vmlinux.old
            label=old
            read-only
            initrd=/boot/initrd.img.old
            append="nosplash"
    20" G5 iMac - AMD64 HP desktop
    http://www.ppclinux.info/

  2. #2
    Join Date
    May 2005
    Beans
    498

    Re: PPC - Is ofboot still necessary?

    Its nice to have. I say that after spending hours trying to boot from it and failing miserably

    I thought it was used like

    boot=/dev/hda9
    device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
    #partition=10
    #root=/dev/hda10
    timeout=100
    install=/usr/lib/yaboot/yaboot
    magicboot=/usr/lib/yaboot/ofboot
    enablecdboot

    enableofboot
    enablenetboot

    macosx=/dev/sda2

    image=/boot/vmlinux
    label=debian
    partition=10
    root=/dev/hda10
    read-only
    initrd=/boot/initrd.img

    etc.......

    I was going to link to my running multipe ppc distros thread but it seems ppc has disapeared!!! I'll add it when I find it.


    http://ubuntuforums.org/showthread.php?t=756795
    Last edited by oswaldkelso; April 22nd, 2008 at 07:42 AM.

  3. #3
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: PPC - Is ofboot still necessary?

    ofboot parameter:

    have a close read of man yaboot.conf -

    Code:
           This  file  contains  options  for  two distinct programs: the ybin(8) (and mkofboot(8))
           bootstrap(8)  installer,  and  the  yaboot(8)  bootloader,  each  ignores  the   other’s
           configuration options.
    
           The  ybin/mkofboot  options  are:  boot=  ofboot= install= magicboot= delay= bsd= macos=
           macosx= darwin= defaultos= usemount mntpoint= fstype= hfstype= nobless hide protect non‐
           vram enablecdboot enablenetboot enableofboot brokenosx
    
           The remaining options belong to yaboot(8).
    and

    Code:
      ofboot=of-path
                  This option defines the OpenFirmware device path to the  bootstrap(8)  partition.
                  This is needed so the first stage ofboot.b loader can be configured properly.  It
                  should include the OpenFirmware path including the partition number  (but  not  a
                  filename).  Example:  if  your  bootstrap partition is /dev/hda2 the OF path will
                  likely be hd:2.  As of ybin(8) 0.18 you no longer are  required  to  (and  should
                  not)  specify  this option.  If left undefined ybin(8) will attempt to figure out
                  the OpenFirmware path automatically using the ofpath(8) utility.  You should only
                  need to define this option if ofpath(8) fails.

    i.e. ofboot is a stage 1 parameter to find yaboot (stage 2), not needed if ofpath works properly.

    also note -
    Code:
      device=sd1: ## is a drive.
    
      ofboot=sd1:2 ## is a partition.
    pxw

  4. #4
    Join Date
    May 2005
    Beans
    498

    Re: PPC - Is ofboot still necessary?

    Thanks for the reply I was using the "l" then "tab" then typing in the path as I thought I'd try and learn how to get a multi boot yaboot setup and working before I installed any more distros. So far I have debian testing, ubuntu hardy, Fedora 8 (will try 9 when I get it) yellowdog 6, and slackintosh12.
    I shall have to reinstall fedora and yellowdog as the had selinux activated and I couldn't edit their yaboot.conf files.

    This is the yaboot.conf in full


    ## yaboot.conf generated by debian-installer
    ##
    ## run: "man yaboot.conf" for details. Do not make changes until you have!!
    ## see also: /usr/share/doc/yaboot/examples for example configurations.
    ##
    ## For a dual-boot menu, add one or more of:
    ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

    boot=/dev/hda9
    #device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
    device=hd:
    #partition=10
    #root=/dev/hda10
    timeout=100
    install=/usr/lib/yaboot/yaboot
    magicboot=/usr/lib/yaboot/ofboot
    enablecdboot
    enableofboot
    enablenetboot
    fgcolor=yellow
    bgcolor=blue

    macosx=/dev/sda2

    image=/boot/vmlinux
    label=debian
    partition=10
    root=/dev/hda10
    read-only
    initrd=/boot/initrd.img

    image=/boot/vmlinux
    label=ubuntu
    partition=2
    root=/dev/hda2
    read-only
    initrd=/boot/initrd.img

    image=/boot/vmlinux
    label=fedora
    partition=3
    root=/dev/hda3
    read-only
    initrd=/boot/initrd.img

    image=/boot/vmlinux-2.6.23-9.ydl6.1
    label=yellowdog
    partition=4
    root=/dev/hda4
    read-only
    #initrd=/boot/initrd.img
    initrd=/boot/initrd-2.6.23-9.ydl6.1.img
    append="rhgb quiet root=LABEL=/1"

    image=/boot/vmlinux
    label=slackintosh
    partition=5
    root=/dev/hda5
    read-only
    initrd=/boot/initrd.img

    image=/boot/vmlinux
    label=suse
    partition=6
    root=/dev/hda6
    read-only
    initrd=/boot/initrd.img

    image=/boot/vmlinux
    label=arch
    partition=7
    root=/dev/hda7
    read-only
    initrd=/boot/initrd.img

    image=/boot/vmlinux
    label=gentoo
    partition=8
    root=/dev/hda8
    read-only
    initrd=/boot/initrd.img

    image=/boot/vmlinux.old
    label=old
    partition=10
    root=/dev/hda10
    read-only

    initrd=/boot/initrd.img.old

    I am thinking I'll delete everything bar debian and reinstall hardy and because I have a feeling selinux on the rpm distros may be stopping yaboot working correctly (I modified the yaboot on the last distro (yd) then I copied the yaboot to debian. Debian booted fine but my options aren't showing up.

    I also have an error message when running ybin

    "(gedit:4199): GnomeUI-WARNING **: While connecting to session manager:
    Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.
    debian:/etc# ybin -v -C /etc/yaboot.conf
    ybin: Finding OpenFirmware device path to `/dev/hda9'...
    ybin: Finding OpenFirmware device path to `/dev/sda2'...
    ofpath: /dev/sda2: No such file or directory
    ybin: Unable to determine OpenFirmware path for macosx=/dev/sda2
    ybin: Try specifying the real OpenFirmware path for macosx=/dev/sda2 in /etc/yaboot.conf"

    Though both debian and osx boot fine!
    I did look at the man page but found it confusing. So used these links to try and shed some light on things.


    http://www.askdavetaylor.com/tweak_y...dog_linux.html

    http://penguinppc.org/bootloaders/yaboot/doc/

    http://penguinppc.org/bootloaders/ya...boot-faq.shtml

    http://lists.debian.org/debian-power.../msg00241.html

    Anyway I shall try and get it tri-booting debian, hardy, and osx, before adding more distros.

    Anyway back on track ofboot is needed, I just need to figure it out

  5. #5
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: PPC - Is ofboot still necessary?

    oswaldkelso

    I was responding more about the "ofboot" parameter, not the "enableofboot" option which gets an openfirmware shell. But I think it is still relevant to your yaboot.conf - some suggestions -

    1. Check the real yaboot.conf:

    The ybin error message means ybin failed to update the (/dev/hda9) bootstrap partition version of yaboot.conf because ofpath failed , so it is an unknown. Mount the partition and read yaboot.conf to see what you have got there, (do all this from your good system, where you have /etc/yaboot.conf, and from where you run ybin).

    2. Check ofpath outout:

    Then check out ofpath against your partition list, on your various partitions and drives to see if it is bugged for your system - or maybe you are giving it wrong linux device names (sd hd ??); possibly it has a problem with scsi. It must return valid openfirmware paths for ybin to succeed. It seems to be having a problem with /dev/sda2.

    3. If you dont have a problem with ofpath:

    Then save your existing yaboot.conf and try generating a new minimal version using yabootconfig. This will not cover all the other systems, just get debian booting, you can use it as a base to add stuff.

    Or

    4. If ofpath is returning garbage, you will have to either (a) do your own yaboot.conf.
    complete with open firmware paths, and install it or (b) see if my patched version of ofpath fixes it -


    http://ubuntuforums.org/showpost.php...03&postcount=8


    If you can get a patched version of ofpath running with the yaboot installer, that should pick up all the other linux systems, I think that can be done from an installed system, but forget how.

    Here for your entertainment is a copy of my successful ybin output (no scsi, only 2 sata, and G5 power mac), using patched ofpath, may provide some clues -

    Code:
    admax@bigmac:~/bootsda2/revs$ sudo ybin -v
    ybin: Finding OpenFirmware device path to `/dev/sda2'...
    ybin: Finding OpenFirmware device path to `/dev/sdb3'...
    ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/sda2...
    ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/sda2...
    ybin: Installing /etc/yaboot.conf onto /dev/sda2...
    ybin: Setting attributes on ofboot...
    ybin: Setting attributes on yaboot...
    ybin: Setting attributes on yaboot.conf...
    ybin: Blessing /dev/sda2 with Holy Penguin Pee...
    ybin: Updating OpenFirmware boot-device variable in nvram...
    (More detail if you run ybin -v --debug).

    and the boot partition file listing -

    Code:
    admax@bigmac:~/bootsda2/revs$ mkdir sda2
    admax@bigmac:~/bootsda2/revs$ sudo mount /dev/sda2 sda2
    admax@bigmac:~/bootsda2/revs$ ls -l sda2
    total 155
    -rw-r--r-- 1 root root   3261 2008-04-23 23:52 ofboot.b
    -rw-r--r-- 1 root root 153124 2008-04-23 23:52 yaboot
    -rw-r--r-- 1 root root    862 2008-04-23 23:52 yaboot.conf
    and a current yabbot.conf I am using -

    Code:
    # edited  pxw 24apr2008
    ##
    ## run: "man yaboot.conf" for details. Do not make changes until you have!!
    ## see also: /usr/share/doc/yaboot/examples for example configurations.
    ##
    ## For a dual-boot menu, add one or more of:
    ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ
    
    boot=/dev/sda2
    device=sd0:
    partition=6
    root=/dev/sda6
    timeout=100
    install=/usr/lib/yaboot/yaboot
    magicboot=/usr/lib/yaboot/ofboot
    enablecdboot
    enableofboot
    
    macosx=/dev/sdb3
    
    image=/boot/vmlinux
            label=XU710-sda6
            read-only
            initrd=/boot/initrd.img
    
    image=/boot/vmlinux.old
            label=old
            read-only
            initrd=/boot/initrd.img.old
    
    image=/boot/vmlinux
            root=/dev/sdb15
            label=xu704-sdb15
            read-only
            initrd=/boot/initrd.img
    device=sd1:
    partition=15
    ##
    When there are several systems, it is best to put the 2 parameters device= and partition= in the individual image sections rather than the global stuff, the important thing is to get a solid yaboot.conf and bootstrap partiton in one controlling linux system.

    pxw
    Last edited by pxwpxw; April 23rd, 2008 at 04:38 PM.

  6. #6
    Join Date
    Jan 2006
    Beans
    Hidden!

    Re: PPC - Is ofboot still necessary?

    Wow, thanks guys that is some great info! I'll have to digest it all a bit later and fine-tune my setup.

    I also run Debian Lenny on an external firewire and now Xubuntu on the internal drive, and was playing around with yaboot when I messed something up. I've played around with yaboot for so long that it is no longer scary to just reboot into a rescue mode, and manually edit the files - I can always get back to a working state booting either one.

    When I did mess it up on the external firewire, it took away my ability to boot the internal, and ybin complained about not having ofboot at the rescue prompt, so that worked - but obviously it is not ideal.

    Can't wait to dig into it more - thanks Pxwpxw, and OswaldKelso!

    Makes me wonder if yabootconfig now works on G5's - I'll have to check that later and pull up some man pages...
    20" G5 iMac - AMD64 HP desktop
    http://www.ppclinux.info/

  7. #7
    Join Date
    May 2005
    Beans
    498

    Re: PPC - Is ofboot still necessary?

    Thanks for the info. Very useful though a bit over my head. I think I have other issues as regard (of) because I cant use the alt key to select my boot device, it flashes up then goes straight to an (of) prompt.
    I can boot and choose l,x,c, from yaboot and all work, and if I choose l, I can select the linux partition to boot with the tab. The selection choices bear no resemblance to the yaboot or fstab on either partition. (Both are the same) but seem to be left over from a previous incarnation. I have eraised all bar 2 linux partitions both testing, but will wipe it all from osx to see if the (of) partition can be fixed.As I understand it yaboot reads the small apple partion? With any luck I should be able to boot using the alt key after I reinstall. If not I think it's something to do with scsi. Which has a bit temprementel on this machine.

    fyi:Running fdisk -l gives the partitions as correct. This makes me think the problem is not on the linux side?

    I'll post any developments. And thanks again for the input

  8. #8
    Join Date
    May 2005
    Beans
    498

    Re: PPC - Is ofboot still necessary?

    Well I wiped everything from osx and even with a linux disk in the drive the alt key failed and defaulted to a (of) prompt.
    Holding down the c key the disk booted fine.

  9. #9
    Join Date
    May 2005
    Beans
    498

    Re: PPC - Is ofboot still necessary?

    Well a little update on my progress. I feel this info will be of use to someone as every time I search for info I find this thread.

    I have reinstalled debian testing, ubuntu hardy, fedora 8 and yellowdog 6 and can now choose any one to boot by choosing the letter l (as in L) press tab and type in the partition label name. In my case I just labeled them after the partition number.

    so typing hda3 boots debian, had4 boots hardy, and fda7 boots fedora. pressing enter boots yellowdog (hda8)as that was the last distro I installed though obviously this can be changed.

    her is my yaboot.conf file for anyone interested in multibooting linuk distros on ppc

    # yaboot.conf generated by anaconda

    boot=/dev/hda2
    init-message=Welcome to YDL!\nHit <TAB> for boot options

    partition=8
    timeout=80
    install=/usr/lib/yaboot/yaboot
    delay=5
    enablecdboot
    enableofboot
    enablenetboot
    macosx=/dev/sda2
    magicboot=/usr/lib/yaboot/ofboot

    ##yellowdog6
    image=/boot/vmlinux-2.6.23-9.ydl6.1
    label=linux
    read-only
    initrd=/boot/initrd-2.6.23-9.ydl6.1.img
    append="rhgb quiet root=LABEL=/1"

    ## yaboot.conf generated by the Ubuntu installer
    ##
    ## run: "man yaboot.conf" for details. Do not make changes until you have!!
    ## see also: /usr/share/doc/yaboot/examples for example configurations.
    ##
    ## For a dual-boot menu, add one or more of:
    ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ
    enablecdboot
    enableofboot
    enablenetboot

    ##debian
    image=/boot/vmlinux
    root=/dev/hda4
    label=hda4
    read-only
    device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
    #device=hda:
    partition=4
    initrd=/boot/initrd.img


    ##ubuntu
    image=/boot/vmlinux
    root=/dev/hda3
    label=hda3
    read-only
    device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
    #device=hda:
    partition=3
    initrd=/boot/initrd.img

    ##fedora8
    image=/boot/vmlinuz-2.6.23.1-42.fc8
    root=/dev/hda7
    label=hda7
    read-only
    device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
    #device=hda:
    partition=7
    initrd=/boot/initrd-2.6.23.1-42.fc8.img


    ## works
    ##hda4=debian hda3=ubuntu hda7=fedora8

    I am aware I've wandered off topic. With the archiving of the original multi boot thread I may wait until I have some of the more difficult distro,s sorted and post a more concise report on my finding in the new apple forum.

  10. #10
    Join Date
    May 2005
    Beans
    498

    Re: PPC - Is ofboot still necessary?

    Well a little update on my progress. I feel this info will be of use to someone as every time I search for info I find this thread.

    I have reinstalled debian testing, ubuntu hardy, fedora 8 and yellowdog 6 and can now choose any one to boot by choosing the letter l (as in L) press tab and type in the partition label name. In my case I just labeled them after the partition number.

    so typing hda3 boots debian, had4 boots hardy, and fda7 boots fedora. pressing enter boots yellowdog ( hda8 )as that was the last distro I installed though obviously this can be changed.

    her is my yaboot.conf file for anyone interested in multibooting linuk distros on ppc

    # yaboot.conf generated by anaconda

    boot=/dev/hda2
    init-message=Welcome to YDL!\nHit <TAB> for boot options

    partition=8
    timeout=80
    install=/usr/lib/yaboot/yaboot
    delay=5
    enablecdboot
    enableofboot
    enablenetboot
    macosx=/dev/sda2
    magicboot=/usr/lib/yaboot/ofboot

    ##yellowdog6
    image=/boot/vmlinux-2.6.23-9.ydl6.1
    label=linux
    read-only
    initrd=/boot/initrd-2.6.23-9.ydl6.1.img
    append="rhgb quiet root=LABEL=/1"

    ## yaboot.conf generated by the Ubuntu installer
    ##
    ## run: "man yaboot.conf" for details. Do not make changes until you have!!
    ## see also: /usr/share/doc/yaboot/examples for example configurations.
    ##
    ## For a dual-boot menu, add one or more of:
    ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ
    enablecdboot
    enableofboot
    enablenetboot

    ##debian
    image=/boot/vmlinux
    root=/dev/hda4
    label=hda4
    read-only
    device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
    #device=hda:
    partition=4
    initrd=/boot/initrd.img


    ##ubuntu
    image=/boot/vmlinux
    root=/dev/hda3
    label=hda3
    read-only
    device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
    #device=hda:
    partition=3
    initrd=/boot/initrd.img

    ##fedora8
    image=/boot/vmlinuz-2.6.23.1-42.fc8
    root=/dev/hda7
    label=hda7
    read-only
    device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
    #device=hda:
    partition=7
    initrd=/boot/initrd-2.6.23.1-42.fc8.img


    ## works
    ##hda4=debian hda3=ubuntu hda7=fedora8

    I am aware I've wandered off topic. With the archiving of the original multi boot thread I may wait until I have some of the more difficult distro,s sorted and post a more concise report on my finding in the new apple forum.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •