Discussion:
Grub failed
(too old to reply)
Jeroen Diederen
2023-11-23 11:50:01 UTC
Permalink
Hi all,

I tried an installation of Debian on a PowerBook G4. At the end,
installation of grub failed. I used the snapshot of June 18.
https://cdimage.debian.org/cdimage/ports/snapshots/2023-06-18/

I cannot attach the installation report as my previous mail with
attachment was blocked.

I saw that grub2 was upgraded a few weeks ago.

PS I now see there are two more recent images.

Regards,
Jeroen Diederen


Nov 23 09:44:44 in-target: Get:1 http://deb.debian.org/debian-ports
sid/main powerpc grub2-common powerpc 2.12~rc1-12 [962 kB]
Nov 23 09:44:44 in-target: Get:2 http://deb.debian.org/debian-ports
sid/main powerpc libparted2 powerpc 3.6-3 [316 kB]
Nov 23 09:44:44 in-target: Get:3 http://deb.debian.org/debian-ports
sid/main powerpc grub-ieee1275-bin powerpc 2.12~rc1-12 [877 kB]
Nov 23 09:44:44 in-target: Get:4 http://deb.debian.org/debian-ports
sid/main powerpc grub-ieee1275 powerpc 2.12~rc1-12 [339 kB]
Nov 23 09:44:44 in-target: Get:5 cdrom://[Debian GNU/Linux 12.0.0 _Sid_
- Unofficial powerpc NETINST 20230618-15:59] sid/main powerpc ucf all
3.0043+nmu1 [55.2 kB]
Nov 23 09:44:46 in-target: Preconfiguring packages ...
Nov 23 09:44:46 in-target: Fetched 2,494 kB in 1s (4,024 kB/s)
Nov 23 09:44:47 in-target: Selecting previously unselected package ucf.
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 5%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 10%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 15%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 20%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 25%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 30%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 35%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 40%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 45%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 50%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 55%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 60%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 65%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 70%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 75%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 80%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 85%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 90%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 95%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 100%
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: (Reading database ...
Nov 23 09:44:47 in-target: 20747 files and directories currently
installed.)
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: Preparing to unpack
.../u/ucf/ucf_3.0043+nmu1_all.deb ...
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: Moving old data out of the way
Nov 23 09:44:47 in-target: ^M
Nov 23 09:44:47 in-target: Unpacking ucf (3.0043+nmu1) ...^M
Nov 23 09:44:48 in-target: Selecting previously unselected package
grub2-common.
Nov 23 09:44:48 in-target: ^M
Nov 23 09:44:48 in-target: Preparing to unpack
.../grub2-common_2.12~rc1-12_powerpc.deb ...
Nov 23 09:44:48 in-target: ^M
Nov 23 09:44:48 in-target: Unpacking grub2-common (2.12~rc1-12) ...^M
Nov 23 09:44:48 in-target: Selecting previously unselected package
libparted2:powerpc.
Nov 23 09:44:48 in-target: ^M
Nov 23 09:44:48 in-target: Preparing to unpack
.../libparted2_3.6-3_powerpc.deb ...
Nov 23 09:44:48 in-target: ^M
Nov 23 09:44:49 in-target: Unpacking libparted2:powerpc (3.6-3) ...^M
Nov 23 09:44:49 in-target: Selecting previously unselected package
grub-ieee1275-bin.
Nov 23 09:44:49 in-target: ^M
Nov 23 09:44:49 in-target: Preparing to unpack
.../grub-ieee1275-bin_2.12~rc1-12_powerpc.deb ...
Nov 23 09:44:49 in-target: ^M
Nov 23 09:44:49 in-target: Unpacking grub-ieee1275-bin (2.12~rc1-12)
...^M
Nov 23 09:44:50 in-target: Selecting previously unselected package
grub-ieee1275.
Nov 23 09:44:50 in-target: ^M
Nov 23 09:44:50 in-target: Preparing to unpack
.../grub-ieee1275_2.12~rc1-12_powerpc.deb ...
Nov 23 09:44:50 in-target: ^M
Nov 23 09:44:50 in-target: Unpacking grub-ieee1275 (2.12~rc1-12) ...^M
Nov 23 09:44:51 in-target: Setting up grub2-common (2.12~rc1-12) ...
Nov 23 09:44:51 in-target: ^M
Nov 23 09:44:51 in-target: Setting up ucf (3.0043+nmu1) ...^M
Nov 23 09:44:52 in-target: Setting up libparted2:powerpc (3.6-3) ...^M
Nov 23 09:44:53 in-target: Setting up grub-ieee1275-bin (2.12~rc1-12)
...^M
Nov 23 09:44:53 in-target: Setting up grub-ieee1275 (2.12~rc1-12) ...^M
Nov 23 09:44:54 in-target: ^M
Nov 23 09:44:54 in-target: Creating config file /etc/default/grub with
new version^M
Nov 23 09:44:56 in-target: Installing for powerpc-ieee1275 platform.^M
Nov 23 09:44:59 in-target: Installation finished. No error reported.^M
Nov 23 09:44:59 in-target: Processing triggers for libc-bin (2.37-12)
...
Nov 23 09:44:59 in-target: ^M
Nov 23 09:45:02 /bin/in-target: warning: /target/etc/mtab won't be
updated since it is a symlink.
Nov 23 09:45:03 in-target: Reading package lists...
Nov 23 09:45:03 in-target:
Nov 23 09:45:03 in-target: Building dependency tree...
Nov 23 09:45:04 in-target:
Nov 23 09:45:04 in-target: Reading state information...
Nov 23 09:45:04 in-target:
Nov 23 09:45:06 in-target: grub-common is already the newest version
(2.12~rc1-12).
Nov 23 09:45:06 in-target: 0 upgraded, 0 newly installed, 0 to remove
and 0 not upgraded.
Nov 23 09:45:07 grub-installer: info: Installing grub on '/dev/sda2'
Nov 23 09:45:07 grub-installer: info: grub-install does not support
--no-floppy
Nov 23 09:45:07 grub-installer: info: Running chroot /target
grub-install --macppc-directory=/boot/grub --no-nvram --force
Nov 23 09:45:07 grub-installer: Installing for powerpc-ieee1275
platform.
Nov 23 09:45:09 grub-installer: Installation finished. No error
reported.
Nov 23 09:45:09 grub-installer: info: grub-install ran successfully
Nov 23 09:45:09 main-menu[251]: (process:8046): dpkg-divert: warning:
diverting file '/sbin/start-stop-daemon' from an Essential package with
rename is dangerous, use --no-rena
Nov 23 09:45:09 main-menu[251]: (process:8046): me
Nov 23 09:45:09 main-menu[251]: (process:8046): dpkg-divert: warning:
diverting file '/sbin/start-stop-daemon' from an Essential package with
rename is dangerous, use --no-rena
Nov 23 09:45:09 main-menu[251]: (process:8046): me
Nov 23 09:45:09 main-menu[251]: (process:8046): dpkg-divert: warning:
diverting file '/sbin/start-stop-daemon' from an Essential package with
rename is dangerous, use --no-rena
Nov 23 09:45:09 main-menu[251]: (process:8046): me
Nov 23 09:45:09 main-menu[251]: (process:8046): File descriptor 3
(pipe:[10121]) leaked on lvdisplay invocation.
Nov 23 09:45:09 main-menu[251]: (process:8046): Parent PID 8436:
/bin/sh
Nov 23 09:45:09 main-menu[251]: (process:8046): File descriptor 4
(/dev/pts/0) leaked on lvdisplay invocation.
Nov 23 09:45:09 main-menu[251]: (process:8046): Parent PID 8436:
/bin/sh
Nov 23 09:45:09 main-menu[251]: (process:8046): File descriptor 5
(/dev/pts/0) leaked on lvdisplay invocation.
Nov 23 09:45:09 main-menu[251]: (process:8046): Parent PID 8436:
/bin/sh
Nov 23 09:45:09 main-menu[251]: (process:8046): File descriptor 6
(/dev/pts/0) leaked on lvdisplay invocation.
Nov 23 09:45:09 main-menu[251]: (process:8046): Parent PID 8436:
/bin/sh
Nov 23 09:45:09 main-menu[251]: (process:8046):
Nov 23 09:45:09 main-menu[251]: (process:8046): Volume group "sda" not
found
Nov 23 09:45:09 main-menu[251]: (process:8046):
Nov 23 09:45:09 main-menu[251]: (process:8046):
Nov 23 09:45:09 main-menu[251]: (process:8046): Cannot process volume
group sda
Nov 23 09:45:09 main-menu[251]: (process:8046):
Nov 23 09:45:09 main-menu[251]: (process:8046): dpkg-divert: warning:
diverting file '/sbin/start-stop-daemon' from an Essential package with
rename is dangerous, use --no-rena
Nov 23 09:45:09 main-menu[251]: (process:8046): me
Nov 23 09:45:09 main-menu[251]: (process:8046): dpkg-divert: warning:
diverting file '/sbin/start-stop-daemon' from an Essential package with
rename is dangerous, use --no-rena
Nov 23 09:45:09 main-menu[251]: (process:8046): me
Nov 23 09:45:09 main-menu[251]: (process:8046): dpkg-divert: warning:
diverting file '/sbin/start-stop-daemon' from an Essential package with
rename is dangerous, use --no-rena
Nov 23 09:45:09 main-menu[251]: (process:8046): me
Nov 23 09:45:09 main-menu[251]: (process:8046): chroot: can't execute
'hmount': No such file or directory
Nov 23 09:45:09 main-menu[251]: WARNING **: Configuring 'grub-installer'
failed with error code 127
Nov 23 09:45:09 main-menu[251]: WARNING **: Menu item 'grub-installer'
failed.
Nov 23 09:46:10 main-menu[251]: INFO: Modifying debconf priority limit
from 'high' to 'medium'
Nov 23 09:46:10 debconf: Setting debconf/priority to medium
Nov 23 09:46:11 main-menu[251]: DEBUG: resolver (libatomic1): package
doesn't exist (ignored)
Nov 23 09:46:11 main-menu[251]: INFO: Falling back to the package
description for brltty-udeb
Nov 23 09:46:11 depthcharge-tools-installer: Not installing to
non-ChromeOS board.
Nov 23 09:46:11 depthcharge-tools-installer: Not installing to
non-ChromeOS board.
Nov 23 09:46:20 main-menu[251]: INFO: Falling back to the package
description for brltty-udeb
Nov 23 09:46:20 main-menu[251]: INFO: Menu item 'save-logs' selected
John Paul Adrian Glaubitz
2023-11-23 12:20:01 UTC
Permalink
Nov 23 09:45:09 main-menu[251]: (process:8046): chroot: can't execute 'hmount': No such file or directory
The chroot is missing hfsutils which is why “hmount” fails.

Could be that someone dropped it from the packages list not knowing what they are doing.

Adrian
Jeroen Diederen
2023-11-24 04:00:01 UTC
Permalink
Good morning Adrian,

# chroot /target
# dpkg -l hfsutils
dpkg-query: no packages found matching hfsutils

regards,
Jeroen
Post by John Paul Adrian Glaubitz
Nov 23 09:45:09 main-menu[251]: (process:8046): chroot: can't execute 'hmount': No such file or directory
The chroot is missing hfsutils which is why “hmount” fails.
Could be that someone dropped it from the packages list not knowing what they are doing.
Can you please check whether the package "hfsutils" was installed into
the chroot?
# chroot /target
# dpkg -l hfsutils
Adrian
Jeroen Diederen
2023-11-25 19:20:01 UTC
Permalink
That is strange indeed. Has anything else changed?
I will have to look up again where hfsutils needs to be added to the
package lists. I think, it was part of debian-cd.
https://salsa.debian.org/images-team/debian-cd/-/blob/master/tools/generate_di%2Bk_list#L293
https://salsa.debian.org/images-team/debian-cd/-/blob/master/tools/generate_di%2Bk_list#L306
So, not sure why it shouldn't get installed automatically.
Adrian
Jeroen Diederen
2023-11-25 19:50:01 UTC
Permalink
Another thing I noticed in the log I sent but also when going into a
terminal from the installer menu is that /dev/sda can’t be found after
the grub-install step.
I will have to look up again where hfsutils needs to be added to the
package lists. I think, it was part of debian-cd.
https://salsa.debian.org/images-team/debian-cd/-/blob/master/tools/generate_di%2Bk_list#L293
https://salsa.debian.org/images-team/debian-cd/-/blob/master/tools/generate_di%2Bk_list#L306
So, not sure why it shouldn't get installed automatically.
Adrian
Jeroen Diederen
2023-11-25 20:00:01 UTC
Permalink
With the same image I have installed Debian successfully many times,
both powerpc and ppc64. Can’t it have something to do with a change in
grub-ieee1275 lately?
Post by Jeroen Diederen
Another thing I noticed in the log I sent but also when going into a
terminal from the installer menu is that /dev/sda can’t be found after
the grub-install step.
You might have taken an image which is missing the hfsprogs and
partman-hfs
packages. As mentioned on this list before, there is no 100% robust
image
build for PowerMac due to the complicated licensing situation of
Apple's
»hfs« package.
I have tried to convince Apple to switch the license to something
DFSG-compatible
but I never got an answer.
Adrian
Jeroen Diederen
2023-11-26 00:30:01 UTC
Permalink
I know that but can’t it be that the grub installation into /boot/grub
with geub-ieee1275 somehow makes the system lose the ability to see
/dev/sda and therefore also unable to invoke hmount?
Post by Jeroen Diederen
With the same image I have installed Debian successfully many times,
both powerpc and ppc64. Can’t it have something to do with a change in
grub-ieee1275 lately?
No, hfsutils is completely independent of grub-ieee1275 as the »hmount«
utility is invoked after grub-install has been run and GRUB was
installed
into /boot/.
Adrian
Jeroen Diederen
2023-11-26 00:30:01 UTC
Permalink
I know that but can’t it be that the grub installation into /boot/grub
with grub-ieee1275 somehow makes the system lose the ability to see
/dev/sda and therefore also unable to invoke hmount?
Post by Jeroen Diederen
With the same image I have installed Debian successfully many times,
both powerpc and ppc64. Can’t it have something to do with a change in
grub-ieee1275 lately?
No, hfsutils is completely independent of grub-ieee1275 as the »hmount«
utility is invoked after grub-install has been run and GRUB was
installed
into /boot/.
Adrian
Jeroen Diederen
2023-11-26 01:00:01 UTC
Permalink
Another thing that I now remember is that on one ppc64 machine
after upgrading grub-ieee1275, I had to do a fsck.hfs, as it somehow
screw up the bootstrap partition. My feeling is that the problem resides
in grub-ieee1275, which got an upgrade on November 9 (changelog grub2)
and was built by buildd in November 10.

https://lists.debian.org/debian-powerpc/2023/11/msg00004.html
Post by Jeroen Diederen
With the same image I have installed Debian successfully many times,
both powerpc and ppc64. Can’t it have something to do with a change in
grub-ieee1275 lately?
No, hfsutils is completely independent of grub-ieee1275 as the »hmount«
utility is invoked after grub-install has been run and GRUB was
installed
into /boot/.
Adrian
Jeroen Diederen
2023-11-27 09:00:01 UTC
Permalink
Adrian,

How are we going to solve the grub installation problem within
debian-installer then?

Jeroen
Post by Jeroen Diederen
Another thing that I now remember is that on one ppc64 machine
after upgrading grub-ieee1275, I had to do a fsck.hfs, as it somehow
screw up the bootstrap partition. My feeling is that the problem resides
in grub-ieee1275, which got an upgrade on November 9 (changelog grub2)
and was built by buildd in November 10.
All that grub-install does is copying files into the directory
/boot/grub,
it makes zero modifications to the filesystem itself or the block
device.
It doesn't even modify the NVRAM because it's called with "--no-nvram"
[1].
The HFS filesystem corruption is most likely a result of the outdated
hfsprogs
package which has some issues on big-endian systems as I discovered
while working
on the hfsprogs source code. This will be resolved once I finally
update that
package.
Adrian
Post by Jeroen Diederen
[1]
https://salsa.debian.org/installer-team/grub-installer/-/blob/master/grub-installer#L1000
Jeroen Diederen
2023-11-27 12:50:01 UTC
Permalink
Hi,

I always do it like this. Download this image:
https://cdimage.debian.org/cdimage/ports/snapshots/2023-06-18/debian-12.0.0-powerpc-NETINST-1.iso

Create a 10G qcow2 disk image debian12.qcow2 then:

qemu-system-ppc \
-L pc-bios \
-boot d \
-M mac99 \
-m 2048 \
-prom-env 'auto-boot?=true' \
-prom-env 'boot-args=-v' \
-drive file=debian-12.0.0-powerpc-NETINST-1.iso,format=raw,media=cdrom
\
-drive file=debian12.qcow2,format=qcow2,media=disk \
-net nic,model=sungem \
-net user

It will work, I did it many times before.
Jeroen
Hello!
Post by Jeroen Diederen
How are we going to solve the grub installation problem within
debian-installer then?
I will have to verify the issue myself. I did a quick test with
qemu-ppc
but the kernel didn't boot for me. I will try on my iBook G4 later this
week and commit a fix if there is a bug.
Adrian
Jeroen Diederen
2023-11-27 13:10:01 UTC
Permalink
You have to be patient, it will take at least a minute.
Hello!
Post by Jeroen Diederen
qemu-system-ppc \
-L pc-bios \
-boot d \
-M mac99 \
-m 2048 \
-prom-env 'auto-boot?=true' \
-prom-env 'boot-args=-v' \
-drive
file=debian-12.0.0-powerpc-NETINST-1.iso,format=raw,media=cdrom
\
-drive file=debian12.qcow2,format=qcow2,media=disk \
-net nic,model=sungem \
-net user
That's what I am using. However, it stops at "Booting Linux via
__start()".
Post by Jeroen Diederen
It will work, I did it many times before.
It did work for me in the past as well. But not anymore, it seems.
Might be a regression with QEMU 8.x.
Adrian
Jeroen Diederen
2023-11-28 17:20:01 UTC
Permalink
Hi Adrian,

Good news! Hopefully you can now have a look at the faulty grub
installation within d-i.

Jeroen
Post by Jeroen Diederen
You have to be patient, it will take at least a minute.
Nope, even after five minutes nothing. I assume a regression in QEMU.
FWIW, older images such as [1] boot fine. Most likely an issue with the
kernel in the latest image.
Adrian
[1]
https://cdimage.debian.org/cdimage/ports/snapshots/2022-03-24/debian-11.0.0-powerpc-NETINST-1.iso
Jeroen Diederen
2023-11-29 00:50:01 UTC
Permalink
Hi Adrian.

The strange thing is that I performed many successful installations with
the same image of June 8 2023 [1] before, so I don't understand why it
is no longer working. That is one thing.

I used the default settings. I let the partitioner do automatic
partitioning using the whole disk. I can confirm that the said image
does not work anymore on a PowerBook G4 and also not in qemu.

I will try the image you used and report back the results.

Best regards,
Jeroen

[1] https://cdimage.debian.org/cdimage/ports/snapshots/2023-06-18/
Hi Jeroen!
Post by Jeroen Diederen
Good news! Hopefully you can now have a look at the faulty grub
installation within d-i.
I can confirm that the image from [1] works for me and installed without any issues.
Either you picked on of the images which are missing the hfsprogs and partman-hfs
packages or there is something wrong with your environment.
Did you install using default settings or did you change the partition layout by any chance?
Adrian
Post by Jeroen Diederen
[1] https://cdimage.debian.org/cdimage/ports/snapshots/2022-03-24/debian-11.0.0-powerpc-NETINST-1.iso
Jeroen Diederen
2023-11-29 02:10:01 UTC
Permalink
Hi Adrian,

I just tried an installation in QEMU with the same image [1] that you
used,

Apt setup for deb.debian.org/debian-ports failed because the key expired
(B523E5F3FC4E5F2C).
Grub installation failed for the same reason, hmount was not found, i.e.
hfsutils was not present in the chroot.

Best regards,
Jeroen
Hi Jeroen!
Post by Jeroen Diederen
Good news! Hopefully you can now have a look at the faulty grub
installation within d-i.
I can confirm that the image from [1] works for me and installed
without any issues.
Either you picked on of the images which are missing the hfsprogs and
partman-hfs
packages or there is something wrong with your environment.
Did you install using default settings or did you change the partition
layout by any chance?
Adrian
Post by Jeroen Diederen
[1]
https://cdimage.debian.org/cdimage/ports/snapshots/2022-03-24/debian-11.0.0-powerpc-NETINST-1.iso
Jeroen Diederen
2023-11-27 13:10:01 UTC
Permalink
Hi Adrian,

By the way, I am on qemu 6.2 (Ubuntu)
https://launchpad.net/ubuntu/+source/qemu/1:6.2+dfsg-2ubuntu6.15

Regards
Jeroen
Hello!
Post by Jeroen Diederen
qemu-system-ppc \
-L pc-bios \
-boot d \
-M mac99 \
-m 2048 \
-prom-env 'auto-boot?=true' \
-prom-env 'boot-args=-v' \
-drive
file=debian-12.0.0-powerpc-NETINST-1.iso,format=raw,media=cdrom
\
-drive file=debian12.qcow2,format=qcow2,media=disk \
-net nic,model=sungem \
-net user
That's what I am using. However, it stops at "Booting Linux via
__start()".
Post by Jeroen Diederen
It will work, I did it many times before.
It did work for me in the past as well. But not anymore, it seems.
Might be a regression with QEMU 8.x.
Adrian
Loading...