* Maturity of GRUB on powerpc/ppc64?
@ 2017-09-26 13:19 John Paul Adrian Glaubitz
2017-09-26 18:57 ` Frank Scheiner
0 siblings, 1 reply; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-09-26 13:19 UTC (permalink / raw)
To: grub-devel; +Cc: debian-powerpc
Hi!
On powerpc systems, Debian-Installer contains the following warning
when trying to set up GRUB as the default bootloader [1]:
"grub-installer/grub_not_mature_on_this_platform ARCH $ARCH"
Does anyone know whether GRUB has matured on powerpc or is it still
considered experimental?
Adrian
> [1] https://anonscm.debian.org/git/d-i/grub-installer.git/tree/grub-installer#n310
--
.''`. 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-09-26 13:19 Maturity of GRUB on powerpc/ppc64? John Paul Adrian Glaubitz
@ 2017-09-26 18:57 ` Frank Scheiner
2017-09-26 19:16 ` John Paul Adrian Glaubitz
2017-10-02 15:04 ` Frank Scheiner
0 siblings, 2 replies; 16+ messages in thread
From: Frank Scheiner @ 2017-09-26 18:57 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, grub-devel; +Cc: debian-powerpc
Hi,
On 09/26/2017 03:19 PM, John Paul Adrian Glaubitz wrote:
> Hi!
>
> On powerpc systems, Debian-Installer contains the following warning
> when trying to set up GRUB as the default bootloader [1]:
>
> "grub-installer/grub_not_mature_on_this_platform ARCH $ARCH"
>
> Does anyone know whether GRUB has matured on powerpc or is it still
> considered experimental?
Sorry, I'm a little occupied recently, but I was successful in
installing and using Grub to boot my Xserve G4 on Debian Sid this
weekend. Haven't tried on other G3 or G4 Power Macs yet, though.
I'll describe details maybe later this week. In short, it works similar
in general to what I described for the Power Mac G5 (11,2). On the
Xserve G4 I used it without separate partition for `/boot` without an
issue (the partition for `/` was formatted with EXT4 during the original
Wheezy installation on this machine). It cost me some time to find out
what was the correct setting to activate the serial console. By default
Grub uses a glass console, even if there is no graphics card installed.
But this is usually not an issue for the workstations.
Cheers,
Frank
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-09-26 18:57 ` Frank Scheiner
@ 2017-09-26 19:16 ` John Paul Adrian Glaubitz
2017-10-02 15:24 ` Frank Scheiner
2017-10-02 15:04 ` Frank Scheiner
1 sibling, 1 reply; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-09-26 19:16 UTC (permalink / raw)
To: Frank Scheiner, grub-devel; +Cc: debian-powerpc
Hi Frank!
On 09/26/2017 08:57 PM, Frank Scheiner wrote:
> Sorry, I'm a little occupied recently, but I was successful in installing and
> using Grub to boot my Xserve G4 on Debian Sid this weekend. Haven't tried on other
> G3 or G4 Power Macs yet, though.
Please try to perform some more testing. I'm especially interested in tests
on 32-bit hardware to make sure we don't break anything there.
> I'll describe details maybe later this week. In short, it works similar in general
> to what I described for the Power Mac G5 (11,2). On the Xserve G4 I used it
> without separate partition for `/boot` without an issue (the partition for
> `/` was formatted with EXT4 during the original Wheezy installation on this machine).
Ok. This basically needs to be performed by the grub-installer package in debian-installer.
> It cost me some time to find out what was the correct setting to activate the serial
> console. By default Grub uses a glass console, even if there is no graphics
> card installed. But this is usually not an issue for the workstations.
We had a similar discussion regarding this on SPARC as most SPARC machines
these days are pure servers without a video display. So, they have to be
configured to use a GRUB serial console. But it's not that difficult and
something we could add to the default configuration when installing on
these targets, possibly controlled by a command line option to debian-installer.
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-09-26 18:57 ` Frank Scheiner
2017-09-26 19:16 ` John Paul Adrian Glaubitz
@ 2017-10-02 15:04 ` Frank Scheiner
2017-10-04 8:50 ` John Paul Adrian Glaubitz
1 sibling, 1 reply; 16+ messages in thread
From: Frank Scheiner @ 2017-10-02 15:04 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, grub-devel; +Cc: debian-powerpc
On 09/26/2017 08:57 PM, Frank Scheiner wrote:
> I'll describe details maybe later this week. In short, it works similar
> in general to what I described for the Power Mac G5 (11,2). On the
> Xserve G4 I used it without separate partition for `/boot` without an
> issue (the partition for `/` was formatted with EXT4 during the original
> Wheezy installation on this machine). It cost me some time to find out
> what was the correct setting to activate the serial console. By default
> Grub uses a glass console, even if there is no graphics card installed.
> But this is usually not an issue for the workstations.
As a follow-up to [1] but maybe better placed under the subject of this
thread, the promised details for the Grub installation on an Xserve G4
with Debian Sid.
The Xserve G4 originally had Debian Wheezy installed which was first
upgraded to Debian Jessie and then to Debian Sid. To be able to
successfully boot with the current Linux kernel 4.12.x:
1. I needed to blacklist the `rack-meter` module. It is loaded
automatically by kernel 4.12.x of Debian Sid but not by 3.16.x of Debian
Jessie - don't know why. But both kernels panic after it was loaded.
2. Because I couldn't successfully boot with kernel 4.12.x, I wanted to
fall back to kernel 3.16.x to fix things, but this also didn't work out
of the box, as the `/dev/disk` directory in the - possibly recreated -
initrd of kernel 3.16.x did not contain a `by-uuid` directory, but the
root FS was given by UUID in the kernel command line provided by yaboot.
I don't know if this was done by Sid, Jessie or Wheezy originally. With
a Debian installer CD-ROM I could "fix" things by using the actual `sd`
device.
For the Grub installation I used the same approach as in [1] and not the
`grub-install` command to rule out additional sources of errors:
# GRUB-IEEE1275 setup in Xserve G4 (1,2) #
## Install grub-ieee1275 ##
```
# apt install grub-ieee1275
```
## Full file list for grub image ##
Placed in `~/grub/`, copied from `/usr/lib/grub/powerpc-ieee1275` - this
time in a more useful form for copy-and-paste:
```
archelp.mod bitmap.mod bitmap_scale.mod blocklist.mod boot.mod bufio.mod
cat.mod cmp.mod configfile.mod cpio.mod crypto.mod datehook.mod date.mod
datetime.mod disk.mod echo.mod elf.mod ext2.mod fat.mod font.mod
fshelp.mod gettext.mod gfxmenu.mod gfxterm.mod gzio.mod halt.mod
help.mod hexdump.mod hfs.mod hfsplus.mod ieee1275_fb.mod kernel.img
linux.mod loadenv.mod loopback.mod lsmmap.mod ls.mod memdisk.mod
memrw.mod minicmd.mod moddep.lst msdospart.mod normal.mod part_apple.mod
part_msdos.mod parttool.mod probe.mod read.mod reboot.mod regexp.mod
relocator.mod scsi.mod search_fs_file.mod search_fs_uuid.mod
search_label.mod search.mod setjmp.mod sleep.mod suspend.mod
terminal.mod test.mod trig.mod true.mod video_colors.mod video_fb.mod
videoinfo.mod video.mod
```
## Partition table ##
```
~# mac-fdisk -l
/dev/sda
# type name length base
( size ) system
/dev/sda1 Apple_partition_map Apple 63 @ 1 (
31.5k) Partition map
/dev/sda2 Apple_Bootstrap untitled 1954 @ 64
(977.0k) NewWorld bootblock
/dev/sda3 Apple_UNIX_SVR2 untitled 613027344 @ 2018
(292.3G) Linux native
/dev/sda4 Apple_UNIX_SVR2 swap 12113037 @
613029362 ( 5.8G) Linux swap
/dev/sda5 Apple_Free Extra 49 @
625142399 ( 24.5k) Free space
Block size=512, Number of Blocks=625142448
DeviceType=0x0, DeviceId=0x0
```
## Embedded config file ##
NOTICE: No separate partition for `/boot` used this time!
`~/grub/grub-embedded-config.cfg`
```
insmod serial
insmod terminal
insmod part_apple
insmod ext2
terminal_input serial_ieee1275/scca console
terminal_output serial_ieee1275/scca console
set root=(ieee1275/hd,apple3)
set prefix=(ieee1275/hd,apple3)/boot/grub
configfile /boot/grub/grub.cfg
```
## Actual config file ##
NOTICE: No separate partition for `/boot` used this time!
`/boot/grub/grub.cfg`
```
set root=(ieee1275/hd,apple3)
timeout=10
#default=0
menuentry "Debian GNU/Linux Sid (powerpc)" {
linux /boot/vmlinux root=/dev/sda3 console=tty1 console=ttyPZ0,57600n8
initrd /boot/initrd.img
}
```
## Command to create the grub image ##
```
~/grub# grub-mkimage -c ./grub-embedded-config.cfg -o ../grub.img -O
powerpc-ieee1275 -d . -p '(ieee1275/hd,apple3)/boot/grub' *.mod
```
## Installation on HFS partition ##
This time with correct command and directory names (compared to [1]):
```
~# mount /dev/sda2 /mnt
~# cp grub.img /mnt/
~# sync
~# df -h
[...]
/dev/sda2 974K 852K 122K 88% /mnt
[...]
~# umount /mnt
```
Cheers,
Frank
[1]: https://lists.debian.org/debian-powerpc/2017/09/msg00034.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-09-26 19:16 ` John Paul Adrian Glaubitz
@ 2017-10-02 15:24 ` Frank Scheiner
0 siblings, 0 replies; 16+ messages in thread
From: Frank Scheiner @ 2017-10-02 15:24 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, grub-devel; +Cc: debian-powerpc
Hi Adrian,
On 09/26/2017 09:16 PM, John Paul Adrian Glaubitz wrote:
> On 09/26/2017 08:57 PM, Frank Scheiner wrote:
>> Sorry, I'm a little occupied recently, but I was successful in installing and
>> using Grub to boot my Xserve G4 on Debian Sid this weekend. Haven't tried on other
>> G3 or G4 Power Macs yet, though.
>
> Please try to perform some more testing. I'm especially interested in tests
> on 32-bit hardware to make sure we don't break anything there.
To speed up things I just used the disk(s) from the Xserve G4 with
working Grub installation and Debian Sid (powerpc) in the machines I
tested and tried to boot them with Grub, which succeeded* for all of the
following machines (in the given order):
* Power Macintosh G4 (3,3 aka Gigabit)
* Power Macintosh G3 (1,1 aka Blue&White)
* Power Macintosh G4 (3,6 aka MDD)
* Power Macintosh G4 (3,5 aka QS 2002)
* Power Macintosh G4 (3,1 aka AGP)
*) Unfortunately I had some problems during my initial testing which
cost me quite some time and made it necessary to reinstall Debian on the
Xserve G4 on another disk (which cost even more time and multiple tries
as the OF path to the disk partition containing yaboot couldn't be
determined correctly on the Xserve G4). After testing the G3 where Grub
was able to boot the machine, I observed multiple problems during
execution of several programs (e.g. `time 7z b -mmt1` and `time 7z b`
assumed four execution threads (!) and gave a decoding error and a
segfault respectively during benchmarking, `halt` also segfaulted,
hitting the power button powered the machine down instantly without a
proper shutdown). On the next reboot the root file system was damaged
and no longer accessible. I gave up on the repair from a Debian 8
installer CD-ROM, as there were hundreds of errors and because I
remembered to have read somewhere that the early G3s had a buggy ATA
controller installed, which could be one reason for the FS damage. On
the other hand, the Xserve G4 showed an fsck error during startup with
Debian Sid, too:
```
[...]
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/sda3] fsck.ext4 -a -C0 /dev/sda3
Signal (4) SIGILL si_code=ILL_ILLOPC fault addr=0x8acd8c
fsck.ext4(+0x3466c)[0x92f66c]
linux-vdso32.so.1(__kernel_sigtramp_rt32+0x0)[0x1003f0]
/lib/powerpc-linux-gnu/libext2fs.so.2(ext2fs_get_mem+0x3c)[0x8acd8c]
/lib/powerpc-linux-gnu/libext2fs.so.2(ext2fs_get_mem+0x2c)[0x8acd7c]
/lib/powerpc-linux-gnu/libext2fs.so.2(ext2fs_open2+0x7f8)[0x8b5458]
fsck.ext4(+0xed68)[0x909d68]
fsck.ext4(main+0x614)[0x9071f4]
/lib/powerpc-linux-gnu/libc.so.6(+0x21254)[0x5b1254]
/lib/powerpc-linux-gnu/libc.so.6(__libc_start_main+0xdc)[0x5b145c]
fsck exited with status code 8
done.
Warning: File system check failed but did not detect errors
[...]
```
...but I initially did not pay that much attention to it and just
assumed it could be a problem of the tools integrated in the initrd -
exit code 8 is for an "operational error". But it could as well be, that
the FS got corrupted on the Xserve G4 already and was fully destroyed by
the G3.
After reinstalling Debian Sid on another ATA disk on the Xserve G4 -
this time starting with Debian Jessie, I could finish my testing with
the remaining Power Macintosh G4 types I have available. I did not
observe the above mentioned FS issues with the reinstalled Debian Sid.
Despite these problems, all listed machines could be booted by Grub
2.02-2 from Debian Sid during my tests as already mentioned. I booted
Grub manually via `boot hd:2,grub.img`.
The root FS was an EXT4 formatted with Debian Wheezy (for G3 and G4
(3,3)) and Debian Jessie (for G4 (3,1), G4 (3,5), G4 (3,6)). No separate
partition for `/boot` was used.
As the Xserve G4 comes with an externally usable serial port by default,
Grub was configured to also use this port as console. This machines (and
I believe also the other listed machines) have two sets of input and
output device NVRAM vars:
* `input-device`
* `output-device`
...and:
* `input-device-1`
* `output-device-1`
With the following NVRAM setting:
```
[...]
input-device keyboard keyboard
output-device screen screen
input-device-1 scca scca
output-device-1 scca scca
[...]
```
...and no keyboard connected, the OF interface falls back to the serial
console, but the Grub menu is displayed only on the glass console and no
interaction from the serial console is possible. With the settings reversed:
```
[...]
input-device scca keyboard
output-device scca screen
input-device-1 keyboard scca
output-device-1 screen scca
[...]
```
...and a keyboard connected, both OF interface and the Grub menu are
using the serial console. No output was observed on the glass console.
The embedded Grub config shown on [1] should actually configure Grub to
use both glass and serial console, but it seems like the console device
that is actually used depends on what is set for `input-device` and
`output-device` in the NVRAM - or I'm doing something wrong.
[1]: https://lists.debian.org/debian-powerpc/2017/10/msg00005.html
Cheers,
Frank
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-02 15:04 ` Frank Scheiner
@ 2017-10-04 8:50 ` John Paul Adrian Glaubitz
2017-10-04 10:41 ` Frank Scheiner
0 siblings, 1 reply; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-10-04 8:50 UTC (permalink / raw)
To: Frank Scheiner, grub-devel; +Cc: debian-powerpc
On 10/02/2017 05:04 PM, Frank Scheiner wrote:
> As a follow-up to [1] but maybe better placed under the subject of this thread,
> the promised details for the Grub installation on an Xserve G4 with Debian Sid.
Thanks. Is there any specify reason why you aren't using grub-install?
If I remember correctly, most of the steps you went through above should
actually be performed by single invocation of grub-install which is what
debian-installer is doing as well.
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 8:50 ` John Paul Adrian Glaubitz
@ 2017-10-04 10:41 ` Frank Scheiner
2017-10-04 10:50 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 16+ messages in thread
From: Frank Scheiner @ 2017-10-04 10:41 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, grub-devel; +Cc: debian-powerpc
On 10/04/2017 10:50 AM, John Paul Adrian Glaubitz wrote:
> On 10/02/2017 05:04 PM, Frank Scheiner wrote:
>> As a follow-up to [1] but maybe better placed under the subject of
>> this thread,
>> the promised details for the Grub installation on an Xserve G4 with
>> Debian Sid.
>
> Thanks. Is there any specify reason why you aren't using grub-install?
Yes - it's a known working method. I know that it worked that way on the
Power Mac G5, so I first tried it that way on the Xserve G4. That to be
sure no errors are introduced by another method of installation.
>
> If I remember correctly, most of the steps you went through above should
> actually be performed by single invocation of grub-install which is what
> debian-installer is doing as well.
I can retry this on the G5 with an installer that has Grub included.
IIRC that wasn't the case, the last time I installed the G5 in late
September (with the installer ISO with SHA256 hash:
46844b4c8da76c3fb18d3d350b1262b9938c8b8ff8a85bd193d76ac7e33b5dc9) - or I
just didn't notice it.
And I can also try to use grub-install on the Xserve G4 from the already
installed OS. If there is also a Sid installer image available for
powerpc I can also do that from the Debian installer.
Cheers,
Frank
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 10:41 ` Frank Scheiner
@ 2017-10-04 10:50 ` John Paul Adrian Glaubitz
2017-10-04 11:22 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-10-04 10:50 UTC (permalink / raw)
To: Frank Scheiner, grub-devel; +Cc: debian-powerpc
On 10/04/2017 12:41 PM, Frank Scheiner wrote:
> On 10/04/2017 10:50 AM, John Paul Adrian Glaubitz wrote:
>> On 10/02/2017 05:04 PM, Frank Scheiner wrote:
>>> As a follow-up to [1] but maybe better placed under the subject of this thread,
>>> the promised details for the Grub installation on an Xserve G4 with Debian Sid.
>>
>> Thanks. Is there any specify reason why you aren't using grub-install?
>
> Yes - it's a known working method. I know that it worked that way on the Power Mac G5,
> so I first tried it that way on the Xserve G4. That to be sure no errors are introduced
> by another method of installation.
I understand. But please understand that we want to integrate the GRUB installation
into debian-installer using the grub-installer script [1]. Thus, we should not
deviate too much from the installation mechanism used on other architectures.
>> If I remember correctly, most of the steps you went through above should
>> actually be performed by single invocation of grub-install which is what
>> debian-installer is doing as well.
>
> I can retry this on the G5 with an installer that has Grub included. IIRC that
> wasn't the case, the last time I installed the G5 in late September (with the
> installer ISO with SHA256 hash: 46844b4c8da76c3fb18d3d350b1262b9938c8b8ff8a85bd193d76ac7e33b5dc9)
> - or I just didn't notice it.
Please be aware that the option to install GRUB is already there but it's not
run by debian-installer by default because the Yaboot installation option is
higher in the menu and therefore has a higher priority. And the moment a bootloader
has been installed, debian-installer will skip any other options for bootloader
installation afterwards.
Thus, after the installation has finished, you have to go back to the installer's
main menu and choose the GRUB option to install it. You will most likely have
to manually adjust the partitioning and then mount the HFS boot partition
to /boot/grub.
> And I can also try to use grub-install on the Xserve G4 from the already installed OS.
> If there is also a Sid installer image available for powerpc I can also do that from
> the Debian installer.
The powerpc images are always built in [2] as previously mentioned. Unfortunately,
the image there is already 6 days old which means it won't have the necessary
grub-installer package 1.143 yet. If the image won't show up there until tomorrow,
I can manually build one as well.
Adrian
> [1] https://anonscm.debian.org/git/d-i/grub-installer.git/tree/grub-installer
> [2] http://jenkins.kfreebsd.eu/jenkins/view/cd/
--
.''`. 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 10:50 ` John Paul Adrian Glaubitz
@ 2017-10-04 11:22 ` John Paul Adrian Glaubitz
2017-10-04 13:16 ` Frank Scheiner
0 siblings, 1 reply; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-10-04 11:22 UTC (permalink / raw)
To: Frank Scheiner, grub-devel; +Cc: debian-powerpc
On 10/04/2017 12:50 PM, John Paul Adrian Glaubitz wrote:
> On 10/04/2017 12:41 PM, Frank Scheiner wrote:
>> On 10/04/2017 10:50 AM, John Paul Adrian Glaubitz wrote:
>>> Thanks. Is there any specify reason why you aren't using grub-install?
>>
>> Yes - it's a known working method. I know that it worked that way on the Power Mac G5,
>> so I first tried it that way on the Xserve G4. That to be sure no errors are introduced
>> by another method of installation.
>
> I understand. But please understand that we want to integrate the GRUB installation
> into debian-installer using the grub-installer script [1]. Thus, we should not
> deviate too much from the installation mechanism used on other architectures.
FWIW, you can modify the script in /usr/bin/grub-installer while the installation
session is running. Then you can make the necessary modifications until the installation
works by just selecting the GRUB option from the menu item.
Then we can just diff your modified grub-installer script against the currently
packaged version and eventually apply the patch necessary to make the GRUB
installation work on PPC/PPC64 (Mac).
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 11:22 ` John Paul Adrian Glaubitz
@ 2017-10-04 13:16 ` Frank Scheiner
2017-10-04 13:25 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 16+ messages in thread
From: Frank Scheiner @ 2017-10-04 13:16 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, grub-devel; +Cc: debian-powerpc
On 10/04/2017 01:22 PM, John Paul Adrian Glaubitz wrote:
> [...]
> FWIW, you can modify the script in /usr/bin/grub-installer while the
> installation
> session is running. Then you can make the necessary modifications until
> the installation
> works by just selecting the GRUB option from the menu item.
Hey Adrian, you are really helpful! :-) I will check this out for the
Power Macs and try to fix any issues on the way by directly adapting
`/usr/bin/grub-installer`. But could take until the weekend to find the
time. :-/ I'll keep you informed.
Cheers,
Frank
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 13:16 ` Frank Scheiner
@ 2017-10-04 13:25 ` John Paul Adrian Glaubitz
2017-10-04 16:23 ` Lennart Sorensen
0 siblings, 1 reply; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-10-04 13:25 UTC (permalink / raw)
To: Frank Scheiner, grub-devel; +Cc: debian-powerpc
On 10/04/2017 03:16 PM, Frank Scheiner wrote:
> Hey Adrian, you are really helpful! :-)
So are all your tests. Your input is really appreciated, thank you!
> I will check this out for the Power Macs and try to fix any issues on
> the way by directly adapting `/usr/bin/grub-installer`.
Yep, that's the idea. I assume there are only minor changes necessary
to be made until everything works as intended.
I still haven't managed to fully fix GRUB on POWER-based systems though
as I cannot get partman to flag the boot partition as PREP. And without
that flag, grub-installer is unable to find the target partition for
installing GRUB.
I have to dig into the partman source code more to be able to find
the problem.
> But could take until the weekend to find the time. :-/ I'll keep you informed.
No worries, take your time.
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 13:25 ` John Paul Adrian Glaubitz
@ 2017-10-04 16:23 ` Lennart Sorensen
2017-10-04 16:36 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 16+ messages in thread
From: Lennart Sorensen @ 2017-10-04 16:23 UTC (permalink / raw)
To: John Paul Adrian Glaubitz; +Cc: Frank Scheiner, grub-devel, debian-powerpc
On Wed, Oct 04, 2017 at 03:25:20PM +0200, John Paul Adrian Glaubitz wrote:
> On 10/04/2017 03:16 PM, Frank Scheiner wrote:
> > Hey Adrian, you are really helpful! :-)
>
> So are all your tests. Your input is really appreciated, thank you!
>
> > I will check this out for the Power Macs and try to fix any issues on
> > the way by directly adapting `/usr/bin/grub-installer`.
>
> Yep, that's the idea. I assume there are only minor changes necessary
> to be made until everything works as intended.
>
> I still haven't managed to fully fix GRUB on POWER-based systems though
> as I cannot get partman to flag the boot partition as PREP. And without
> that flag, grub-installer is unable to find the target partition for
> installing GRUB.
It is not a flag, it is a partition type. PPC PReP Boot is partition
type 0x41. Similar to how Linux is type 0x83 and Linux swap is type 0x82.
I don't remember if it wants the boot flag set on it or not.
> I have to dig into the partman source code more to be able to find
> the problem.
>
> > But could take until the weekend to find the time. :-/ I'll keep you informed.
>
> No worries, take your time.
--
Len Sorensen
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 16:23 ` Lennart Sorensen
@ 2017-10-04 16:36 ` John Paul Adrian Glaubitz
2017-10-04 16:47 ` Lennart Sorensen
2017-10-04 18:10 ` Gabriel Paubert
0 siblings, 2 replies; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-10-04 16:36 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: Frank Scheiner, grub-devel, debian-powerpc
On 10/04/2017 06:23 PM, Lennart Sorensen wrote:
> It is not a flag, it is a partition type. PPC PReP Boot is partition
> type 0x41. Similar to how Linux is type 0x83 and Linux swap is type 0x82.
>
> I don't remember if it wants the boot flag set on it or not.
Are you sure? The parted manual seems to say otherwise:
> http://www.hep.by/gnu/parted/set.html
And I can fix the problem by manually running the parted command:
set prep 1 on
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 16:36 ` John Paul Adrian Glaubitz
@ 2017-10-04 16:47 ` Lennart Sorensen
2017-10-04 16:53 ` John Paul Adrian Glaubitz
2017-10-04 18:10 ` Gabriel Paubert
1 sibling, 1 reply; 16+ messages in thread
From: Lennart Sorensen @ 2017-10-04 16:47 UTC (permalink / raw)
To: John Paul Adrian Glaubitz; +Cc: Frank Scheiner, grub-devel, debian-powerpc
On Wed, Oct 04, 2017 at 06:36:33PM +0200, John Paul Adrian Glaubitz wrote:
> Are you sure? The parted manual seems to say otherwise:
>
> > http://www.hep.by/gnu/parted/set.html
>
> And I can fix the problem by manually running the parted command:
>
> set prep 1 on
No I am not sure. I know there is a partition type for it though, and
the debian installer for powerpc always created it properly on an IBM
pseries for me so I never looked at the details.
Looking at the parted source code, they are abusing flags to store things
that are not flags. So it if sees partition type 0x41, it sets the "flag"
prep. Setting the "flag" prep makes it set the partition type to 0x41.
So yes, it is in fact a partition type, and it does not need any flags
set by the looks of it.
--
Len Sorensen
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 16:47 ` Lennart Sorensen
@ 2017-10-04 16:53 ` John Paul Adrian Glaubitz
0 siblings, 0 replies; 16+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-10-04 16:53 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: Frank Scheiner, grub-devel, debian-powerpc
On 10/04/2017 06:47 PM, Lennart Sorensen wrote:
> No I am not sure. I know there is a partition type for it though, and
> the debian installer for powerpc always created it properly on an IBM
> pseries for me so I never looked at the details.
Hmm. I could create an updated debian-installer image for powerpc and
see if it works there. I might just be missing something, maybe in
the grub2 package itself.
> Looking at the parted source code, they are abusing flags to store things
> that are not flags. So it if sees partition type 0x41, it sets the "flag"
> prep. Setting the "flag" prep makes it set the partition type to 0x41.
Interesting. I guess they made that to make the user interface more consistent.
> So yes, it is in fact a partition type, and it does not need any flags
> set by the looks of it.
You are right then, of course. But I from debian-installer point of view,
it's still treated as a flag. So, I think we need to check where that
is normally set.
But my main guess is now that the grub2 needs additional changes currently
missing for ppc64.
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Maturity of GRUB on powerpc/ppc64?
2017-10-04 16:36 ` John Paul Adrian Glaubitz
2017-10-04 16:47 ` Lennart Sorensen
@ 2017-10-04 18:10 ` Gabriel Paubert
1 sibling, 0 replies; 16+ messages in thread
From: Gabriel Paubert @ 2017-10-04 18:10 UTC (permalink / raw)
To: John Paul Adrian Glaubitz
Cc: Lennart Sorensen, Frank Scheiner, grub-devel, debian-powerpc
On Wed, Oct 04, 2017 at 06:36:33PM +0200, John Paul Adrian Glaubitz wrote:
> On 10/04/2017 06:23 PM, Lennart Sorensen wrote:
> > It is not a flag, it is a partition type. PPC PReP Boot is partition
> > type 0x41. Similar to how Linux is type 0x83 and Linux swap is type 0x82.
> >
> > I don't remember if it wants the boot flag set on it or not.
>
> Are you sure? The parted manual seems to say otherwise:
Of what? That it is partition type 0x41, 100%.
sudo fdisk -l (trimmed) on my machine:
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x75609d99
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 18431 16384 8M 41 PPC PReP Boot
/dev/sdb2 18432 40978431 40960000 19.5G fd Linux raid autodetect
/dev/sdb3 40978432 1925138431 1884160000 898.4G fd Linux raid autodetect
/dev/sdb4 1925138432 1953523711 28385280 13.5G 82 Linux swap / Solaris
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1aa95e8f
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 18431 16384 8M 41 PPC PReP Boot
/dev/sda2 18432 40978431 40960000 19.5G fd Linux raid autodetect
/dev/sda3 40978432 1925138431 1884160000 898.4G fd Linux raid autodetect
/dev/sda4 1925138432 1953523711 28385280 13.5G 82 Linux swap / Solaris
(Both disks are in a RAID1 setup).
I believe it needs the boot flag, but some firmwares might decide to not
care about it.
Gabriel
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2017-10-04 22:22 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-26 13:19 Maturity of GRUB on powerpc/ppc64? John Paul Adrian Glaubitz
2017-09-26 18:57 ` Frank Scheiner
2017-09-26 19:16 ` John Paul Adrian Glaubitz
2017-10-02 15:24 ` Frank Scheiner
2017-10-02 15:04 ` Frank Scheiner
2017-10-04 8:50 ` John Paul Adrian Glaubitz
2017-10-04 10:41 ` Frank Scheiner
2017-10-04 10:50 ` John Paul Adrian Glaubitz
2017-10-04 11:22 ` John Paul Adrian Glaubitz
2017-10-04 13:16 ` Frank Scheiner
2017-10-04 13:25 ` John Paul Adrian Glaubitz
2017-10-04 16:23 ` Lennart Sorensen
2017-10-04 16:36 ` John Paul Adrian Glaubitz
2017-10-04 16:47 ` Lennart Sorensen
2017-10-04 16:53 ` John Paul Adrian Glaubitz
2017-10-04 18:10 ` Gabriel Paubert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.