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

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



On 10/09/2017 11:05 AM, Frank Scheiner wrote:
On 10/09/2017 02:26 AM, John Paul Adrian Glaubitz wrote:
I'm sorry if I am being a bit harsh here now, but I feel like I'm tilting
at windmills here. It's starting to become frustrating.

Don't worry, I think we all have the same goal, but you have a knowledge lead
we have to catch up a little to get to a common understanding, I think. :D

Well, I had to read through the code of debian-installer as well and it also
took me some time before I fully understood how everything works internally.

There was also some trial-and-error involved for me which is absolutely ok.

E.g. for the grub-installer it was never clear - at least to me - what exactly
didn't work on NewWorld Power Macs.

Since Debian never officially enabled GRUB on powerpc, much less in ppc64 which
was never a release architecture to beging with, it's safe to assume that
nothing really works. And as you might know now already, grub-installer is a
simple bash script which everyone can read and understand what the script
does for other architectures and what's currently missing for powerpc/ppc64.

You have already successfully installed GRUB on your NewWorld Macs and you
also wrote down the procedure step by step. So, I think it's obvious that
the next step will be to implement your procedure in the grub-installer
script.

As it did work well for you on POWER7, there was a good chance that it
might work to some degree on the Power Macs, too.

It did work for me on POWER7 after I made the necessary changes for
POWER7. I haven't performed any tests on NewWorld Macs yet, hence
I did not write any code for those machines in grub-installer and
I was hoping for suggestions from your side as you already did very
extensive testing on your NewWorld Macs.

So although everything I wrote seemed to be pretty obvious to you and
possibly a repetition of what you already knew, it was "surprising" to
me and partly also for Rick, I think.

I don't think it's surprising given the fact that NewWorld Macs and my
POWER7 machines use a different boot mechanism for GRUB, is it?

I believe it's good to have this written down though, so we now know
where things need to be fixed or better created from scratch.

I'm not arguing that and I am very thankful for your detailed documentation
of the procedure. I could probably already use this information to implement
the actual code. But since I cannot test it directly myself, I need you
to do that.

`partman-newworld` and `partman-prep` packages should also be added to the
installer ISO, as these allow to choose "NewWorld boot partition" and the
respective value for PReP in the "How to use this partition" screen of the
"Partition disks" step. Some of the `partman-newworld` functionality is also
used in `yaboot-installer` (see [1], it allows `yaboot-installer` to skip the
user confirmation for the selected/detected NewWorld boot partition IIUC),
which could be reused for `grub-installer` to correctly detect the NewWorld
boot partition.

Thank you. This is the sort of input I was hoping for :).

[1]: https://anonscm.debian.org/cgit/d-i/yaboot-installer.git/tree/debian/postinst?id=94cd300c98904d8c308d996239719df4b0c59d6f#n97

They're both on the Debian Jessie 8.9 netinst installer ISO.

Ok, then you're obviously right. I assume the lack of the partman-prep
package explains the non-working PREP partition from my POWER7 tests.

If it's only the "ppc64" arch that is missing, the following patches could make this work.

partman-newworld
```
diff --git a/check.d/newworld b/check.d/newworld
index 4a81745..0afcdf3 100755
--- a/check.d/newworld
+++ b/check.d/newworld
@@ -6,6 +6,8 @@ ARCH="$(archdetect)"
  case $ARCH in
      powerpc/powermac_newworld)
         ;;
+    ppc64/powermac_newworld)
+       ;;
      *)
         exit 0
         ;;
diff --git a/debian/control b/debian/control
index c20c1c0..9b2108b 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Vcs-Git: https://anonscm.debian.org/git/d-i/partman-newworld.git

  Package: partman-newworld
  Package-Type: udeb
-Architecture: powerpc
+Architecture: powerpc ppc64
  XB-Subarchitecture: powermac_newworld
  Depends: ${misc:Depends}, partman-base (>= 114), hfs-modules
  Description: partman support for new-world PowerMac boot partitions
```

partman-prep
```
diff --git a/debian/control b/debian/control
index a6c89ec..6f740b6 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Vcs-Git: https://anonscm.debian.org/git/d-i/partman-prep.git

  Package: partman-prep
  Package-Type: udeb
-Architecture: powerpc ppc64el
+Architecture: powerpc ppc64el ppc64
  XB-Subarchitecture: chrp_ibm chrp_rs6k prep
  Depends: ${misc:Depends}, partman-base (>= 114)
  Description: Add partman support for PPC PReP boot partitions
```

Yep, that's about right. I will implement that later today. Thanks for pointing
me at that.

IMHO it would also make sense to make `hfsutils` a dependency of `partman-newworld`,
but as there's no `hfsutils` udeb available, it won't work that way, right?

Correct. We have to install hfsutils later after the initial system has been
bootstrapped into /target. Remember that packages like grub-ieee1275 are also
only installed after the base system has been installed.

Be we could add code to `debian/postinst` for `partman-newworld` to install
`hfsutils` (as DEB package to the target root FS) just like yaboot does it
in [2] - as I found out yesterday evening.

My plan was to do that in grub-installer, simply because Yaboot also does
it in yaboot-installer and not in partman-newworld.

Either way, thanks for the hints at partman-prep and partman-newworld.
Although I have seen those packages before, it did not cross my mind that
we might actually need them.

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


Reply to: