• Testers on PowerMac needed - overwriting the boot-device in NVRAM

    From John Paul Adrian Glaubitz@21:1/5 to All on Fri Mar 25 08:50:01 2022
    Hello!

    I would like to ask users running Debian on a real PowerMac machine (G3, G4, G5 etc)
    to help me verify a theory on the boot mechanism. In particular, the question is
    whether we can skip setting the boot-device in NVRAM in the grub-installer script
    which causes incompatibilities with the PowerMac emulation in QEMU [1].

    According to Apple's documentation [2], Open Firmware will automatically search for
    available operating systems, so there is no need to explicitly set the path to the boot device.

    To verify this, I set the boot device on my iBook G4 to NULL and checked whether the
    machine would still boot which turns out to be true. However, before I change the
    code in grub-installer, I want to make sure it won't break any other PowerMacs.

    So, if you would like to help, please try the following.

    As root, run:

    root@ibook-g4:~# nvram --print-config=boot-device /pci@f4000000/ata-6@d/@0:2,\\:txbi
    root@ibook-g4:~# nvram --update-config boot-device=""
    root@ibook-g4:~# nvram --print-config=boot-device
    root@ibook-g4:~# reboot

    If your machine still comes up after changing "boot-device" to zero, we know that
    it's safe to drop the NVRAM part from the grub-installer script for PowerMacs.

    This will fix the remaining compatibility with QEMU.

    Thanks,
    Adrian

    [1] https://lists.debian.org/debian-powerpc/2022/03/msg00029.html
    [2] https://opensource.apple.com/source/bless/bless-37/README.BOOTING

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Cameron MacPherson@21:1/5 to glaubitz@physik.fu-berlin.de on Fri Mar 25 09:50:01 2022
    hi,

    nvram --print-config='boot-device /pci@f4000000/ata-6@d/@0:2,\\:txbi'
    nvram --update-config boot-device=""
    nvram --print-config=boot-device
    reboot

    result is another login prompt

    On Fri, Mar 25, 2022, 12:44 AM John Paul Adrian Glaubitz < glaubitz@physik.fu-berlin.de> wrote:

    Hello!

    I would like to ask users running Debian on a real PowerMac machine (G3,
    G4, G5 etc)
    to help me verify a theory on the boot mechanism. In particular, the
    question is
    whether we can skip setting the boot-device in NVRAM in the grub-installer script
    which causes incompatibilities with the PowerMac emulation in QEMU [1].

    According to Apple's documentation [2], Open Firmware will automatically search for
    available operating systems, so there is no need to explicitly set the
    path to
    the boot device.

    To verify this, I set the boot device on my iBook G4 to NULL and checked whether the
    machine would still boot which turns out to be true. However, before I
    change the
    code in grub-installer, I want to make sure it won't break any other PowerMacs.

    So, if you would like to help, please try the following.

    As root, run:

    root@ibook-g4:~# nvram --print-config=boot-device /pci@f4000000/ata-6@d/@0:2,\\:txbi
    root@ibook-g4:~# nvram --update-config boot-device=""
    root@ibook-g4:~# nvram --print-config=boot-device
    root@ibook-g4:~# reboot

    If your machine still comes up after changing "boot-device" to zero, we
    know that
    it's safe to drop the NVRAM part from the grub-installer script for PowerMacs.

    This will fix the remaining compatibility with QEMU.

    Thanks,
    Adrian

    [1] https://lists.debian.org/debian-powerpc/2022/03/msg00029.html
    [2] https://opensource.apple.com/source/bless/bless-37/README.BOOTING

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913



    <div dir="auto"><div dir="auto"><div dir="auto"><div dir="auto">hi,</div><div dir="auto"><br></div><div dir="auto">nvram --print-config=&#39;boot-device /pci@f4000000/ata-6@d/@0:2,\\:txbi&#39;</div><div dir="auto">nvram --update-config boot-device=&quot;&
    quot;</div><div dir="auto">nvram --print-config=boot-device</div></div></div><div dir="auto">reboot</div><div dir="auto"><br></div><div dir="auto">result is another login prompt</div><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_
    attr">On Fri, Mar 25, 2022, 12:44 AM John Paul Adrian Glaubitz &lt;<a href="mailto:glaubitz@physik.fu-berlin.de" target="_blank" rel="noreferrer">glaubitz@physik.fu-berlin.de</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .
    8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>

    I would like to ask users running Debian on a real PowerMac machine (G3, G4, G5 etc)<br>
    to help me verify a theory on the boot mechanism. In particular, the question is<br>
    whether we can skip setting the boot-device in NVRAM in the grub-installer script<br>
    which causes incompatibilities with the PowerMac emulation in QEMU [1].<br>

    According to Apple&#39;s documentation [2], Open Firmware will automatically search for<br>
    available operating systems, so there is no need to explicitly set the path to<br>
    the boot device.<br>

    To verify this, I set the boot device on my iBook G4 to NULL and checked whether the<br>
    machine would still boot which turns out to be true. However, before I change the<br>
    code in grub-installer, I want to make sure it won&#39;t break any other PowerMacs.<br>

    So, if you would like to help, please try the following.<br>

    As root, run:<br>

    root@ibook-g4:~# nvram --print-config=boot-device<br> /pci@f4000000/ata-6@d/@0:2,\\:txbi<br>
    root@ibook-g4:~# nvram --update-config boot-device=&quot;&quot;<br> root@ibook-g4:~# nvram --print-config=boot-device<br>
    root@ibook-g4:~# reboot<br>

    If your machine still comes up after changing &quot;boot-device&quot; to zero, we know that<br>
    it&#39;s safe to drop the NVRAM part from the grub-installer script for PowerMacs.<br>

    This will fix the remaining compatibility with QEMU.<br>

    Thanks,<br>
    Adrian<br>

    &gt; [1] <a href="https://lists.debian.org/debian-powerpc/2022/03/msg00029.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.debian.org/debian-powerpc/2022/03/msg00029.html</a><br>
    &gt; [2] <a href="https://opensource.apple.com/source/bless/bless-37/README.BOOTING" rel="noreferrer noreferrer noreferrer" target="_blank">https://opensource.apple.com/source/bless/bless-37/README.BOOTING</a><br>

    -- <br>
     .&#39;&#39;`.  John Paul Adrian Glaubitz<br>
    : :&#39; :  Debian Developer - <a href="mailto:glaubitz@debian.org" rel="noreferrer noreferrer" target="_blank">glaubitz@debian.org</a><br>
    `. `&#39;   Freie Universitaet Berlin - <a href="mailto:glaubitz@physik.fu-berlin.de" rel="noreferrer noreferrer" target="_blank">glaubitz@physik.fu-berlin.de</a><br>
      `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913<br>

    </blockquote></div>
    </div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Cameron MacPherson on Fri Mar 25 09:50:01 2022
    Hello Cameron!

    On 3/25/22 09:40, Cameron MacPherson wrote:
    nvram --print-config='boot-device /pci@f4000000/ata-6@d/@0:2,\\:txbi'
    nvram --update-config boot-device=""
    nvram --print-config=boot-device
    reboot

    result is another login prompt

    On which machine exactly?

    And by "another login prompt" you mean the machine booted normally?

    Thanks,
    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to John Ogness on Fri Mar 25 10:00:01 2022
    Hello!

    On 3/25/22 09:56, John Ogness wrote:
    I suppose it would be better if someone did the test on a system where
    *only* Linux is installed, to make sure that OpenFirmware is able to
    find GRUB without boot-device being set.

    I have already tested that on my iBook G4 and it still boots fine into
    Linux with the boot-device set to NULL.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Ogness@21:1/5 to John Paul Adrian Glaubitz on Fri Mar 25 10:10:01 2022
    On 2022-03-25, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
    I would like to ask users running Debian on a real PowerMac machine
    (G3, G4, G5 etc) to help me verify a theory on the boot mechanism. In particular, the question is whether we can skip setting the
    boot-device in NVRAM in the grub-installer script which causes incompatibilities with the PowerMac emulation in QEMU [1].

    I have a Dual PowerMac G5 (PowerMac7,2), PPC970 revision 2.2 (pvr 0039
    0202).

    I have both MacOSX and Linux installed. After clearing the boot-device
    variable in NVRAM, the machine booted normally (into MacOSX).

    I suppose it would be better if someone did the test on a system where
    *only* Linux is installed, to make sure that OpenFirmware is able to
    find GRUB without boot-device being set.

    John Ogness

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julio Herrero@21:1/5 to All on Fri Mar 25 15:40:01 2022
    El vie, 25-03-2022 a las 08:43 +0100, John Paul Adrian Glaubitz
    escribió:
    Hello!

    I would like to ask users running Debian on a real PowerMac machine
    (G3, G4, G5 etc)
    to help me verify a theory on the boot mechanism. In particular, the
    question is
    whether we can skip setting the boot-device in NVRAM in the grub-
    installer script
    which causes incompatibilities with the PowerMac emulation in QEMU
    [1].

    According to Apple's documentation [2], Open Firmware will
    automatically search for
    available operating systems, so there is no need to explicitly set
    the path to
    the boot device.

    To verify this, I set the boot device on my iBook G4 to NULL and
    checked whether the
    machine would still boot which turns out to be true. However, before
    I change the
    code in grub-installer, I want to make sure it won't break any other PowerMacs.

    So, if you would like to help, please try the following.

    As root, run:

    root@ibook-g4:~# nvram --print-config=boot-device /pci@f4000000/ata-6@d/@0:2,\\:txbi
    root@ibook-g4:~# nvram --update-config boot-device=""
    root@ibook-g4:~# nvram --print-config=boot-device
    root@ibook-g4:~# reboot

    If your machine still comes up after changing "boot-device" to zero,
    we know that
    it's safe to drop the NVRAM part from the grub-installer script for PowerMacs.

    This will fix the remaining compatibility with QEMU.

    Thanks,
    Adrian

    Hi,

    Powerbook G4

    cpu : 7447/7457, altivec supported
    clock : 1249.999000MHz
    revision : 1.1 (pvr 8002 0101)
    bogomips : 60.23

    timebase : 18432000
    platform : PowerMac
    model : PowerBook5,2
    machine : PowerBook5,2
    motherboard : PowerBook5,2 MacRISC3 Power Macintosh
    detected as : 287 (PowerBook G4 15")
    pmac flags : 0000001a
    L2 cache : 512K unified
    pmac-generation : NewWorld
    Memory : 512 MB

    normal bootup after reboot.



    [1] https://lists.debian.org/debian-powerpc/2022/03/msg00029.html
    [2]
    https://opensource.apple.com/source/bless/bless-37/README.BOOTING


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Clarke@21:1/5 to John Paul Adrian Glaubitz on Sun Mar 27 23:00:01 2022
    On 3/25/22 03:43, John Paul Adrian Glaubitz wrote:
    Hello!

    I would like to ask users running Debian on a real PowerMac machine (G3, G4, G5 etc)
    to help me verify a theory on the boot mechanism.
    .
    .
    .
    As root, run:

    root@ibook-g4:~# nvram --print-config=boot-device /pci@f4000000/ata-6@d/@0:2,\\:txbi
    root@ibook-g4:~# nvram --update-config boot-device=""
    root@ibook-g4:~# nvram --print-config=boot-device
    root@ibook-g4:~# reboot

    If your machine still comes up after changing "boot-device" to zero, we know that
    it's safe to drop the NVRAM part from the grub-installer script for PowerMacs.

    From the "better late than never" department I have a PowerMac G5 "quad"
    which runs great. Or at least it once did :

    enceladus#
    enceladus# nvram --print-config
    "common" Partition
    ---------------------
    little-endian?=false
    real-mode?=false
    auto-boot?=true
    diag-switch?=false
    fcode-debug?=false
    oem-banner?=false
    oem-logo?=false
    use-nvramrc?=false
    use-generic?=false
    default-mac-address?=false
    scroll-lock=true
    skip-netboot?=false
    real-base=-1
    real-size=-1
    load-base=0x800000
    virt-base=-1
    virt-size=-1
    logger-base=-1
    logger-size=-1
    pci-probe-mask=-1
    screen-#columns=100
    screen-#rows=40
    selftest-#megs=0
    boot-volume=3
    gmt-offset=0 boot-device=/ht@0,f2000000/pci@9/k2-sata-root@c/@0/@0:2,\powerpc-ieee1275\core.elf
    boot-file=
    boot-screen=screen
    console-screen=screen
    diag-device=enet
    diag-file=,diags
    input-device=keyboard
    output-device=screen
    input-device-1=/ipc
    output-device-1=/ipc
    mouse-device=mouse
    oem-banner=
    oem-logo=
    nvramrc=
    boot-command=mac-boot
    default-client-ip=
    default-server-ip=
    default-gateway-ip=
    default-subnet-mask=
    default-router-ip=
    boot-script=
    aapl,pci=
    boot-args=
    aapl,tdm-units=
    ram-size=0x28000000
    boot-once=
    boot-last-label=Linux

    enceladus# cd
    enceladus# nvi nvram.dat
    enceladus#
    enceladus#
    enceladus#
    enceladus#
    enceladus# nvram --print-config=boot-device /ht@0,f2000000/pci@9/k2-sata-root@c/@0/@0:2,\powerpc-ieee1275\core.elf enceladus#
    enceladus# nvram --update-config boot-device=""
    enceladus#
    enceladus# nvram --print-config=boot-device
    enceladus#
    enceladus# reboot
    Connection to enceladus closed by remote host.
    Connection to enceladus closed.


    Then the machine DOES NOT boot.

    I see :


    Welcome to GRUB!

    error: symbol `grub_disk_native_sectors' not found.
    grub rescue>


    Then, of course, the fans being their full speed noises.

    So, any ideas on what to type at that prompt?


    --
    Dennis Clarke
    RISC-V/SPARC/PPC/ARM/CISC
    UNIX and Linux spoken
    GreyBeard and suspenders optional


    --
    Dennis Clarke
    RISC-V/SPARC/PPC/ARM/CISC
    UNIX and Linux spoken
    GreyBeard and suspenders optional

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to All on Sun Mar 27 23:10:01 2022
    On Mar 27, 2022, at 10:51 PM, Dennis Clarke <dclarke@blastwave.org> wrote:

    On 3/25/22 03:43, John Paul Adrian Glaubitz wrote:

    Then the machine DOES NOT boot.

    I see :


    Welcome to GRUB!

    error: symbol `grub_disk_native_sectors' not found.
    grub rescue>

    This change is unrelated to the change. It indicates a broken GRUB installation.

    Then, of course, the fans being their full speed noises.

    So, any ideas on what to type at that prompt?

    Try invoking the boot menu by holding down <Alt> and see if you can find an alternative working boot loader.

    If that doesn’t work, then my suspicion is that your installation is rather old and GRUB on this system was installed using the old hacky scripts.

    I don’t think the G5 behaves differently here than my G4.

    Adrian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Clarke@21:1/5 to John Paul Adrian Glaubitz on Sun Mar 27 23:30:01 2022
    On 3/27/22 17:07, John Paul Adrian Glaubitz wrote:


    On Mar 27, 2022, at 10:51 PM, Dennis Clarke <dclarke@blastwave.org> wrote: >>
    On 3/25/22 03:43, John Paul Adrian Glaubitz wrote:

    Then the machine DOES NOT boot.

    I see :


    Welcome to GRUB!

    error: symbol `grub_disk_native_sectors' not found.
    grub rescue>

    This change is unrelated to the change. It indicates a broken GRUB installation.


    No surprise at all.

    Then, of course, the fans being their full speed noises.

    So, any ideas on what to type at that prompt?

    Try invoking the boot menu by holding down <Alt> and see if you can find an alternative working boot loader.

    If that doesn’t work, then my suspicion is that your installation is rather old and GRUB on this system was installed using the old hacky scripts.

    I don’t think the G5 behaves differently here than my G4.

    I just fetched the most recent netinst image ( 2022-03-24 ) where I am
    guessing a full reinstall will be perfectly possible. I would rather
    find a way to repair the old hacky GRUB but sometimes a full reinstall
    is a "good thing"(tm).

    --
    Dennis Clarke
    RISC-V/SPARC/PPC/ARM/CISC
    UNIX and Linux spoken
    GreyBeard and suspenders optional

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)