[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New discussion: ppc64 installer -- ext2 /boot partition to keep yaboot happy.



Hi Frank!

On 10/19/2017 12:42 PM, Frank Scheiner wrote:
(snipping off the first part as I would like to comment the patches first)

Ok then, attached are two patches (one for d-i/partman-auto and one for d-i/grub-installer).

The patch for d-i/partman-auto increases the size of the NewWorld boot partition to 10 MB for all selections.

I just looked at your changes:

--- a/recipes-powerpc-powermac_newworld/atomic
+++ b/recipes-powerpc-powermac_newworld/atomic
@@ -1,6 +1,6 @@
 partman-auto/text/atomic_scheme ::
-1 1 1 hfs
+10 10001 10 hfs
        $bootable{ }
        method{ newworld } .

Looking at [1], shouldn't this just be "10 1 1"?
The code for d-i/grub-installer currently executes the `nw_select_offs_part` part but always selects
`/dev/sda2` as NewWorld boot partition afterwards as I don't yet know how this will behave with the
debconf templates in place. The main part for NewWorld Power Macs currently runs before `grub-ieee1275`
is installed in-target, as it was easier to concentrate things at this specific case clause, but this
can be reordered later.

We can't use it as-is, even for the test CD images, as hard-wiring the hard-drives can
lead to serious data loss. You have no guarantee at all that your primary disk will
be "sda", it's completely non-deterministic, unfortunately.

Anther thing I have noticed:

+       ;;
+    */powermac_newworld)
+       info "$ARCH selected."
+       #db_progress STEP 1
+       #db_progress INFO grub-installer/part_newworld
+       offs_part=$( nw_select_offs_part )
+       info "offs_part = $offs_part"

You should rather match "powerpc/powermac_newworld|ppc64/powermac_newworld" here.

Same here:

+    powerpc/*:grub-ieee1275|ppc64/*:grub-ieee1275)
+       #bootfs=$(findfs /boot/grub)
+       #disk=$(device_to_disk "$bootfs")
+       #db_set grub-installer/bootdev "$disk"
+       #state=2
+       bootdev="$bootfs"
+       state=3
+       ;;

and here:

+                   */powermac_newworld)
+                       grub_install_params="$grub_install_params --macppc-directory=/boot/grub"
+                       ;;

and here:

+                   */powermac_newworld:grub-ieee1275)
+                       info "Running $chroot $ROOT grub-install $grub_install_params"
+                       log-output -t grub-installer $chroot $ROOT grub-install $grub_install_params || CODE=$?
+                       ;;

This hunk is completely unnecessary and is purely formatting changes
(tabs vs. spaces, most likely):

-               # Should we force a copy of grub-efi to be installed
-               # to the removable media path too? Ask at low
-               # priority, or can also be pre-seeded of course
-               db_input low grub-installer/force-efi-extra-removable || [ $? -eq 30 ]
-               db_go || exit 10
-               db_get grub-installer/force-efi-extra-removable
-               if [ "$RET" = true ]; then
-                       grub_install_params="$grub_install_params --force-extra-removable"
-                       # Make sure this happens on upgrades too
-                       $chroot $ROOT 'debconf-set-selections' <<EOF
-$grub_package grub2/force_efi_extra_removable boolean true
-EOF
-               fi
+               case $grub_package in
+                   grub-efi*)
+                       # Should we force a copy of grub-efi to be installed
+                       # to the removable media path too? Ask at low
+                       # priority, or can also be pre-seeded of course
+                       db_input low grub-installer/force-efi-extra-removable || [ $? -eq 30 ]
+                       db_go || exit 10
+                       db_get grub-installer/force-efi-extra-removable
+                       if [ "$RET" = true ]; then
+                               grub_install_params="$grub_install_params --force-extra-removable"
+                               # Make sure this happens on upgrades too
+                               $chroot $ROOT 'debconf-set-selections' <<-EOF
+                                       $grub_package grub2/force_efi_extra_removable boolean true
+                               EOF
+                       fi
+                       ;;
+               esac

Please adjust your editor settings if necessary. Your patches should only contain actual functional changes.

Using this code during an expert installation with the ISO from 2017-10-10 and most likely also the latest
ISO on a PowerMac11,2 with a single SATA disk and selecting the GRUB installation instead of the yaboot
installation results in a working system that needs to be manually booted with `boot hd:2,BootX` as already
mentioned above. As the default kernel arguments from GRUB include "quiet", most of the kernel and systemd
messages are omitted during boot.

Ok, we're basically with the two issues you already mentioned, i.e. not being able to write
to NVRAM and not being able to find the proper install partition.

Can you revise your patches above, then we'll look into these two issues after I have built
new test installation images.

Adrian

 [1] https://anonscm.debian.org/cgit/d-i/partman-auto.git/tree/recipes-powerpc-prep/atomic

--
 .''`.  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


Reply to: