Re: GRUB failed to install on Fujitsu M10-4

2019-06-04 Thread Steve McIntyre
On Tue, Jun 04, 2019 at 09:56:37AM +0200, John Paul Adrian Glaubitz wrote:
>On 6/4/19 2:56 AM, Sonnie Hook wrote:
>> Now I re-installed from cdrom. When installing GRUB on disk, I got this 
>> message:
>> 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 ... blabla
>
>This message is generated by grub-installer, i.e. the component of
>debian-installer which installs GRUB during installation. The
>relevant code part can found here [1], the relevant message text here
>[2].
>
>I haven't analyzed the code in detail yet so I'm not sure why it
>triggers in your case. I will perform a test installation inside a
>SPARC T5 LDOM to find out.

That's code I added into grub-installer. It's clearly a bug to see it
firing here!

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"... the premise [is] that privacy is about hiding a wrong. It's not.
 Privacy is an inherent human right, and a requirement for maintaining
 the human condition with dignity and respect."
  -- Bruce Schneier


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB failed to install on Fujitsu M10-4

2019-06-04 Thread John Paul Adrian Glaubitz
On 6/4/19 2:56 AM, Sonnie Hook wrote:
> Now I re-installed from cdrom. When installing GRUB on disk, I got this 
> message:
> 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 ... blabla

This message is generated by grub-installer, i.e. the component of 
debian-installer
which installs GRUB during installation. The relevant code part can found here 
[1],
the relevant message text here [2].

I haven't analyzed the code in detail yet so I'm not sure why it triggers in 
your
case. I will perform a test installation inside a SPARC T5 LDOM to find out.

Adrian

> [1] 
> https://salsa.debian.org/installer-team/grub-installer/blob/master/grub-installer#L883
> [2] 
> https://salsa.debian.org/installer-team/grub-installer/blob/master/debian/grub-installer.templates#L267

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB failed to install on Fujitsu M10-4

2019-06-03 Thread Eric Snowberg

> On Jun 3, 2019, at 6:56 PM, Sonnie Hook  wrote:
> 
> Model: LSI Logical Volume (scsi)
> Disk /dev/sda: 599GB
> Sector size (logical/physical): 512B/4096B
> Partition Table: gpt
> Disk Flags: 
> 
> Number  Start   End SizeFile system Name  Flags
>  1  1049kB  10.5MB  9437kBbios_grub
>  2  10.5MB  533GB   533GB   ext4
>  3  533GB   599GB   66.4GB  linux-swap(v1)
> 
> Now I re-installed from cdrom. When installing GRUB on disk, I got this 
> message:
> 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 ... blabla
> 
> I chose "No" and finished the installation. 

This is not coming from GRUB, so I’ll refer to Adrian on what you have selected 
“No" to.

> 
> When booting from disk(the path from ` grub-ofpathname /dev/sda2`), I got 
> "Can't open boot device”.

With the partition table above, this does not look correct.  I’m assuming 
/dev/sda2 is your /boot partition. But GRUB is installed on the BIOS boot 
partition, /dev/sda1 in your system.  Try getting the ofpathname for /dev/sda1 
and booting from it instead within OBP.


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB failed to install on Fujitsu M10-4

2019-06-03 Thread Sonnie Hook
Model: LSI Logical Volume (scsi)
Disk /dev/sda: 599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End SizeFile system Name  Flags
 1  1049kB  10.5MB  9437kBbios_grub
 2  10.5MB  533GB   533GB   ext4
 3  533GB   599GB   66.4GB  linux-swap(v1)

Now I re-installed from cdrom. When installing GRUB on disk, I got this
message:
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 ... blabla

I chose "No" and finished the installation.

When booting from disk(the path from ` grub-ofpathname /dev/sda2`), I got
"Can't open boot device".

Eric Snowberg  于2019年6月4日周二 上午12:36写道:

>
> > On Jun 3, 2019, at 7:37 AM, Sonnie Hook  wrote:
> >
> > When installing Debian SPARC 10.0(2019-05-24) on Fujitsu M10-4,
> everything seemed OK except that the GRUB installation reported an EFI
> warning. I forced to install GRUB on /dev/sda, finally the installation
> finished without any error...but failed to boot with "Can't open boot
> device".
> >
> > Then I re-installed the whole OS and before rebooting, I executed a
> shell and tried to find the real OBP boot path.
> > # chroot /target grub-ofpathname /dev/sda
> > grub-ofpathname: error: failed to get canonical path of `/sys/block/sda'.
> >
> > It seemed that there was something wrong with GRUB installation , so I
> manually executed:
> > # chroot /target grub-install  --force-extra-removable --force "/dev/sda”
>
> To debug this, I would recommend removing the —-force above.  Adding this
> option causes all errors to be ignored.
>
> > Installing for sparc64-ieee1275 platform.
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda3": No such device
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > Installation finished. No error reported.
>
> as can be seen above.
>
> What does your partition table look like? (parted /dev/sda print)
>
>
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB failed to install on Fujitsu M10-4

2019-06-03 Thread Eric Snowberg

> On Jun 3, 2019, at 7:37 AM, Sonnie Hook  wrote:
> 
> When installing Debian SPARC 10.0(2019-05-24) on Fujitsu M10-4, everything 
> seemed OK except that the GRUB installation reported an EFI warning. I forced 
> to install GRUB on /dev/sda, finally the installation finished without any 
> error...but failed to boot with "Can't open boot device".
> 
> Then I re-installed the whole OS and before rebooting, I executed a shell and 
> tried to find the real OBP boot path. 
> # chroot /target grub-ofpathname /dev/sda
> grub-ofpathname: error: failed to get canonical path of `/sys/block/sda'.
> 
> It seemed that there was something wrong with GRUB installation , so I 
> manually executed:
> # chroot /target grub-install  --force-extra-removable --force "/dev/sda”

To debug this, I would recommend removing the —-force above.  Adding this 
option causes all errors to be ignored.

> Installing for sparc64-ieee1275 platform.
> /proc/devices: fopen failed: No such file or directory
> Unknown device "/dev/sda2": No such device
> Unknown device "/dev/sda1": No such device
> Unknown device "/dev/sda1": No such device
> Unknown device "/dev/sda2": No such device
> Unknown device "/dev/sda1": No such device
> Unknown device "/dev/sda2": No such device
> Unknown device "/dev/sda3": No such device
> Unknown device "/dev/sda2": No such device
> /proc/devices: fopen failed: No such file or directory
> Unknown device "/dev/sda2": No such device
> /proc/devices: fopen failed: No such file or directory
> Unknown device "/dev/sda2": No such device
> /proc/devices: fopen failed: No such file or directory
> Unknown device "/dev/sda2": No such device
> Installation finished. No error reported.

as can be seen above.

What does your partition table look like? (parted /dev/sda print)


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB failed to install on Fujitsu M10-4

2019-06-03 Thread John Paul Adrian Glaubitz
On 6/3/19 4:18 PM, Sonnie Hook wrote:
> You are right. In the past few mails, the messages I pasted were all from 
> rescue mode until I re-installed the whole OS tonight.
> Besides, after bind-mount those directories, those "Unknown device" errors 
> disappeared. Manual installation of GRUB succeeded.
> `grub-ofpathname /dev/sda` output: 
> /pci@8000/pci@4/pci@0/pci@0/scsi@0/disk@w0,0
> And... still can't open boot device :(

The best would be to ask Eric Snowberg from Oracle for advise. He has the most 
insight.

Adrian

> John Paul Adrian Glaubitz  > 于2019年6月3日周一 下午9:47写道:
> 
> On 6/3/19 3:37 PM, Sonnie Hook wrote:
> > When installing Debian SPARC 10.0(2019-05-24) on Fujitsu M10-4, 
> everything
> > seemed OK except that the GRUB installation reported an EFI warning.
> 
> Wait, you didn't say that there was an "EFI warning" when you posted this
> to the debian-sparc mailing list. And there shouldn't be one as the 
> machine
> uses OpenFirmware plus GPT for the partitions tables.
> 
> I forced to install GRUB on /dev/sda, finally the installation finished 
> without any error...but failed to boot with "Can't open boot device".
> >
> > Then I re-installed the whole OS and before rebooting, I executed a 
> shell and tried to find the real OBP boot path. 
> > # chroot /target grub-ofpathname /dev/sda
> > grub-ofpathname: error: failed to get canonical path of 
> `/sys/block/sda'.
> 
> You need to bind-mount /dev, /proc and /sys into the chroot before
> that command works:
> 
> # mount -o bind /dev /target/dev
> # mount -o bind /proc /target/proc
> # mount -o bind /sys /target/sys
> 
> > It seemed that there was something wrong with GRUB installation , so I 
> manually executed:
> > # chroot /target grub-install  --force-extra-removable --force 
> "/dev/sda"
> > Installing for sparc64-ieee1275 platform.
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda3": No such device
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > Installation finished. No error reported.
> 
> Those above error messages are also a result of the missing bind mounts.
> 
> Adrian
> 
> -- 
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - glaub...@debian.org 
> 
> `. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de 
> 
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
> 

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB failed to install on Fujitsu M10-4

2019-06-03 Thread Sonnie Hook
You are right. In the past few mails, the messages I pasted were all from
rescue mode until I re-installed the whole OS tonight.
Besides, after bind-mount those directories, those "Unknown device" errors
disappeared. Manual installation of GRUB succeeded.
`grub-ofpathname /dev/sda` output: /pci@8000/pci@4/pci@0/pci@0/scsi@0
/disk@w0,0
And... still can't open boot device :(

John Paul Adrian Glaubitz  于2019年6月3日周一
下午9:47写道:

> On 6/3/19 3:37 PM, Sonnie Hook wrote:
> > When installing Debian SPARC 10.0(2019-05-24) on Fujitsu M10-4,
> everything
> > seemed OK except that the GRUB installation reported an EFI warning.
>
> Wait, you didn't say that there was an "EFI warning" when you posted this
> to the debian-sparc mailing list. And there shouldn't be one as the machine
> uses OpenFirmware plus GPT for the partitions tables.
>
> I forced to install GRUB on /dev/sda, finally the installation finished
> without any error...but failed to boot with "Can't open boot device".
> >
> > Then I re-installed the whole OS and before rebooting, I executed a
> shell and tried to find the real OBP boot path.
> > # chroot /target grub-ofpathname /dev/sda
> > grub-ofpathname: error: failed to get canonical path of `/sys/block/sda'.
>
> You need to bind-mount /dev, /proc and /sys into the chroot before
> that command works:
>
> # mount -o bind /dev /target/dev
> # mount -o bind /proc /target/proc
> # mount -o bind /sys /target/sys
>
> > It seemed that there was something wrong with GRUB installation , so I
> manually executed:
> > # chroot /target grub-install  --force-extra-removable --force "/dev/sda"
> > Installing for sparc64-ieee1275 platform.
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda1": No such device
> > Unknown device "/dev/sda2": No such device
> > Unknown device "/dev/sda3": No such device
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > /proc/devices: fopen failed: No such file or directory
> > Unknown device "/dev/sda2": No such device
> > Installation finished. No error reported.
>
> Those above error messages are also a result of the missing bind mounts.
>
> Adrian
>
> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - glaub...@debian.org
> `. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
>   `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB failed to install on Fujitsu M10-4

2019-06-03 Thread John Paul Adrian Glaubitz
On 6/3/19 3:37 PM, Sonnie Hook wrote:
> When installing Debian SPARC 10.0(2019-05-24) on Fujitsu M10-4, everything
> seemed OK except that the GRUB installation reported an EFI warning.

Wait, you didn't say that there was an "EFI warning" when you posted this
to the debian-sparc mailing list. And there shouldn't be one as the machine
uses OpenFirmware plus GPT for the partitions tables.

I forced to install GRUB on /dev/sda, finally the installation finished without 
any error...but failed to boot with "Can't open boot device".
> 
> Then I re-installed the whole OS and before rebooting, I executed a shell and 
> tried to find the real OBP boot path. 
> # chroot /target grub-ofpathname /dev/sda
> grub-ofpathname: error: failed to get canonical path of `/sys/block/sda'.

You need to bind-mount /dev, /proc and /sys into the chroot before
that command works:

# mount -o bind /dev /target/dev
# mount -o bind /proc /target/proc
# mount -o bind /sys /target/sys

> It seemed that there was something wrong with GRUB installation , so I 
> manually executed:
> # chroot /target grub-install  --force-extra-removable --force "/dev/sda"
> Installing for sparc64-ieee1275 platform.
> /proc/devices: fopen failed: No such file or directory
> Unknown device "/dev/sda2": No such device
> Unknown device "/dev/sda1": No such device
> Unknown device "/dev/sda1": No such device
> Unknown device "/dev/sda2": No such device
> Unknown device "/dev/sda1": No such device
> Unknown device "/dev/sda2": No such device
> Unknown device "/dev/sda3": No such device
> Unknown device "/dev/sda2": No such device
> /proc/devices: fopen failed: No such file or directory
> Unknown device "/dev/sda2": No such device
> /proc/devices: fopen failed: No such file or directory
> Unknown device "/dev/sda2": No such device
> /proc/devices: fopen failed: No such file or directory
> Unknown device "/dev/sda2": No such device
> Installation finished. No error reported.

Those above error messages are also a result of the missing bind mounts.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel