All of lore.kernel.org
 help / color / mirror / Atom feed
* GRUB failed to install on Fujitsu M10-4
@ 2019-06-03 13:37 Sonnie Hook
  2019-06-03 13:47 ` John Paul Adrian Glaubitz
  2019-06-03 16:36 ` Eric Snowberg
  0 siblings, 2 replies; 9+ messages in thread
From: Sonnie Hook @ 2019-06-03 13:37 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

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"
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.

I have spent several days on the installation. Please help me!

[-- Attachment #2: Type: text/html, Size: 1813 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB failed to install on Fujitsu M10-4
  2019-06-03 13:37 GRUB failed to install on Fujitsu M10-4 Sonnie Hook
@ 2019-06-03 13:47 ` John Paul Adrian Glaubitz
  2019-06-03 14:18   ` Sonnie Hook
  2019-06-03 16:36 ` Eric Snowberg
  1 sibling, 1 reply; 9+ messages in thread
From: John Paul Adrian Glaubitz @ 2019-06-03 13:47 UTC (permalink / raw)
  To: Sonnie Hook; +Cc: The development of GNU GRUB

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 - 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] 9+ messages in thread

* Re: GRUB failed to install on Fujitsu M10-4
  2019-06-03 13:47 ` John Paul Adrian Glaubitz
@ 2019-06-03 14:18   ` Sonnie Hook
  2019-06-03 14:32     ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 9+ messages in thread
From: Sonnie Hook @ 2019-06-03 14:18 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2888 bytes --]

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 <glaubitz@physik.fu-berlin.de> 于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 - glaubitz@debian.org
> `. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>

[-- Attachment #2: Type: text/html, Size: 3742 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB failed to install on Fujitsu M10-4
  2019-06-03 14:18   ` Sonnie Hook
@ 2019-06-03 14:32     ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 9+ messages in thread
From: John Paul Adrian Glaubitz @ 2019-06-03 14:32 UTC (permalink / raw)
  To: Sonnie Hook; +Cc: The development of GNU GRUB, Eric Snowberg

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 <glaubitz@physik.fu-berlin.de <mailto:glaubitz@physik.fu-berlin.de>> 于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 - glaubitz@debian.org <mailto:glaubitz@debian.org>
>     `. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de <mailto:glaubitz@physik.fu-berlin.de>
>       `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
> 

-- 
 .''`.  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] 9+ messages in thread

* Re: GRUB failed to install on Fujitsu M10-4
  2019-06-03 13:37 GRUB failed to install on Fujitsu M10-4 Sonnie Hook
  2019-06-03 13:47 ` John Paul Adrian Glaubitz
@ 2019-06-03 16:36 ` Eric Snowberg
  2019-06-04  0:56   ` Sonnie Hook
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Snowberg @ 2019-06-03 16:36 UTC (permalink / raw)
  To: The development of GNU GRUB, sonnie.hook


> On Jun 3, 2019, at 7:37 AM, Sonnie Hook <sonnie.hook@gmail.com> 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)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB failed to install on Fujitsu M10-4
  2019-06-03 16:36 ` Eric Snowberg
@ 2019-06-04  0:56   ` Sonnie Hook
  2019-06-04  2:36     ` Eric Snowberg
  2019-06-04  7:56     ` John Paul Adrian Glaubitz
  0 siblings, 2 replies; 9+ messages in thread
From: Sonnie Hook @ 2019-06-04  0:56 UTC (permalink / raw)
  To: Eric Snowberg; +Cc: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2816 bytes --]

Model: LSI Logical Volume (scsi)
Disk /dev/sda: 599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  10.5MB  9437kB                        bios_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 <eric.snowberg@oracle.com> 于2019年6月4日周二 上午12:36写道:

>
> > On Jun 3, 2019, at 7:37 AM, Sonnie Hook <sonnie.hook@gmail.com> 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)
>
>

[-- Attachment #2: Type: text/html, Size: 3741 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB failed to install on Fujitsu M10-4
  2019-06-04  0:56   ` Sonnie Hook
@ 2019-06-04  2:36     ` Eric Snowberg
  2019-06-04  7:56     ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Snowberg @ 2019-06-04  2:36 UTC (permalink / raw)
  To: Sonnie Hook; +Cc: adrian John Paul Glaubitz, The development of GNU GRUB


> On Jun 3, 2019, at 6:56 PM, Sonnie Hook <sonnie.hook@gmail.com> wrote:
> 
> Model: LSI Logical Volume (scsi)
> Disk /dev/sda: 599GB
> Sector size (logical/physical): 512B/4096B
> Partition Table: gpt
> Disk Flags: 
> 
> Number  Start   End     Size    File system     Name  Flags
>  1      1049kB  10.5MB  9437kB                        bios_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.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB failed to install on Fujitsu M10-4
  2019-06-04  0:56   ` Sonnie Hook
  2019-06-04  2:36     ` Eric Snowberg
@ 2019-06-04  7:56     ` John Paul Adrian Glaubitz
  2019-06-04  9:50       ` Steve McIntyre
  1 sibling, 1 reply; 9+ messages in thread
From: John Paul Adrian Glaubitz @ 2019-06-04  7:56 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Sonnie Hook, Eric Snowberg

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 - 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] 9+ messages in thread

* Re: GRUB failed to install on Fujitsu M10-4
  2019-06-04  7:56     ` John Paul Adrian Glaubitz
@ 2019-06-04  9:50       ` Steve McIntyre
  0 siblings, 0 replies; 9+ messages in thread
From: Steve McIntyre @ 2019-06-04  9:50 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Eric Snowberg, Sonnie Hook

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.                                steve@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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-04 10:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 13:37 GRUB failed to install on Fujitsu M10-4 Sonnie Hook
2019-06-03 13:47 ` John Paul Adrian Glaubitz
2019-06-03 14:18   ` Sonnie Hook
2019-06-03 14:32     ` John Paul Adrian Glaubitz
2019-06-03 16:36 ` Eric Snowberg
2019-06-04  0:56   ` Sonnie Hook
2019-06-04  2:36     ` Eric Snowberg
2019-06-04  7:56     ` John Paul Adrian Glaubitz
2019-06-04  9:50       ` Steve McIntyre

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.