[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 Adrian, Rick,

On 10/06/2017 12:08 PM, John Paul Adrian Glaubitz wrote:
As you hinted, it can’t mount /boot/grub until after it has been formatted as HFS (currently by yaboot install)  Is there a chicken/egg problem here?  You can’t install grub without installing yaboot first, so it’s not possible to
install without yaboot…  So we can’t actually get rid of yaboot at all?

I'm not sure what makes you think that the mechanism to format HFS filesystems is inherently part of Yaboot but that's definitely not the case. Yaboot's installer script itself doesn't create the HFS filesystem, it relies on hfsutils for that
which can be used independently of Yaboot, of course.

I today tried the installation of Debian Sid on my Power Mac G5 (11,2) with the latest installer image ([1] from today 12:56h) and I saw that the HFS partition is not formatted when using GRUB as boot loader.

[1]: https://cdimage.debian.org/cdimage/ports/debian-9.0-ppc64-NETINST-1.iso

I think this is because only when yaboot is chosen as boot loader, the `hfsutils` package is actually installed:

```
[...]
Oct  8 14:27:35 in-target: yaboot is already the newest version (1.3.17-4).
Oct  8 14:27:35 in-target: Suggested packages:
Oct  8 14:27:35 in-target:   hfsutils-tcltk
Oct  8 14:27:35 in-target: The following NEW packages will be installed:
Oct  8 14:27:35 in-target:   hfsutils
Oct 8 14:27:35 in-target: 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Oct  8 14:27:35 in-target: Need to get 71.2 kB of archives.
Oct 8 14:27:35 in-target: After this operation, 2,875 kB of additional disk space will be used. Oct 8 14:27:35 in-target: Get:1 http://ftp.ports.debian.org/debian-ports sid/main ppc64 hfsutils ppc64 3.2.6-13+b1 [71.2 kB]
Oct  8 14:27:36 in-target: Fetched 71.2 kB in 0s (260 kB/s)
Oct  8 14:27:37 in-target: Selecting previously unselected package hfsutils.
[...]
Oct 8 14:38:06 yaboot-installer: mkofboot: Finding OpenFirmware device path to `/dev/sda2'... Oct 8 14:38:06 yaboot-installer: mkofboot: Creating HFS filesystem on /dev/sda2...
[...]
```

With GRUB selected (note the time stamps, this actually happened earlier than the yaboot installation, so the `hfsutils` package wasn't already installed at this time but is really no dependency of Grub!):
```
Oct  8 13:28:18 main-menu[4594]: INFO: Menu item 'grub-installer' selected
Oct  8 13:28:18 grub-installer: info: architecture: ppc64/powermac_newworld
Oct  8 13:28:19 in-target: Reading package lists...
Oct  8 13:28:19 in-target:
Oct  8 13:28:19 in-target: Building dependency tree...
Oct  8 13:28:20 in-target:
Oct  8 13:28:20 in-target: Reading state information...
Oct  8 13:28:20 in-target:
Oct 8 13:28:21 in-target: The following additional packages will be installed:
Oct  8 13:28:21 in-target:   libfreetype6 libfuse2 libpng16-16 os-prober
Oct  8 13:28:21 in-target: Suggested packages:
Oct  8 13:28:21 in-target:   multiboot-doc xorriso desktop-base fuse
Oct  8 13:28:21 in-target: The following NEW packages will be installed:
Oct 8 13:28:21 in-target: grub-common libfreetype6 libfuse2 libpng16-16 os-prober Oct 8 13:28:25 in-target: 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Oct  8 13:28:25 in-target: Need to get 0 B/3,287 kB of archives.
Oct 8 13:28:25 in-target: After this operation, 21.6 MB of additional disk space will be used. Oct 8 13:28:25 in-target: Get:1 cdrom://[Debian GNU/Linux 9.0 _Sid_ - Unofficial ppc64 NETINST 20171008-10:46] sid/main ppc64 libpng16-16 ppc64 1.6.34-1 [285 kB] Oct 8 13:28:26 in-target: Get:2 cdrom://[Debian GNU/Linux 9.0 _Sid_ - Unofficial ppc64 NETINST 20171008-10:46] sid/main ppc64 libfreetype6 ppc64 2.8-0.2 [421 kB] Oct 8 13:28:26 in-target: Get:3 cdrom://[Debian GNU/Linux 9.0 _Sid_ - Unofficial ppc64 NETINST 20171008-10:46] sid/main ppc64 libfuse2 ppc64 2.9.7-1 [120 kB] Oct 8 13:28:27 in-target: Get:4 cdrom://[Debian GNU/Linux 9.0 _Sid_ - Unofficial ppc64 NETINST 20171008-10:46] sid/main ppc64 grub-common ppc64 2.02-2 [2,434 kB] Oct 8 13:28:29 in-target: Get:5 cdrom://[Debian GNU/Linux 9.0 _Sid_ - Unofficial ppc64 NETINST 20171008-10:46] sid/main ppc64 os-prober ppc64 1.76 [26.2 kB] Oct 8 13:28:30 in-target: Selecting previously unselected package libpng16-16:ppc64.
```

I don't know, why the HFS partition is not formatted at the end of the partitioning step, which would IMHO make more sense.

I also saw the following message during GRUB installation:
```
It seems that this computer is configured to boot via EFI, but maybe that configuration will not work for booting from the hard drive. Some EFI firmware implementations do not meet the EFI specification (i.e. they are buggy!) and do not support proper configuration of boot options from system hard drives.

A workaround for this problem is to install an extra copy of the EFI version of the GRUB boot loader to a fallback location, the "removable media path". Almost all EFI systems, no matter how buggy, will boot GRUB that way.

Warning: If the installer failed to detect another operating system that is present on your computer that also depends on this fallback, installing GRUB there will make that operating system temporarily unbootable. GRUB can be manually configured later to boot it if necessary.

Force GRUB installation to the EFI removable media path?

<Go Back>     <Yes>    <No>
```

I always used the "No" option.

As Rick also mentioned, 8 MB - as proposed by me - seems to be too small for a default installation of GRUB - although it seemed to be just big enough for all installed files in an earlier try today, but only a few KiB were left. Hence we should maybe use more in any case. The question is, how this should work on IBM machines with PReP partition and the 8 MB limit?

So I modified `/lib/partman/recipes-ppc64-powermac_newworld/30atomic` to use 10 MB as minimum size:
```
$ diff -u 30atomic 30atomic-new
--- 30atomic	2017-10-08 17:51:42.931719980 +0200
+++ 30atomic-new	2017-10-08 17:51:36.799720113 +0200
@@ -1,6 +1,6 @@
 partman-auto/text/atomic_scheme ::

-1 1 1 hfs
+10 10000 10 hfs
 	$bootable{ }
 	method{ newworld } .

```
...and restarted from the "Partition disks" step. Then first installed yaboot as boot loader, to get the `/dev/sda2` partition formatted with HFS, then mounted `/dev/sda2` to `/target/boot/grub` and then installed GRUB as boot loader. Although the space on the HFS FS was sufficient:

```
/target/boot/grub # ls -la
drwxr-xr-x    1 root     root             9 Oct  8 15:29 .
drwxr-xr-x    3 root     root          4096 Oct  8 15:28 ..
drwxr-xr-x    1 root     root             3 Oct  8 15:29 fonts
-rw-r--r--    1 root     root          1024 Oct  8 15:29 grubenv
drwxr-xr-x    1 root     root            40 Oct  8 15:29 locale
-rw-r--r--    1 root     root          2858 Oct  8  2017 ofboot.b
drwxr-xr-x    1 root     root           212 Oct  8 15:29 powerpc-ieee1275
-rw-r--r--    1 root     root        198212 Oct  8  2017 yaboot
-rw-r--r--    1 root     root           681 Oct  8  2017 yaboot.conf

/target/boot/grub # df -h
Filesystem                Size      Used Available Use% Mounted on
none                    891.1M      1.6M    889.6M   0% /run
devtmpfs                  4.1G         0      4.1G   0% /dev
/dev/sda3               907.5G      1.1G    860.2G   0% /target
/dev/sda3               907.5G      1.1G    860.2G   0% /dev/.static/dev
devtmpfs                  4.1G         0      4.1G   0% /target/dev
/dev/sda2                 9.5M      8.4M      1.1M  88% /target/boot/grub
/dev/sr0                225.3M    225.3M         0 100% /cdrom
```

...the installation of GRUB failed with the following messages:
```
Oct  8 15:29:29 grub-installer: info: Installing grub on 'dummy'
Oct 8 15:29:30 grub-installer: info: grub-install does not support --no-floppy Oct 8 15:29:41 grub-installer: info: Running chroot /target grub-install --force "dummy"
Oct  8 15:29:41 grub-installer: Installing for powerpc-ieee1275 platform.

Oct 8 15:29:45 grub-installer: grub-install: error: cannot find a GRUB drive for dummy. Check your device.map.

Oct 8 15:29:45 grub-installer: error: Running 'grub-install --force "dummy"' failed. Oct 8 15:29:51 main-menu[4594]: (process:25232): File descriptor 3 (pipe:[14575]) leaked on lvdisplay invocation. Parent PID 25798: /bin/sh Oct 8 15:29:51 main-menu[4594]: (process:25232): File descriptor 4 (/dev/pts/6) leaked on lvdisplay invocation. Parent PID 25798: /bin/sh Oct 8 15:29:51 main-menu[4594]: (process:25232): File descriptor 5 (/dev/pts/6) leaked on lvdisplay invocation. Parent PID 25798: /bin/sh Oct 8 15:29:51 main-menu[4594]: (process:25232): File descriptor 6 (/dev/pts/6) leaked on lvdisplay invocation. Parent PID 25798: /bin/sh Oct 8 15:29:51 main-menu[4594]: (process:25232): Volume group "sda" not found Oct 8 15:29:51 main-menu[4594]: (process:25232): Cannot process volume group sda Oct 8 15:29:51 main-menu[4594]: WARNING **: Configuring 'grub-installer' failed with error code 1 Oct 8 15:29:51 main-menu[4594]: WARNING **: Menu item 'grub-installer' failed.
```

Cheers,
Frank


Reply to: