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

Re: GRUB Error on 04-12 Images



On 4/15/19 10:49, John Paul Adrian Glaubitz wrote:
On 4/15/19 9:26 AM, Frank Scheiner wrote:
although this is already solved (with [1]), I wanted to notify you, that
the message I'm replying to, reached me (and possibly others) only after
your last message, though it was sent earlier.
I don't fully agree that the issue is resolved as the error handling is
broken in the script "mk-hfs-bootstrap.sh" as you can see from the
output from syslog:

Mk-hfs-bootstrap: the HFS bootstrap partition couldn't be found. Cannot continue! Exiting.
Main-menu: cat: can't open /var/lib/partman/devices/=dev=SDB/string of numbers/mountpoint: no such file or directory
WARNING**: Configuring grub-installer failed with error code 1

Not sure, I'd say it behaves correctly:

In [1] I showed that one manually cannot create an HFS bootstrap
partition that is "marked" correctly for `mk-hfs-bootstrap.sh` to accept
it for use. I.e. the mount point requirement cannot be met when creating
the partition manually. This makes `mk-hfs-bootstrap.sh` exit with `1`
(see [2]), which in turn should make `grub-installer` exit with `1` (see
[3]), which it actually did.

But it could be that the message starting with "Main-menu: [...]" is
stderr fallout from `mk-hfs-bootstrap.sh`, so I maybe should direct
stderr to `/dev/null` in the command substitutions in the if clause
starting at [4]. OTOH I wonder why this would be printed out after the
message from "mk-hfs-boostrap.sh" which comes later.

[1]: https://lists.debian.org/debian-powerpc/2019/04/msg00104.html

[2]:
https://salsa.debian.org/frank-scheiner-guest/grub-installer/blob/support-grub-installs-on-newworld-powermacs-with-hfs-bootstrap/mk-hfs-bootstrap.sh#L32

[3]:
https://salsa.debian.org/frank-scheiner-guest/grub-installer/blob/support-grub-installs-on-newworld-powermacs-with-hfs-bootstrap/grub-installer#L252

[4]:
https://salsa.debian.org/frank-scheiner-guest/grub-installer/blob/support-grub-installs-on-newworld-powermacs-with-hfs-bootstrap/mk-hfs-bootstrap.sh#L18

I assume that Noah typed that message instead of copying it (from the "string
of numbers"), but that that "=dev=SDB=" looks very suspicious unless it is
a copy-and-paste error. It definitely needs to be investigated.

I'd say it's a copy-and-paste error and should read "=dev=sdb" - also
because the identifier of the `mk-hfs-bootstrap.sh` output starts with a
capital letter in what Noah wrote, and that is not the case in the
source code.

I see two options:

* We either check that all requirements for the HFS bootstrap partition
are met during the partitioning step and provide a dialogue with the
requirements if not (like it was done for yaboot). Will only work for
automatic partitioning (which still allows later user changes!). You
already spoke about such an option.

* Or we remove the last requirement (designated mount point is
`/boot/grub`) as described on [1]. Will work both for automatic and
manual partitioning.

Cheers,
Frank


Reply to: